From 79b53d199b83a44811cd57091751ef122351ae85 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Tue, 10 Dec 2013 10:09:42 +0100 Subject: regulator: s5m8767: Define symbol for buck control mask Replace hard-coded value for mask used in BUCKX_CTRL registers (for BUCKX_EN field) with a symbol. This also removes two local variables. Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones Reviewed-by: Sachin Kamat Signed-off-by: Mark Brown --- include/linux/mfd/samsung/s5m8767.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux/mfd') diff --git a/include/linux/mfd/samsung/s5m8767.h b/include/linux/mfd/samsung/s5m8767.h index 306a95fc558c..9198377ee859 100644 --- a/include/linux/mfd/samsung/s5m8767.h +++ b/include/linux/mfd/samsung/s5m8767.h @@ -183,6 +183,7 @@ enum s5m8767_regulators { S5M8767_REG_MAX, }; -#define S5M8767_ENCTRL_SHIFT 6 +#define S5M8767_ENCTRL_SHIFT 6 +#define S5M8767_ENCTRL_MASK (0x3 << S5M8767_ENCTRL_SHIFT) #endif /* __LINUX_MFD_S5M8767_H */ -- cgit v1.2.3 From f37ff6b6ab9bff6f78dbfbdd123673a09e04cb7f Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Tue, 17 Dec 2013 14:23:17 +0100 Subject: regulator: s5m8767: Add symbols for hard-coded DVS_RAMP register Add symbols for hard-coded values of BUCK_RAMP field in DVS_RAMP register. This simplifies a little the code as register update is called only once. Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones Signed-off-by: Mark Brown --- drivers/regulator/s5m8767.c | 22 ++++++++++------------ include/linux/mfd/samsung/s5m8767.h | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) (limited to 'include/linux/mfd') diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index 9b14faa3bf91..27741df28ad7 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c @@ -881,31 +881,29 @@ static int s5m8767_pmic_probe(struct platform_device *pdev) if (s5m8767->buck2_ramp || s5m8767->buck3_ramp || s5m8767->buck4_ramp) { + unsigned int val; switch (s5m8767->ramp_delay) { case 5: - sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, - 0x40, 0xf0); + val = S5M8767_DVS_BUCK_RAMP_5; break; case 10: - sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, - 0x90, 0xf0); + val = S5M8767_DVS_BUCK_RAMP_10; break; case 25: - sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, - 0xd0, 0xf0); + val = S5M8767_DVS_BUCK_RAMP_25; break; case 50: - sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, - 0xe0, 0xf0); + val = S5M8767_DVS_BUCK_RAMP_50; break; case 100: - sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, - 0xf0, 0xf0); + val = S5M8767_DVS_BUCK_RAMP_100; break; default: - sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, - 0x90, 0xf0); + val = S5M8767_DVS_BUCK_RAMP_10; } + sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, + val << S5M8767_DVS_BUCK_RAMP_SHIFT, + S5M8767_DVS_BUCK_RAMP_MASK); } for (i = 0; i < pdata->num_regulators; i++) { diff --git a/include/linux/mfd/samsung/s5m8767.h b/include/linux/mfd/samsung/s5m8767.h index 9198377ee859..2ab0b0f03641 100644 --- a/include/linux/mfd/samsung/s5m8767.h +++ b/include/linux/mfd/samsung/s5m8767.h @@ -186,4 +186,19 @@ enum s5m8767_regulators { #define S5M8767_ENCTRL_SHIFT 6 #define S5M8767_ENCTRL_MASK (0x3 << S5M8767_ENCTRL_SHIFT) +/* + * Values for BUCK_RAMP field in DVS_RAMP register, matching raw values + * in mV/us. + */ +enum s5m8767_dvs_buck_ramp_values { + S5M8767_DVS_BUCK_RAMP_5 = 0x4, + S5M8767_DVS_BUCK_RAMP_10 = 0x9, + S5M8767_DVS_BUCK_RAMP_12_5 = 0xb, + S5M8767_DVS_BUCK_RAMP_25 = 0xd, + S5M8767_DVS_BUCK_RAMP_50 = 0xe, + S5M8767_DVS_BUCK_RAMP_100 = 0xf, +}; +#define S5M8767_DVS_BUCK_RAMP_SHIFT 4 +#define S5M8767_DVS_BUCK_RAMP_MASK (0xf << S5M8767_DVS_BUCK_RAMP_SHIFT) + #endif /* __LINUX_MFD_S5M8767_H */ -- cgit v1.2.3 From ee5182b59f65e7975d8fec73d511f4d6c44f6ed3 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Tue, 17 Dec 2013 14:23:19 +0100 Subject: mfd: sec: Remove sec_reg* regmap helpers Remove sec_reg* helpers as they are not used anymore. These helpers were error-prone as they mixed u8 with unsigned int and they changed order of some of parameters (val and mask in sec_reg_update()). Also the helpers didn't give any way of useful abstraction as they just called corresponding regmap function. Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones Signed-off-by: Mark Brown --- drivers/mfd/sec-core.c | 30 ------------------------------ include/linux/mfd/samsung/core.h | 6 ------ 2 files changed, 36 deletions(-) (limited to 'include/linux/mfd') diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 54cc25546592..1d158d5ba8b8 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -79,36 +79,6 @@ static struct of_device_id sec_dt_match[] = { }; #endif -int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest) -{ - return regmap_read(sec_pmic->regmap_pmic, reg, dest); -} -EXPORT_SYMBOL_GPL(sec_reg_read); - -int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf) -{ - return regmap_bulk_read(sec_pmic->regmap_pmic, reg, buf, count); -} -EXPORT_SYMBOL_GPL(sec_bulk_read); - -int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value) -{ - return regmap_write(sec_pmic->regmap_pmic, reg, value); -} -EXPORT_SYMBOL_GPL(sec_reg_write); - -int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf) -{ - return regmap_raw_write(sec_pmic->regmap_pmic, reg, buf, count); -} -EXPORT_SYMBOL_GPL(sec_bulk_write); - -int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask) -{ - return regmap_update_bits(sec_pmic->regmap_pmic, reg, mask, val); -} -EXPORT_SYMBOL_GPL(sec_reg_update); - static bool s2mps11_volatile(struct device *dev, unsigned int reg) { switch (reg) { diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index cab2dd279076..41c9bde410c5 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h @@ -59,12 +59,6 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic); void sec_irq_exit(struct sec_pmic_dev *sec_pmic); int sec_irq_resume(struct sec_pmic_dev *sec_pmic); -extern int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest); -extern int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf); -extern int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value); -extern int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf); -extern int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask); - struct sec_platform_data { struct sec_regulator_data *regulators; struct sec_opmode_data *opmode; -- cgit v1.2.3 From 03746dcbde75fc2b0ee8a9d65e3fb3efee8deb4a Mon Sep 17 00:00:00 2001 From: Markus Pargmann Date: Fri, 20 Dec 2013 12:43:27 +0100 Subject: regulator: tps65910: Add backup battery regulator tps65910 has a backup battery charger with a configurable voltage. This patch adds a regulator for the backup battery. Signed-off-by: Markus Pargmann Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/mfd/tps65910.txt | 4 +- drivers/regulator/tps65910-regulator.c | 56 +++++++++++++++++++++- include/linux/mfd/tps65910.h | 3 +- 3 files changed, 59 insertions(+), 4 deletions(-) (limited to 'include/linux/mfd') diff --git a/Documentation/devicetree/bindings/mfd/tps65910.txt b/Documentation/devicetree/bindings/mfd/tps65910.txt index 2e3304888ffc..b4bd98af1cc7 100644 --- a/Documentation/devicetree/bindings/mfd/tps65910.txt +++ b/Documentation/devicetree/bindings/mfd/tps65910.txt @@ -21,7 +21,7 @@ Required properties: The valid regulator-compatible values are: tps65910: vrtc, vio, vdd1, vdd2, vdd3, vdig1, vdig2, vpll, vdac, vaux1, - vaux2, vaux33, vmmc + vaux2, vaux33, vmmc, vbb tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5, ldo6, ldo7, ldo8 @@ -38,7 +38,7 @@ Required properties: vcc4-supply: VAUX1 and VAUX2 input. vcc5-supply: VPLL and VDAC input. vcc6-supply: VDIG1 and VDIG2 input. - vcc7-supply: VRTC input. + vcc7-supply: VRTC and VBB input. vccio-supply: VIO input. tps65911: vcc1-supply: VDD1 input. diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index a00132e31ec7..979ea0a99a79 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c @@ -88,6 +88,11 @@ static const unsigned int VMMC_VSEL_table[] = { 1800000, 2800000, 3000000, 3300000, }; +/* supported BBCH voltages in microvolts */ +static const unsigned int VBB_VSEL_table[] = { + 3000000, 2520000, 3150000, 5000000, +}; + struct tps_info { const char *name; const char *vin_name; @@ -183,6 +188,12 @@ static struct tps_info tps65910_regs[] = { .voltage_table = VMMC_VSEL_table, .enable_time_us = 100, }, + { + .name = "vbb", + .vin_name = "vcc7", + .n_voltages = ARRAY_SIZE(VBB_VSEL_table), + .voltage_table = VBB_VSEL_table, + }, }; static struct tps_info tps65911_regs[] = { @@ -339,6 +350,8 @@ static int tps65910_get_ctrl_register(int id) return TPS65910_VAUX33; case TPS65910_REG_VMMC: return TPS65910_VMMC; + case TPS65910_REG_VBB: + return TPS65910_BBCH; default: return -EINVAL; } @@ -528,6 +541,10 @@ static int tps65910_get_voltage_sel(struct regulator_dev *dev) value &= LDO_SEL_MASK; value >>= LDO_SEL_SHIFT; break; + case TPS65910_REG_VBB: + value &= BBCH_BBSEL_MASK; + value >>= BBCH_BBSEL_SHIFT; + break; default: return -EINVAL; } @@ -638,6 +655,9 @@ static int tps65910_set_voltage_sel(struct regulator_dev *dev, case TPS65910_REG_VMMC: return tps65910_reg_update_bits(pmic->mfd, reg, LDO_SEL_MASK, selector << LDO_SEL_SHIFT); + case TPS65910_REG_VBB: + return tps65910_reg_update_bits(pmic->mfd, reg, BBCH_BBSEL_MASK, + selector << BBCH_BBSEL_SHIFT); } return -EINVAL; @@ -669,6 +689,9 @@ static int tps65911_set_voltage_sel(struct regulator_dev *dev, case TPS65910_REG_VIO: return tps65910_reg_update_bits(pmic->mfd, reg, LDO_SEL_MASK, selector << LDO_SEL_SHIFT); + case TPS65910_REG_VBB: + return tps65910_reg_update_bits(pmic->mfd, reg, BBCH_BBSEL_MASK, + selector << BBCH_BBSEL_SHIFT); } return -EINVAL; @@ -762,6 +785,18 @@ static struct regulator_ops tps65910_ops_vdd3 = { .map_voltage = regulator_map_voltage_ascend, }; +static struct regulator_ops tps65910_ops_vbb = { + .is_enabled = regulator_is_enabled_regmap, + .enable = regulator_enable_regmap, + .disable = regulator_disable_regmap, + .set_mode = tps65910_set_mode, + .get_mode = tps65910_get_mode, + .get_voltage_sel = tps65910_get_voltage_sel, + .set_voltage_sel = tps65910_set_voltage_sel, + .list_voltage = regulator_list_voltage_table, + .map_voltage = regulator_map_voltage_iterate, +}; + static struct regulator_ops tps65910_ops = { .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, @@ -944,6 +979,7 @@ static struct of_regulator_match tps65910_matches[] = { { .name = "vaux2", .driver_data = (void *) &tps65910_regs[10] }, { .name = "vaux33", .driver_data = (void *) &tps65910_regs[11] }, { .name = "vmmc", .driver_data = (void *) &tps65910_regs[12] }, + { .name = "vbb", .driver_data = (void *) &tps65910_regs[13] }, }; static struct of_regulator_match tps65911_matches[] = { @@ -1145,6 +1181,10 @@ static int tps65910_probe(struct platform_device *pdev) pmic->desc[i].ops = &tps65910_ops_dcdc; pmic->desc[i].ramp_delay = 5000; } + } else if (i == TPS65910_REG_VBB && + tps65910_chip_id(tps65910) == TPS65910) { + pmic->desc[i].ops = &tps65910_ops_vbb; + pmic->desc[i].volt_table = info->voltage_table; } else { if (tps65910_chip_id(tps65910) == TPS65910) { pmic->desc[i].ops = &tps65910_ops; @@ -1167,7 +1207,21 @@ static int tps65910_probe(struct platform_device *pdev) pmic->desc[i].type = REGULATOR_VOLTAGE; pmic->desc[i].owner = THIS_MODULE; pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i); - pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED; + + switch (i) { + case TPS65910_REG_VBB: + if (tps65910_chip_id(tps65910) == TPS65910) + pmic->desc[i].enable_mask = BBCH_BBCHEN_MASK; + else + pmic->desc[i].enable_mask = + TPS65910_SUPPLY_STATE_ENABLED; + break; + + default: + pmic->desc[i].enable_mask = + TPS65910_SUPPLY_STATE_ENABLED; + break; + } config.dev = tps65910->dev; config.init_data = reg_data; diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index 20e433e551e3..1adeee186194 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h @@ -833,6 +833,7 @@ #define TPS65910_REG_VAUX2 10 #define TPS65910_REG_VAUX33 11 #define TPS65910_REG_VMMC 12 +#define TPS65910_REG_VBB 13 #define TPS65911_REG_VDDCTRL 4 #define TPS65911_REG_LDO1 5 @@ -845,7 +846,7 @@ #define TPS65911_REG_LDO8 12 /* Max number of TPS65910/11 regulators */ -#define TPS65910_NUM_REGS 13 +#define TPS65910_NUM_REGS 14 /* External sleep controls through EN1/EN2/EN3/SLEEP inputs */ #define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 0x1 -- cgit v1.2.3 From b8903eb9836e4e968d1bf9758b501de2c38cfb83 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 29 Dec 2013 17:00:20 +0800 Subject: regulator: tps65910: Simplify setting enable_mask for regulators BBCH_BBCHEN_MASK is equivalent to TPS65910_SUPPLY_STATE_ENABLED. So all regulators have the same enable_mask setting. BBCH_BBCHEN_MASK and BBCH_BBCHEN_SHIFT are not used now, remove them. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- drivers/regulator/tps65910-regulator.c | 16 +--------------- include/linux/mfd/tps65910.h | 2 -- 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'include/linux/mfd') diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 979ea0a99a79..f50dd847eebc 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c @@ -1207,21 +1207,7 @@ static int tps65910_probe(struct platform_device *pdev) pmic->desc[i].type = REGULATOR_VOLTAGE; pmic->desc[i].owner = THIS_MODULE; pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i); - - switch (i) { - case TPS65910_REG_VBB: - if (tps65910_chip_id(tps65910) == TPS65910) - pmic->desc[i].enable_mask = BBCH_BBCHEN_MASK; - else - pmic->desc[i].enable_mask = - TPS65910_SUPPLY_STATE_ENABLED; - break; - - default: - pmic->desc[i].enable_mask = - TPS65910_SUPPLY_STATE_ENABLED; - break; - } + pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED; config.dev = tps65910->dev; config.init_data = reg_data; diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index 1adeee186194..16c2335c2856 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h @@ -358,8 +358,6 @@ /*Register BBCH (0x80) register.RegisterDescription */ #define BBCH_BBSEL_MASK 0x06 #define BBCH_BBSEL_SHIFT 1 -#define BBCH_BBCHEN_MASK 0x01 -#define BBCH_BBCHEN_SHIFT 0 /*Register DCDCCTRL (0x80) register.RegisterDescription */ -- cgit v1.2.3 From 762a8ee808972354ce4bca988309aa7fb63ed5ae Mon Sep 17 00:00:00 2001 From: Andrew Bresticker Date: Thu, 26 Dec 2013 13:48:46 -0800 Subject: regulator: as3722: detect SD0 low-voltage mode SD0 may operate in low-voltage mode, with a minimum of 0.41V and a maximum of 1.5V. This is indicated by bit 4 of FUSE7. Signed-off-by: Andrew Bresticker Signed-off-by: Vince Hsu broonie.e6264@m.evernote.com Signed-off-by: Mark Brown --- drivers/regulator/as3722-regulator.c | 30 ++++++++++++++++++++++++++---- include/linux/mfd/as3722.h | 4 ++++ 2 files changed, 30 insertions(+), 4 deletions(-) (limited to 'include/linux/mfd') diff --git a/drivers/regulator/as3722-regulator.c b/drivers/regulator/as3722-regulator.c index fdb31371a232..3d7fbc21181d 100644 --- a/drivers/regulator/as3722-regulator.c +++ b/drivers/regulator/as3722-regulator.c @@ -99,7 +99,6 @@ static const struct as3722_register_mapping as3722_reg_lookup[] = { .sleep_ctrl_mask = AS3722_SD0_EXT_ENABLE_MASK, .control_reg = AS3722_SD0_CONTROL_REG, .mode_mask = AS3722_SD0_MODE_FAST, - .n_voltages = AS3722_SD0_VSEL_MAX + 1, }, { .regulator_id = AS3722_REGULATOR_ID_SD1, @@ -112,7 +111,6 @@ static const struct as3722_register_mapping as3722_reg_lookup[] = { .sleep_ctrl_mask = AS3722_SD1_EXT_ENABLE_MASK, .control_reg = AS3722_SD1_CONTROL_REG, .mode_mask = AS3722_SD1_MODE_FAST, - .n_voltages = AS3722_SD0_VSEL_MAX + 1, }, { .regulator_id = AS3722_REGULATOR_ID_SD2, @@ -181,7 +179,6 @@ static const struct as3722_register_mapping as3722_reg_lookup[] = { .sleep_ctrl_mask = AS3722_SD6_EXT_ENABLE_MASK, .control_reg = AS3722_SD6_CONTROL_REG, .mode_mask = AS3722_SD6_MODE_FAST, - .n_voltages = AS3722_SD0_VSEL_MAX + 1, }, { .regulator_id = AS3722_REGULATOR_ID_LDO0, @@ -595,6 +592,22 @@ static int as3722_sd016_set_current_limit(struct regulator_dev *rdev, return as3722_update_bits(as3722, reg, mask, val); } +static bool as3722_sd0_is_low_voltage(struct as3722_regulators *as3722_regs) +{ + int err; + unsigned val; + + err = as3722_read(as3722_regs->as3722, AS3722_FUSE7_REG, &val); + if (err < 0) { + dev_err(as3722_regs->dev, "Reg 0x%02x read failed: %d\n", + AS3722_FUSE7_REG, err); + return false; + } + if (val & AS3722_FUSE7_SD0_LOW_VOLTAGE) + return true; + return false; +} + static const struct regulator_linear_range as3722_sd2345_ranges[] = { REGULATOR_LINEAR_RANGE(612500, 0x01, 0x40, 12500), REGULATOR_LINEAR_RANGE(1425000, 0x41, 0x70, 25000), @@ -820,7 +833,16 @@ static int as3722_regulator_probe(struct platform_device *pdev) ops = &as3722_sd016_extcntrl_ops; else ops = &as3722_sd016_ops; - as3722_regs->desc[id].min_uV = 610000; + if (id == AS3722_REGULATOR_ID_SD0 && + as3722_sd0_is_low_voltage(as3722_regs)) { + as3722_regs->desc[id].n_voltages = + AS3722_SD0_VSEL_LOW_VOL_MAX + 1; + as3722_regs->desc[id].min_uV = 410000; + } else { + as3722_regs->desc[id].n_voltages = + AS3722_SD0_VSEL_MAX + 1, + as3722_regs->desc[id].min_uV = 610000; + } as3722_regs->desc[id].uV_step = 10000; as3722_regs->desc[id].linear_min_sel = 1; break; diff --git a/include/linux/mfd/as3722.h b/include/linux/mfd/as3722.h index 16bf8a0dcd97..bb9616dc0efa 100644 --- a/include/linux/mfd/as3722.h +++ b/include/linux/mfd/as3722.h @@ -151,6 +151,7 @@ #define AS3722_ASIC_ID1_REG 0x90 #define AS3722_ASIC_ID2_REG 0x91 #define AS3722_LOCK_REG 0x9E +#define AS3722_FUSE7_REG 0xA7 #define AS3722_MAX_REGISTER 0xF4 #define AS3722_SD0_EXT_ENABLE_MASK 0x03 @@ -224,6 +225,7 @@ #define AS3722_SD_VSEL_MASK 0x7F #define AS3722_SD0_VSEL_MIN 0x01 #define AS3722_SD0_VSEL_MAX 0x5A +#define AS3722_SD0_VSEL_LOW_VOL_MAX 0x6E #define AS3722_SD2_VSEL_MIN 0x01 #define AS3722_SD2_VSEL_MAX 0x7F @@ -341,6 +343,8 @@ #define AS3722_EXT_CONTROL_ENABLE2 0x2 #define AS3722_EXT_CONTROL_ENABLE3 0x3 +#define AS3722_FUSE7_SD0_LOW_VOLTAGE BIT(4) + /* Interrupt IDs */ enum as3722_irq { AS3722_IRQ_LID, -- cgit v1.2.3