]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: helpers: Modify helpers enabling multi-bit control
authorCarlo Caione <carlo@caione.org>
Wed, 5 Mar 2014 21:11:29 +0000 (22:11 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 6 Mar 2014 09:30:10 +0000 (17:30 +0800)
commit5dc48f5450ad52897e19614f2549c7ceeecc2a00
treeacf10cbf9247ec8d7f8437faa9ba154a1fb8665e
parent6333ef0a6d756a72c48035feae2450b64f0372e4
regulator: helpers: Modify helpers enabling multi-bit control

This patch extends the regulator helpers to account for device that use
multiple bits for control when using regmap enable/disable/bypass ops.

The actual regulator helpers wrongly assume that the regulator control
is always performed using single bits, using in the regulator_desc
struct only two parameters *_reg and *_mask defining register and mask
for control.

This patch extends this struct and introduces the helpers to take into
account devices where control is performed using multiple bits and
specific multi-bit values are used for enabling/disabling/bypassing the
regulator.

Signed-off-by: Carlo Caione <carlo@caione.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/helpers.c
include/linux/regulator/driver.h