mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
ANDROID: GKI: regmap: Add regmap vendor hook for of_syscon_register
For global registers access, UNISOC have one special method called set/clear
mechanism that would avoid using hardware spinlock. But now regmap framework
does not support our set/clear mechanism, so add vendor hook to support
this feature.
Bug: 228907258
Signed-off-by: Xiaopeng Bai <xiaopeng.bai@unisoc.com>
Change-Id: I9a6651f07a048ffebd5c2d8e369a4e7b374bc182
(cherry picked from commit 53e342c183)
This commit is contained in:
committed by
Treehugger Robot
parent
7c2b6c7b56
commit
8726a2d930
@@ -66,6 +66,7 @@
|
||||
#include <trace/hooks/psci.h>
|
||||
#include <trace/hooks/psi.h>
|
||||
#include <trace/hooks/bl_hib.h>
|
||||
#include <trace/hooks/regmap.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
@@ -310,3 +311,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_post_image_save);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_madvise_cold_pageout_skip);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rmqueue_smallest_bypass);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_one_page_bypass);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_regmap_update);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/slab.h>
|
||||
#include <trace/hooks/regmap.h>
|
||||
|
||||
static struct platform_driver syscon_driver;
|
||||
|
||||
@@ -128,6 +129,7 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
|
||||
}
|
||||
}
|
||||
|
||||
trace_android_vh_regmap_update(&syscon_config, regmap);
|
||||
syscon->regmap = regmap;
|
||||
syscon->np = np;
|
||||
|
||||
|
||||
24
include/trace/hooks/regmap.h
Normal file
24
include/trace/hooks/regmap.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM regmap
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
|
||||
#if !defined(_TRACE_HOOK_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_REGMAP_H
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
struct regmap_config;
|
||||
struct regmap;
|
||||
|
||||
/*
|
||||
* Following tracepoints are not exported in tracefs and provide a
|
||||
* mechanism for vendor modules to hook and extend functionality
|
||||
*/
|
||||
DECLARE_HOOK(android_vh_regmap_update,
|
||||
TP_PROTO(const struct regmap_config *config, struct regmap *map),
|
||||
TP_ARGS(config, map));
|
||||
|
||||
#endif /* _TRACE_HOOK_REGMAP_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
Reference in New Issue
Block a user