Commit ddc239a4 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'regulator/fix/axp20x', 'regulator/fix/cpcap'...

Merge remote-tracking branches 'regulator/fix/axp20x', 'regulator/fix/cpcap' and 'regulator/fix/of' into regulator-linus
...@@ -691,6 +691,9 @@ static int axp20x_regulator_probe(struct platform_device *pdev) ...@@ -691,6 +691,9 @@ static int axp20x_regulator_probe(struct platform_device *pdev)
(regulators == axp809_regulators && i == AXP809_DC1SW)) { (regulators == axp809_regulators && i == AXP809_DC1SW)) {
new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc),
GFP_KERNEL); GFP_KERNEL);
if (!new_desc)
return -ENOMEM;
*new_desc = regulators[i]; *new_desc = regulators[i];
new_desc->supply_name = dcdc1_name; new_desc->supply_name = dcdc1_name;
desc = new_desc; desc = new_desc;
...@@ -700,6 +703,9 @@ static int axp20x_regulator_probe(struct platform_device *pdev) ...@@ -700,6 +703,9 @@ static int axp20x_regulator_probe(struct platform_device *pdev)
(regulators == axp809_regulators && i == AXP809_DC5LDO)) { (regulators == axp809_regulators && i == AXP809_DC5LDO)) {
new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc),
GFP_KERNEL); GFP_KERNEL);
if (!new_desc)
return -ENOMEM;
*new_desc = regulators[i]; *new_desc = regulators[i];
new_desc->supply_name = dcdc5_name; new_desc->supply_name = dcdc5_name;
desc = new_desc; desc = new_desc;
......
...@@ -77,6 +77,8 @@ ...@@ -77,6 +77,8 @@
#define CPCAP_BIT_VAUDIO_MODE0 BIT(1) #define CPCAP_BIT_VAUDIO_MODE0 BIT(1)
#define CPCAP_BIT_V_AUDIO_EN BIT(0) #define CPCAP_BIT_V_AUDIO_EN BIT(0)
#define CPCAP_BIT_AUDIO_NORMAL_MODE 0x00
/* /*
* Off mode configuration bit. Used currently only by SW5 on omap4. There's * Off mode configuration bit. Used currently only by SW5 on omap4. There's
* the following comment in Motorola Linux kernel tree for it: * the following comment in Motorola Linux kernel tree for it:
...@@ -217,7 +219,7 @@ static unsigned int cpcap_regulator_get_mode(struct regulator_dev *rdev) ...@@ -217,7 +219,7 @@ static unsigned int cpcap_regulator_get_mode(struct regulator_dev *rdev)
regmap_read(rdev->regmap, rdev->desc->enable_reg, &value); regmap_read(rdev->regmap, rdev->desc->enable_reg, &value);
if (!(value & CPCAP_BIT_AUDIO_LOW_PWR)) if (value & CPCAP_BIT_AUDIO_LOW_PWR)
return REGULATOR_MODE_STANDBY; return REGULATOR_MODE_STANDBY;
return REGULATOR_MODE_NORMAL; return REGULATOR_MODE_NORMAL;
...@@ -230,10 +232,10 @@ static int cpcap_regulator_set_mode(struct regulator_dev *rdev, ...@@ -230,10 +232,10 @@ static int cpcap_regulator_set_mode(struct regulator_dev *rdev,
switch (mode) { switch (mode) {
case REGULATOR_MODE_NORMAL: case REGULATOR_MODE_NORMAL:
value = CPCAP_BIT_AUDIO_LOW_PWR; value = CPCAP_BIT_AUDIO_NORMAL_MODE;
break; break;
case REGULATOR_MODE_STANDBY: case REGULATOR_MODE_STANDBY:
value = 0; value = CPCAP_BIT_AUDIO_LOW_PWR;
break; break;
default: default:
return -EINVAL; return -EINVAL;
......
...@@ -333,7 +333,7 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev, ...@@ -333,7 +333,7 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
search = of_get_child_by_name(dev->of_node, search = of_get_child_by_name(dev->of_node,
desc->regulators_node); desc->regulators_node);
else else
search = dev->of_node; search = of_node_get(dev->of_node);
if (!search) { if (!search) {
dev_dbg(dev, "Failed to find regulator container node '%s'\n", dev_dbg(dev, "Failed to find regulator container node '%s'\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment