Commit 905373b6 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'regulator/fix/ad5398', 'regulator/fix/da9210',...

Merge remote-tracking branches 'regulator/fix/ad5398', 'regulator/fix/da9210', 'regulator/fix/max77802' and 'regulator/fix/pv88090' into regulator-linus
......@@ -60,7 +60,7 @@ The possible values for "regulator-initial-mode" and "regulator-mode" are:
1: Normal regulator voltage output mode.
3: Low Power which reduces the quiescent current down to only 1uA
The list of valid modes are defined in the dt-bindings/clock/maxim,max77802.h
The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h
header and can be included by device tree source files.
The standard "regulator-mode" property can only be used for regulators that
......
......@@ -58,10 +58,12 @@ static int ad5398_write_reg(struct i2c_client *client, const unsigned short data
val = cpu_to_be16(data);
ret = i2c_master_send(client, (char *)&val, 2);
if (ret < 0)
if (ret != 2) {
dev_err(&client->dev, "I2C write error\n");
return ret < 0 ? ret : -EIO;
}
return ret;
return 0;
}
static int ad5398_get_current_limit(struct regulator_dev *rdev)
......
......@@ -132,6 +132,8 @@ static irqreturn_t da9210_irq_handler(int irq, void *data)
if (error < 0)
goto error_i2c;
mutex_lock(&chip->rdev->mutex);
if (val & DA9210_E_OVCURR) {
regulator_notifier_call_chain(chip->rdev,
REGULATOR_EVENT_OVER_CURRENT,
......@@ -155,6 +157,9 @@ static irqreturn_t da9210_irq_handler(int irq, void *data)
NULL);
handled |= DA9210_E_VMAX;
}
mutex_unlock(&chip->rdev->mutex);
if (handled) {
/* Clear handled events */
error = regmap_write(chip->regmap, DA9210_REG_EVENT_B, handled);
......
......@@ -283,8 +283,8 @@ static irqreturn_t pv88090_irq_handler(int irq, void *data)
}
}
err = regmap_update_bits(chip->regmap, PV88090_REG_EVENT_A,
PV88090_E_VDD_FLT, PV88090_E_VDD_FLT);
err = regmap_write(chip->regmap, PV88090_REG_EVENT_A,
PV88090_E_VDD_FLT);
if (err < 0)
goto error_i2c;
......@@ -300,8 +300,8 @@ static irqreturn_t pv88090_irq_handler(int irq, void *data)
}
}
err = regmap_update_bits(chip->regmap, PV88090_REG_EVENT_A,
PV88090_E_OVER_TEMP, PV88090_E_OVER_TEMP);
err = regmap_write(chip->regmap, PV88090_REG_EVENT_A,
PV88090_E_OVER_TEMP);
if (err < 0)
goto error_i2c;
......
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