regulator: sy8824x: add SY8824E support
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Tue, 27 Aug 2019 08:47:30 +0000 (08:47 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 27 Aug 2019 19:46:12 +0000 (20:46 +0100)
The only difference between SY8824E and SY8824C/D is the vsel_min.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20190827163537.52023c4e@xhacker.debian
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/Kconfig
drivers/regulator/sy8824x.c

index e2bf936d0be65e6fa8bfff651426b3dbca8ef4c6..2e50423b3c0803bda16f639205729fff9632f7c8 100644 (file)
@@ -908,7 +908,7 @@ config REGULATOR_SY8106A
          This driver supports SY8106A single output regulator.
 
 config REGULATOR_SY8824X
-       tristate "Silergy SY8824C regulator"
+       tristate "Silergy SY8824C/SY8824E regulator"
        depends on I2C && (OF || COMPILE_TEST)
        select REGMAP_I2C
        help
index 2d8a61ca664394cddec02e849600271f3ce4df75..b1438d94eee2e4c152c46bd7eb396d4ab88f6f74 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * SY8824C regulator driver
+ * SY8824C/SY8824E regulator driver
  *
  * Copyright (C) 2019 Synaptics Incorporated
  *
@@ -162,11 +162,24 @@ static const struct sy8824_config sy8824c_cfg = {
        .vsel_count = 64,
 };
 
+static const struct sy8824_config sy8824e_cfg = {
+       .vol_reg = 0x00,
+       .mode_reg = 0x00,
+       .enable_reg = 0x00,
+       .vsel_min = 700000,
+       .vsel_step = 12500,
+       .vsel_count = 64,
+};
+
 static const struct of_device_id sy8824_dt_ids[] = {
        {
                .compatible = "silergy,sy8824c",
                .data = &sy8824c_cfg
        },
+       {
+               .compatible = "silergy,sy8824e",
+               .data = &sy8824e_cfg
+       },
        { }
 };
 MODULE_DEVICE_TABLE(of, sy8824_dt_ids);
@@ -188,5 +201,5 @@ static struct i2c_driver sy8824_regulator_driver = {
 module_i2c_driver(sy8824_regulator_driver);
 
 MODULE_AUTHOR("Jisheng Zhang <jszhang@kernel.org>");
-MODULE_DESCRIPTION("SY8824C regulator driver");
+MODULE_DESCRIPTION("SY8824C/SY8824E regulator driver");
 MODULE_LICENSE("GPL v2");