@@ -61,7 +61,7 @@ static bool s2mpu02_volatile(struct device *dev, unsigned int reg)
}
}
-static const struct regmap_config sec_regmap_config = {
+static const struct regmap_config s2dos05_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
};
@@ -120,6 +120,11 @@ static const struct regmap_config s2mpu02_regmap_config = {
.cache_type = REGCACHE_FLAT,
};
+static const struct regmap_config s2mpu05_regmap_config = {
+ .reg_bits = 8,
+ .val_bits = 8,
+};
+
static const struct regmap_config s5m8767_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
@@ -138,6 +143,9 @@ static int sec_pmic_i2c_probe(struct i2c_client *client)
device_type = (unsigned long)of_device_get_match_data(&client->dev);
switch (device_type) {
+ case S2DOS05:
+ regmap = &s2dos05_regmap_config;
+ break;
case S2MPA01:
regmap = &s2mpa01_regmap_config;
break;
@@ -156,12 +164,16 @@ static int sec_pmic_i2c_probe(struct i2c_client *client)
case S2MPU02:
regmap = &s2mpu02_regmap_config;
break;
+ case S2MPU05:
+ regmap = &s2mpu05_regmap_config;
+ break;
case S5M8767X:
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);