]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: core: add guard delay between calling regulator_disable and _enable
authorGuodong Xu <guodong.xu@linaro.org>
Wed, 13 Aug 2014 11:33:40 +0000 (19:33 +0800)
committerMark Brown <broonie@linaro.org>
Sat, 16 Aug 2014 21:55:42 +0000 (16:55 -0500)
commit9e7c338ab24a43cfa70a99d635acc3d86bd3064b
tree8aa03c6a83d1c5a675c64935b213c1c18035e49c
parent2f0901d4bc9cca8b8793c432f12d3de6e30aae3a
regulator: core: add guard delay between calling regulator_disable and _enable

Some regulator require a minimum delay between its disable and next enable.
This is to avoid damages when out-of-range frequent disable/enable of a
single regulator can bring to the regulator chip.

Add @off_on_delay to struct regulator_desc. Device drivers' can use this field
to set this guard time.

Add @last_off_jiffy to struct regulator_dev. When @off_on_delay is set by
driver, regulator core can store its last off (disable) time into this field.

Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/core.c
include/linux/regulator/driver.h