summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDzmitry Sankouski <dsankouski@gmail.com>2025-01-23 18:04:29 +0300
committerLee Jones <lee@kernel.org>2025-02-20 16:37:33 +0000
commit7b591ef98b3fc1ce20c3ccb86715429b72e2e6f0 (patch)
tree827bff4b17bcef91511431686081b8d39c82a112
parenta6a494c8e3ce1fe84aac538b087a4cab868ed83f (diff)
mfd: simple-mfd-i2c: Add MAX77705 support
Add MAX77705 support - fuel gauge and hwmon devices. Hwmon provides charger input and system bus measurements. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250123-starqltechn_integration_upstream-v17-4-8b06685b6612@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r--drivers/mfd/simple-mfd-i2c.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
index 6eda79533208..22159913bea0 100644
--- a/drivers/mfd/simple-mfd-i2c.c
+++ b/drivers/mfd/simple-mfd-i2c.c
@@ -83,11 +83,22 @@ static const struct simple_mfd_data maxim_max5970 = {
.mfd_cell_size = ARRAY_SIZE(max5970_cells),
};
+static const struct mfd_cell max77705_sensor_cells[] = {
+ { .name = "max77705-battery" },
+ { .name = "max77705-hwmon", },
+};
+
+static const struct simple_mfd_data maxim_mon_max77705 = {
+ .mfd_cell = max77705_sensor_cells,
+ .mfd_cell_size = ARRAY_SIZE(max77705_sensor_cells),
+};
+
static const struct of_device_id simple_mfd_i2c_of_match[] = {
{ .compatible = "kontron,sl28cpld" },
{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
{ .compatible = "maxim,max5970", .data = &maxim_max5970},
{ .compatible = "maxim,max5978", .data = &maxim_max5970},
+ { .compatible = "maxim,max77705-battery", .data = &maxim_mon_max77705},
{}
};
MODULE_DEVICE_TABLE(of, simple_mfd_i2c_of_match);