diff options
| author | Dapeng Mi <dapeng1.mi@linux.intel.com> | 2026-09-17 09:52:33 +0800 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-09-22 11:37:46 +0200 |
| commit | 0102c8c7fdfc4bd700971daff2b94470f4eafae4 (patch) | |
| tree | 531306c2299f9a269f0a986e29f17ba972180104 /drivers/pinctrl/sprd/pinctrl-sprd.h | |
| download | linux-stable-0102c8c7fdfc4bd700971daff2b94470f4eafae4.tar.gz linux-stable-0102c8c7fdfc4bd700971daff2b94470f4eafae4.zip | |
perf/x86/intel: Rename DMR offcore_rsp attribute to offmodule_rspgrafted
DMR introduces Offmodule Response events in place of the legacy
Offcore Response events, but it still exposes the inherited
offcore_rsp PMU attribute for programming the corresponding MSR data.
Rename the DMR PMU attribute to offmodule_rsp so the sysfs interface
matches the underlying event name and avoids user & tooling confusion.
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/20260917015234.981153-12-dapeng1.mi@linux.intel.com
Diffstat (limited to 'drivers/pinctrl/sprd/pinctrl-sprd.h')
| -rw-r--r-- | drivers/pinctrl/sprd/pinctrl-sprd.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.h b/drivers/pinctrl/sprd/pinctrl-sprd.h new file mode 100644 index 000000000..190bcdb3b --- /dev/null +++ b/drivers/pinctrl/sprd/pinctrl-sprd.h @@ -0,0 +1,59 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Driver header file for pin controller driver + * Copyright (C) 2017 Spreadtrum - http://www.spreadtrum.com + */ + +#ifndef __PINCTRL_SPRD_H__ +#define __PINCTRL_SPRD_H__ + +struct platform_device; + +#define NUM_OFFSET (20) +#define TYPE_OFFSET (16) +#define BIT_OFFSET (8) +#define WIDTH_OFFSET (4) + +#define SPRD_PIN_INFO(num, type, offset, width, reg) \ + (((num) & 0xFFF) << NUM_OFFSET | \ + ((type) & 0xF) << TYPE_OFFSET | \ + ((offset) & 0xFF) << BIT_OFFSET | \ + ((width) & 0xF) << WIDTH_OFFSET | \ + ((reg) & 0xF)) + +#define SPRD_PINCTRL_PIN(pin) SPRD_PINCTRL_PIN_DATA(pin, #pin) + +#define SPRD_PINCTRL_PIN_DATA(a, b) \ + { \ + .name = b, \ + .num = (((a) >> NUM_OFFSET) & 0xfff), \ + .type = (((a) >> TYPE_OFFSET) & 0xf), \ + .bit_offset = (((a) >> BIT_OFFSET) & 0xff), \ + .bit_width = ((a) >> WIDTH_OFFSET & 0xf), \ + .reg = ((a) & 0xf) \ + } + +enum pin_type { + GLOBAL_CTRL_PIN, + COMMON_PIN, + MISC_PIN, +}; + +struct sprd_pins_info { + const char *name; + unsigned int num; + enum pin_type type; + + /* for global control pins configuration */ + unsigned long bit_offset; + unsigned long bit_width; + unsigned int reg; +}; + +int sprd_pinctrl_core_probe(struct platform_device *pdev, + struct sprd_pins_info *sprd_soc_pin_info, + int pins_cnt); +void sprd_pinctrl_remove(struct platform_device *pdev); +void sprd_pinctrl_shutdown(struct platform_device *pdev); + +#endif /* __PINCTRL_SPRD_H__ */ |
