generic: 6.1: backport AXP PMIC support
[openwrt/staging/stintel.git] / target / linux / generic / backport-6.1 / 882-v6.3-mfd-axp20x-Fix-axp288-writable-ranges.patch
1 From 2405fbfb384ef39e9560d76d3f6e4c90519f90aa Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Wed, 29 Mar 2023 22:55:44 +0200
4 Subject: [PATCH] mfd: axp20x: Fix axp288 writable-ranges
5
6 Register AXP288_POWER_REASON is writable and needs to be written
7 to reset the reset- / power-on-reason bits.
8
9 Add it to the axp288 writable-ranges so that the extcon-axp288
10 driver can properly clear the reset- / power-on-reason bits.
11
12 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 Signed-off-by: Lee Jones <lee@kernel.org>
14 Link: https://lore.kernel.org/r/20230329205544.1051393-1-hdegoede@redhat.com
15 ---
16 drivers/mfd/axp20x.c | 1 +
17 1 file changed, 1 insertion(+)
18
19 --- a/drivers/mfd/axp20x.c
20 +++ b/drivers/mfd/axp20x.c
21 @@ -119,6 +119,7 @@ static const struct regmap_access_table
22
23 /* AXP288 ranges are shared with the AXP803, as they cover the same range */
24 static const struct regmap_range axp288_writeable_ranges[] = {
25 + regmap_reg_range(AXP288_POWER_REASON, AXP288_POWER_REASON),
26 regmap_reg_range(AXP20X_DATACACHE(0), AXP20X_IRQ6_STATE),
27 regmap_reg_range(AXP20X_DCDC_MODE, AXP288_FG_TUNE5),
28 };