Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1235804 > unrolled thread
| Started by | Wenyou Yang <wenyou.yang@atmel.com> |
|---|---|
| First post | 2015-09-30 08:50 +0200 |
| Last post | 2015-09-30 09:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/2] regulator: act8865: support output voltage by VSET2[] bits Wenyou Yang <wenyou.yang@atmel.com> - 2015-09-30 08:50 +0200
Re: [PATCH 1/2] regulator: act8865: support output voltage by VSET2[] bits kbuild test robot <lkp@intel.com> - 2015-09-30 09:00 +0200
| From | Wenyou Yang <wenyou.yang@atmel.com> |
|---|---|
| Date | 2015-09-30 08:50 +0200 |
| Subject | [PATCH 1/2] regulator: act8865: support output voltage by VSET2[] bits |
| Message-ID | <qejnb-5B6-15@gated-at.bofh.it> |
For the step-down DC/DC regulators, the output voltage is
selectable by setting VSEL pin that when VSEL is low, output
voltage is programmed by VSET1[] bits, and when VSEL is high,
output voltage is programmed by VSET2[] bits.
The DT property "active-semi,vsel-high" is used to specify
the VSEL pin at high on the board.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
drivers/regulator/act8865-regulator.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c
index 896db16..e2b50f3 100644
--- a/drivers/regulator/act8865-regulator.c
+++ b/drivers/regulator/act8865-regulator.c
@@ -261,6 +261,16 @@ static const struct regulator_desc act8865_regulators[] = {
ACT88xx_REG("LDO_REG4", ACT8865, LDO4, VSET, "inl67"),
};
+static const struct regulator_desc act8865_alt_regulators[] = {
+ ACT88xx_REG("DCDC_REG1", ACT8865, DCDC1, VSET2),
+ ACT88xx_REG("DCDC_REG2", ACT8865, DCDC2, VSET2),
+ ACT88xx_REG("DCDC_REG3", ACT8865, DCDC3, VSET2),
+ ACT88xx_REG("LDO_REG1", ACT8865, LDO1, VSET),
+ ACT88xx_REG("LDO_REG2", ACT8865, LDO2, VSET),
+ ACT88xx_REG("LDO_REG3", ACT8865, LDO3, VSET),
+ ACT88xx_REG("LDO_REG4", ACT8865, LDO4, VSET),
+};
+
#ifdef CONFIG_OF
static const struct of_device_id act8865_dt_ids[] = {
{ .compatible = "active-semi,act8600", .data = (void *)ACT8600 },
@@ -413,6 +423,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
struct act8865 *act8865;
unsigned long type;
int off_reg, off_mask;
+ int voltage_select;
pdata = dev_get_platdata(dev);
@@ -424,6 +435,10 @@ static int act8865_pmic_probe(struct i2c_client *client,
return -ENODEV;
type = (unsigned long) id->data;
+
+ voltage_select = !!of_get_property(dev->of_node,
+ "active-semi,vsel-high",
+ NULL);
} else {
type = i2c_id->driver_data;
}
@@ -442,8 +457,13 @@ static int act8865_pmic_probe(struct i2c_client *client,
off_mask = ACT8846_OFF_SYSMASK;
break;
case ACT8865:
- regulators = act8865_regulators;
- num_regulators = ARRAY_SIZE(act8865_regulators);
+ if (voltage_select) {
+ regulators = act8865_alt_regulators;
+ num_regulators = ARRAY_SIZE(act8865_alt_regulators);
+ } else {
+ regulators = act8865_regulators;
+ num_regulators = ARRAY_SIZE(act8865_regulators);
+ }
off_reg = ACT8865_SYS_CTRL;
off_mask = ACT8865_MSTROFF;
break;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2015-09-30 09:00 +0200 |
| Subject | Re: [PATCH 1/2] regulator: act8865: support output voltage by VSET2[] bits |
| Message-ID | <qejwT-5Mf-21@gated-at.bofh.it> |
| In reply to | #1235804 |
[Multipart message — attachments visible in raw view] — view raw
Hi Wenyou,
[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]
config: i386-randconfig-r0-201539 (attached as .config)
reproduce:
git checkout 2470179cdcc3b8eebdb6abd5aecbbe6e2804fb33
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (new ones prefixed by >>):
>> drivers/regulator/act8865-regulator.c:265:48: error: macro "ACT88xx_REG" requires 5 arguments, but only 4 given
ACT88xx_REG("DCDC_REG1", ACT8865, DCDC1, VSET2),
^
>> drivers/regulator/act8865-regulator.c:265:2: error: 'ACT88xx_REG' undeclared here (not in a function)
ACT88xx_REG("DCDC_REG1", ACT8865, DCDC1, VSET2),
^
drivers/regulator/act8865-regulator.c:266:48: error: macro "ACT88xx_REG" requires 5 arguments, but only 4 given
ACT88xx_REG("DCDC_REG2", ACT8865, DCDC2, VSET2),
^
drivers/regulator/act8865-regulator.c:267:48: error: macro "ACT88xx_REG" requires 5 arguments, but only 4 given
ACT88xx_REG("DCDC_REG3", ACT8865, DCDC3, VSET2),
^
drivers/regulator/act8865-regulator.c:268:45: error: macro "ACT88xx_REG" requires 5 arguments, but only 4 given
ACT88xx_REG("LDO_REG1", ACT8865, LDO1, VSET),
^
drivers/regulator/act8865-regulator.c:269:45: error: macro "ACT88xx_REG" requires 5 arguments, but only 4 given
ACT88xx_REG("LDO_REG2", ACT8865, LDO2, VSET),
^
drivers/regulator/act8865-regulator.c:270:45: error: macro "ACT88xx_REG" requires 5 arguments, but only 4 given
ACT88xx_REG("LDO_REG3", ACT8865, LDO3, VSET),
^
drivers/regulator/act8865-regulator.c:271:45: error: macro "ACT88xx_REG" requires 5 arguments, but only 4 given
ACT88xx_REG("LDO_REG4", ACT8865, LDO4, VSET),
^
vim +/ACT88xx_REG +265 drivers/regulator/act8865-regulator.c
259 ACT88xx_REG("LDO_REG2", ACT8865, LDO2, VSET, "inl45"),
260 ACT88xx_REG("LDO_REG3", ACT8865, LDO3, VSET, "inl67"),
261 ACT88xx_REG("LDO_REG4", ACT8865, LDO4, VSET, "inl67"),
262 };
263
264 static const struct regulator_desc act8865_alt_regulators[] = {
> 265 ACT88xx_REG("DCDC_REG1", ACT8865, DCDC1, VSET2),
266 ACT88xx_REG("DCDC_REG2", ACT8865, DCDC2, VSET2),
267 ACT88xx_REG("DCDC_REG3", ACT8865, DCDC3, VSET2),
268 ACT88xx_REG("LDO_REG1", ACT8865, LDO1, VSET),
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web