On 4/1/25 10:46, Neil Armstrong via groups.io wrote:
From: Caleb Connolly <caleb.conno...@linaro.org>
Some Qualcomm boards feature reserved ranges of pins which are protected
by firmware. Attempting to read or write any registers associated with
these pins results the board resetting.
Add support for parsing these ranges from devicetree and ensure that the
pinctrl and GPIO drivers don't try to interact with these pins.
Signed-off-by: Caleb Connolly <caleb.conno...@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstr...@linaro.org>
---
arch/arm/mach-snapdragon/include/mach/gpio.h | 15 +++++++
drivers/gpio/msm_gpio.c | 9 ++++
drivers/pinctrl/qcom/pinctrl-qcom.c | 64 ++++++++++++++++++++++++++++
3 files changed, 88 insertions(+)
...
+#define MSM_PINCTRL_MAX_RESERVED_RANGES 32
+
struct msm_pinctrl_priv {
phys_addr_t base;
struct msm_pinctrl_data *data;
+ u32 reserved_ranges[MSM_PINCTRL_MAX_RESERVED_RANGES * 2];
+ int reserved_ranges_count;
};
Why storing of reserved pins isn't implemented using bitmap?
DECLARE_BITMAP(reserved_pins, 256);
would only consume 32 bytes, instead of 256+4 like here.
Do I miss something?
---
Regards,
Alexey Minnekhanov