remarkable-linux/drivers/regulator
Heiko Stübner 3f0292ae8b regulator: Add driver for gpio-controlled regulators
This patch adds support for regulators that can be controlled via gpios.

Examples for such regulators are the TI-tps65024x voltage regulators
with 4 fixed and 1 runtime-switchable voltage regulators
or the TI-bq240XX charger regulators.

The number of controlling gpios is not limited, the mapping between
voltage/current and target gpio state is done via the states map
and the driver can be used for either voltage or current regulators.

A mapping for a regulator with two GPIOs could look like:

gpios = {
	{ .gpio = GPIO1, .flags = GPIOF_OUT_INIT_HIGH, .label = "gpio name 1" },
	{ .gpio = GPIO2, .flags = GPIOF_OUT_INIT_LOW,  .label = "gpio name 2" },
}

The flags element of the gpios array determines the initial state of
the gpio, set during probe. The initial state of the regulator is also
calculated from these values

states = {
	{ .value = volt_or_cur1, .gpios = (0 << 1) | (0 << 0) },
	{ .value = volt_or_cur2, .gpios = (0 << 1) | (1 << 0) },
	{ .value = volt_or_cur3, .gpios = (1 << 1) | (0 << 0) },
	{ .value = volt_or_cur4, .gpios = (1 << 1) | (1 << 0) },
}

The target-state for the n-th gpio is determined by the n-th bit
in the bitfield of the target-value.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-09 12:36:21 +01:00
..
88pm8607.c regulator: 88pm8607: Fix off-by-one value range checking in the case of no id is matched 2011-08-08 17:15:08 +01:00
aat2870-regulator.c regulator: aat2870-regulator.c needs module.h 2011-08-08 17:12:51 +01:00
ab3100.c mfd: Use mfd cell platform_data for ab3100 cells platform bits 2011-05-26 19:44:58 +02:00
ab8500.c regulator: add ab8500 enable and raise time delays 2011-03-26 14:15:06 +00:00
ad5398.c
bq24022.c
core.c regulator: Add debugfs file showing the supply map table 2011-08-28 17:41:59 +01:00
da903x.c regulator: Report actual configured voltage to set_voltage() 2011-01-12 14:32:59 +00:00
db8500-prcmu.c regulator: db8500-prcmu: small fixes 2011-07-08 19:14:57 +01:00
dummy.c regulator: Properly register dummy regulator driver 2011-06-08 20:15:34 +01:00
dummy.h regulator: fix build when CONFIG_REGULATOR_DUMMY=n 2010-10-28 22:40:32 +01:00
fixed.c
gpio-regulator.c regulator: Add driver for gpio-controlled regulators 2011-10-09 12:36:21 +01:00
isl6271a-regulator.c regulator: missing index in PTR_ERR() in isl6271a_probe() 2011-01-12 14:33:06 +00:00
Kconfig regulator: Add driver for gpio-controlled regulators 2011-10-09 12:36:21 +01:00
lp3971.c regulator: Report actual configured voltage to set_voltage() 2011-01-12 14:32:59 +00:00
lp3972.c regulator: Report actual configured voltage to set_voltage() 2011-01-12 14:32:59 +00:00
Makefile regulator: Add driver for gpio-controlled regulators 2011-10-09 12:36:21 +01:00
max1586.c regulator: Report actual configured voltage to set_voltage() 2011-01-12 14:32:59 +00:00
max8649.c regulator: Ensure enough enable time for max8649 2011-08-08 17:15:08 +01:00
max8660.c regulator: Report actual configured voltage to set_voltage() 2011-01-12 14:32:59 +00:00
max8925-regulator.c regulator: Enable max8925 i2c sequence for control 2011-05-26 19:45:33 +02:00
max8952.c regulator: max8952: removed unused mutex. 2011-08-08 17:15:09 +01:00
max8997.c regulator: max8997: Fix setting inappropriate value for ramp_delay variable 2011-07-08 19:14:58 +01:00
max8998.c regulator: Fix memory leak in max8998_pmic_probe failure path 2011-05-27 10:49:09 +01:00
mc13xxx-regulator-core.c regulator: Fix off-by-one value range checking for mc13xxx_regulator_get_voltage 2011-05-27 10:49:10 +01:00
mc13xxx.h make mc13783 regulator code generic 2011-01-12 14:33:03 +00:00
mc13783-regulator.c mfd: Use mfd cell platform_data for mc13xxx cells platform bits 2011-05-26 19:45:07 +02:00
mc13892-regulator.c regulator: mc13892: Fix voltage unit in test case. 2011-05-27 10:49:10 +01:00
pcap-regulator.c regulator: Fix typo in PCAP regulator_set_voltage() 2011-01-12 14:33:00 +00:00
pcf50633-regulator.c regulator: Report actual configured voltage to set_voltage() 2011-01-12 14:32:59 +00:00
tps6105x-regulator.c regulator: Add missing platform_set_drvdata in tps6105x_regulator_probe 2011-05-27 10:34:36 +01:00
tps6507x-regulator.c regulator: tps6507x: Remove num_voltages array 2011-08-08 17:15:09 +01:00
tps6524x-regulator.c regulator: fix tps6524x section mismatch 2011-03-26 14:15:06 +00:00
tps6586x-regulator.c regulator: tps6586x: add SMx slew rate setting 2011-08-28 17:41:28 +01:00
tps65023-regulator.c regulator: remove duplicate REG_CTRL2 defines in tps65023 2011-10-09 12:05:27 +01:00
tps65910-regulator.c regulator: tps65910: Fix array access out of bounds bug 2011-07-22 11:41:57 +01:00
tps65912-regulator.c regulator: tps65912: Remove unused define of TPS65912_MAX_REG_ID 2011-08-08 17:12:51 +01:00
twl-regulator.c regulator: TWL: Remove entry of RES_ID for 6030 macros 2011-07-22 11:30:05 +01:00
userspace-consumer.c
virtual.c
wm831x-dcdc.c regulator: Improve WM831x DVS VSEL selection algorithm 2011-07-28 10:20:49 +01:00
wm831x-isink.c regulator: Convert WM831x regulators to genirq 2011-03-26 14:15:04 +00:00
wm831x-ldo.c regulator: Fix WM831x regulator ID lookups for multiple WM831xs 2011-07-28 10:20:48 +01:00
wm8350-regulator.c regulator: Convert WM835x to use get_voltage_sel() 2011-01-12 14:33:04 +00:00
wm8400-regulator.c regulator: Convert WM8400 to get_voltage_sel() 2011-05-27 10:34:37 +01:00
wm8994-regulator.c regulator: Use _cansleep() for WM8994 regulator GPIOs 2011-05-30 11:56:58 +01:00