1
0
Fork 0
Commit Graph

7 Commits (2c33b50e6201881709b092b9b8566ae4b6dfc3ab)

Author SHA1 Message Date
Steve Twiss 1867af94cf
regulator: pv88080: Fix notifier mutex lock warning
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: 99cf3af5e2 ("regulator: pv88080: 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>
2019-03-13 15:10:27 +00:00
Axel Lin 989a99bc64
regulator: pv88080: Convert to use regulator_set/get_current_limit_regmap
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>
2019-03-03 23:59:46 +00:00
Axel Lin 3c413f594c
regulator: pv88080: Fix array out-of-bounds access
Fix off-by-one while iterating current_limits array.
The valid index should be 0 ~ n_current_limits -1.

Fixes: 99cf3af5e2 ("regulator: pv88080: new regulator driver")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-19 15:26:16 +00:00
Bhumika Goyal d4fdf5e14e regulator: pv88080-regulator: constify regulator_ops structure
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/pv88080-regulator.o
   text	   data	    bss	    dec	    hex	filename
   3828	   1808	      8	   5644	   160c regulator/pv88080-regulator.o

File size after: drivers/regulator/pv88080-regulator.o
   text	   data	    bss	    dec	    hex	filename
   4340	   1296	      8	   5644	   160c regulator/pv88080-regulator.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:59:01 +00:00
Eric Jeong 5ff00f6aa8 regulator: pv88080: Update regulator for PV88080 BB silicon support
Three files are modified, the driver, header file and the binding document.

Updates for the regulator source file include and .of_match_table entry
and node match checking in the probe() function for a compatible pv88080
silicon type. A new "HVBUCK" is added in source file and added
regsiter definition in header file for pv88080 bb silicion.
The binding documentation changes have been made to reflect these updates.

Signed-off-by: Eric Jeong <eric.jeong.opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-26 08:59:08 -07:00
Axel Lin c8a28a0dbe regulator: pv880x0: Clean up unnecessary header inclusion
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-30 16:29:39 +01:00
James Ban 99cf3af5e2 regulator: pv88080: new regulator driver
This is the driver for the Powerventure PV88080 BUCKs 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>
2016-04-18 17:53:57 +01:00