Convert Powerventure Semiconductor PV88060/PV88080/PV88090 regulator
drivers to SPDX identifier.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The mutex for the regulator_dev must be controlled by the caller of
the regulator_notifier_call_chain(), as described in the comment
for that function.
Failure to mutex lock and unlock surrounding the notifier call results
in a kernel WARN_ON_ONCE() which will dump a backtrace for the
regulator_notifier_call_chain() when that function call is first made.
The mutex can be controlled using the regulator_lock/unlock() API.
Fixes: c90456e36d ("regulator: pv88090: new regulator driver")
Suggested-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>;
Signed-off-by: Mark Brown <broonie@kernel.org>
Fix off-by-one while iterating current_limits array.
The valid index should be 0 ~ n_current_limits -1.
Fixes: c90456e36d ("regulator: pv88090: new regulator driver")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This is a patch for exception handlding that the index of array is
out of bounds. And the definitions have been updated to use
proper device name.
Signed-off-by: Eric Jeong <eric.jeong.opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Declare regulator_ops structure as const as it is only stored in the ops
field of a regulator_desc structure. This field is of type const, so
regulator_ops structures having this property can be made const too.
File size before: drivers/regulator/pv88090-regulator.o
text data bss dec hex filename
2829 2032 8 4869 1305 regulator/pv88090-regulator.o
File size after: drivers/regulator/pv88090-regulator.o
text data bss dec hex filename
3341 1520 8 4869 1305 regulator/pv88090-regulator.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This is a patch to fix incorrect clear of event register.
Signed-off-by: James Ban <James.Ban.opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
These were supposed to be bitwise AND instead of logical. Also kernel
style is for the operator to be on the first line and I removed some
extra parenthesis.
Fixes: c90456e36d ('regulator: pv88090: new regulator driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Use devm_request_threaded_irq to ensure the irq is freed when unload the
module.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This is the driver for the Powerventure PV88090 BUCKs and LDOs regulator.
It communicates via an I2C bus to the device.
Signed-off-by: James Ban <James.Ban.opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>