summaryrefslogtreecommitdiff
path: root/drivers/mfd/axp20x-i2c.c
diff options
context:
space:
mode:
authorShengyu Qu <wiagn233@outlook.com>2023-04-21 18:08:15 +0300
committerLee Jones <lee@kernel.org>2023-04-26 17:25:25 +0300
commite0f8ad2a705367518b5c56bf9d6da89681467c02 (patch)
tree04b440db8144fb261ca2ca798da1f4e4e7b2687d /drivers/mfd/axp20x-i2c.c
parenta33c6a22f6d616caab6f5a5bfaa7ee01ea567d82 (diff)
downloadlinux-e0f8ad2a705367518b5c56bf9d6da89681467c02.tar.xz
mfd: axp20x: Add support for AXP15060 PMIC
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus. Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system. The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC. GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches. Signed-off-by: Shengyu Qu <wiagn233@outlook.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/TY3P286MB261162D57695AC8164ED50E298609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM
Diffstat (limited to 'drivers/mfd/axp20x-i2c.c')
-rw-r--r--drivers/mfd/axp20x-i2c.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mfd/axp20x-i2c.c b/drivers/mfd/axp20x-i2c.c
index f49fbd307958..b4f5cb457117 100644
--- a/drivers/mfd/axp20x-i2c.c
+++ b/drivers/mfd/axp20x-i2c.c
@@ -65,6 +65,7 @@ static const struct of_device_id axp20x_i2c_of_match[] = {
{ .compatible = "x-powers,axp223", .data = (void *)AXP223_ID },
{ .compatible = "x-powers,axp803", .data = (void *)AXP803_ID },
{ .compatible = "x-powers,axp806", .data = (void *)AXP806_ID },
+ { .compatible = "x-powers,axp15060", .data = (void *)AXP15060_ID },
{ },
};
MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match);
@@ -78,6 +79,7 @@ static const struct i2c_device_id axp20x_i2c_id[] = {
{ "axp223", 0 },
{ "axp803", 0 },
{ "axp806", 0 },
+ { "axp15060", 0 },
{ },
};
MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id);