Re: [PATCH 3/5] mfd: axp20x: AXP717: Add AXP717_TS_PIN_CFG to writeable regs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 1, 2025 at 7:17 AM Chris Morgan <macroalpha82@xxxxxxxxx> wrote:
>
> From: Chris Morgan <macromorgan@xxxxxxxxxxx>
>
> Add AXP717_TS_PIN_CFG (register 0x50) to the table of writeable
> registers so that the temperature sensor can be configured by the
> battery driver.
>
> Signed-off-by: Chris Morgan <macromorgan@xxxxxxxxxxx>
> ---
>  drivers/mfd/axp20x.c       | 2 +-
>  include/linux/mfd/axp20x.h | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index cff56deba24f..baf51dea98b0 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c
> @@ -222,7 +222,7 @@ static const struct regmap_range axp717_writeable_ranges[] = {
>         regmap_reg_range(AXP717_PMU_FAULT, AXP717_MODULE_EN_CONTROL_1),
>         regmap_reg_range(AXP717_MIN_SYS_V_CONTROL, AXP717_BOOST_CONTROL),
>         regmap_reg_range(AXP717_VSYS_V_POWEROFF, AXP717_VSYS_V_POWEROFF),
> -       regmap_reg_range(AXP717_IRQ0_EN, AXP717_IRQ4_EN),
> +       regmap_reg_range(AXP717_IRQ0_EN, AXP717_TS_PIN_CFG),

Please add a separate entry. As you can see immediately below,
there is a separate entry for the IRQ status registers. We're
not allowing writes to unknown registers.

ChenYu

>         regmap_reg_range(AXP717_IRQ0_STATE, AXP717_IRQ4_STATE),
>         regmap_reg_range(AXP717_ICC_CHG_SET, AXP717_CV_CHG_SET),
>         regmap_reg_range(AXP717_DCDC_OUTPUT_CONTROL, AXP717_CPUSLDO_CONTROL),
> diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
> index c3df0e615fbf..3c5aecf1d4b5 100644
> --- a/include/linux/mfd/axp20x.h
> +++ b/include/linux/mfd/axp20x.h
> @@ -137,6 +137,7 @@ enum axp20x_variants {
>  #define AXP717_IRQ2_STATE              0x4a
>  #define AXP717_IRQ3_STATE              0x4b
>  #define AXP717_IRQ4_STATE              0x4c
> +#define AXP717_TS_PIN_CFG              0x50
>  #define AXP717_ICC_CHG_SET             0x62
>  #define AXP717_ITERM_CHG_SET           0x63
>  #define AXP717_CV_CHG_SET              0x64
> --
> 2.43.0
>
>





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux