[PATCH 17/34] mfd: sec: drop generic regmap config
André Draszik
andre.draszik at linaro.org
Sun Mar 23 15:39:33 PDT 2025
When support for PMICs without compatibles was removed in
commit f736d2c0caa8 ("mfd: sec: Remove PMICs without compatibles"),
sec_regmap_config effectively became an orphan, because S5M8763X was
the only user left of it before removal, using the default: case of the
switch statement.
Subsequently, the accidental new users have been updated, so
sec_regmap_config is an orphan again, and can and should be removed
from the code. Doing so will also ensure future additions to support
new devices in this driver don't forget to add a regmap config.
Drop this fallback regmap config.
Signed-off-by: André Draszik <andre.draszik at linaro.org>
---
drivers/mfd/sec-i2c.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/mfd/sec-i2c.c b/drivers/mfd/sec-i2c.c
index 3912baa5c2f918b7ad345e2bbbbe4daf2e49ca6d..1bdd6ea36fcd9f56ea5ec1159a87723f4c09a0bd 100644
--- a/drivers/mfd/sec-i2c.c
+++ b/drivers/mfd/sec-i2c.c
@@ -61,11 +61,6 @@ static bool s2mpu02_volatile(struct device *dev, unsigned int reg)
}
}
-static const struct regmap_config sec_regmap_config = {
- .reg_bits = 8,
- .val_bits = 8,
-};
-
static const struct regmap_config s2dos05_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
@@ -196,8 +191,9 @@ static int sec_pmic_i2c_probe(struct i2c_client *client)
regmap = &s5m8767_regmap_config;
break;
default:
- regmap = &sec_regmap_config;
- break;
+ return dev_err_probe(&client->dev, -ENODEV,
+ "Unsupported device type %lu\n",
+ device_type);
}
regmap_pmic = devm_regmap_init_i2c(client, regmap);
--
2.49.0.395.g12beb8f557-goog
More information about the linux-arm-kernel
mailing list