linux/drivers/regulator
Arnd Bergmann 0ffff5a60f regulator: twl: make twl_info tables const
I currently carry the series to make of_device_id->data const in the
arm-soc tree, which fixes a number of issues, but leaves one new
compiler warning about the twl-regulator driver:

drivers/regulator/twl-regulator.c: In function 'twlreg_probe':
drivers/regulator/twl-regulator.c:1130:8: warning: assignment discards 'const'
qualifier from pointer target type [enabled by default]
drivers/regulator/twl-regulator.c:1139:9: warning: assignment discards 'const'
qualifier from pointer target type [enabled by default]

The warning indicates that the driver takes a static table with
initialization data for each regulator, modifies the data in place
and passes a pointer to that structure to the regulator_register
function. This is probably ok because a system contains only one
instance of each regulator, but it's still bad style because any
driver should be written to support multiple instances of the same
hardware.

This patch changes the code to dynamically allocate the memory
we pass to the regulator core so the table can be constant.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:28 -07:00
..
88pm8607.c regulator: 88pm8607: Use regulator_get_voltage_sel_regmap() 2012-05-04 13:32:06 +01:00
aat2870-regulator.c regulator: aat2870: Remove unused min_uV and max_uV from struct aat2870_regulator 2012-07-12 18:22:13 +01:00
ab3100.c regulator: ab3100: Remove get_voltage implementation for regulator_ops_fixed 2012-08-28 11:00:27 -07:00
ab8500.c regulator: ab8500: Remove get_voltage implementation for ab8500_regulator_fixed_ops 2012-08-28 11:00:27 -07:00
ad5398.c regulator: ad5398: Fix min/max current limit boundary checking 2012-07-04 12:39:38 +01:00
anatop-regulator.c regulator: anatop: Fix wrong mask used in anatop_get_voltage_sel 2012-08-07 18:10:26 +01:00
arizona-ldo1.c regulator: arizona-ldo1: Implement GPIO enable support 2012-07-03 20:29:30 +01:00
arizona-micsupp.c regulator: arizona-micsupp: Force regulated mode until we have API support 2012-07-04 16:22:39 +01:00
core.c regulator: core: request only valid gpio pins for regulator enable 2012-08-09 19:52:21 +01:00
da903x.c regulator: da903x: Don't read/write to DA9030_INVAL/DA9034_INVAL address 2012-06-08 07:29:47 +08:00
da9052-regulator.c regulator: da9052: set_current_limit should select the maximum current in specific range 2012-08-28 11:00:26 -07:00
db8500-prcmu.c mfd: Register db8500-prcmu devices using the newly DT:ed MFD API 2012-07-09 00:16:09 +02:00
dbx500-prcmu.c regulators/db8500: split off shared dbx500 code 2012-01-20 12:01:29 +00:00
dbx500-prcmu.h regulators/db8500: split off shared dbx500 code 2012-01-20 12:01:29 +00:00
dummy.c regulator: dummy: Specify a struct device 2012-05-10 10:48:28 +01:00
dummy.h regulator: fix build when CONFIG_REGULATOR_DUMMY=n 2010-10-28 22:40:32 +01:00
fixed-helper.c regulator: extend the fixed dummy voltage regulator to accept voltage 2012-06-19 23:22:30 +01:00
fixed.c regulator: fixed: dt: support for input supply 2012-07-05 13:49:35 +01:00
gpio-regulator.c regulator: gpio-regulator: Split setting of voltages and currents 2012-08-08 12:16:06 +01:00
isl6271a-regulator.c regulator: isl6271a: Remove get_voltage implementation for isl_fixed_ops 2012-08-28 11:00:27 -07:00
Kconfig MFD bits for the 3.6 merge window. 2012-07-30 12:41:17 -07:00
lp872x.c regulator: lp872x: set_current_limit should select the maximum current in specific range 2012-08-28 11:00:26 -07:00
lp3971.c regulator: lp3971: Use regulator_list_voltage_table() 2012-06-03 13:25:02 +01:00
lp3972.c regulator: lp3972: Use regulator_list_voltage_table() 2012-06-03 13:25:01 +01:00
lp8788-buck.c regulator: Use BUCK_FPWM_[MASK|SHIFT] macros to replace buck_pmap table 2012-08-28 11:00:24 -07:00
lp8788-ldo.c regulator: lp8788-ldo: Set n_voltages to 1 for fixed voltage 2012-08-28 11:00:24 -07:00
Makefile regulator: add new lp8788 regulator driver 2012-07-20 11:12:15 +01:00
max1586.c regulator: max1586: Convert max1586_v3_ops to set_voltage_sel and map_voltage_linear 2012-06-08 08:48:23 +08:00
max8649.c regulator: max8649: fix missing regmap in rdev 2012-06-05 11:15:22 +01:00
max8660.c regulator: max8660: Convert to set_voltage_sel and regulator_map_voltage_linear 2012-05-15 18:35:42 +01:00
max8925-regulator.c regulator: max8925: Remove check_range function and max_uV from struct rc5t583_regulator_info 2012-05-17 23:00:56 +01:00
max8952.c regulator: max8952: Use core GPIO enable support 2012-07-10 14:48:42 +01:00
max8997.c regulator: max8997: Properly handle gpio_request failure 2012-07-15 21:49:53 +01:00
max8998.c regulator: max8998: Remove wrong set_suspend_[en|dis]able callback settings 2012-07-09 19:45:12 +01:00
max77686.c regulator: max77686: Use array to save pointer to rdev 2012-08-28 11:00:26 -07:00
mc13xxx-regulator-core.c regulator: mc13xxx: Remove get_voltage implementation for single voltage regulators 2012-08-28 11:00:27 -07:00
mc13xxx.h regulator: mc13xxx: Remove get_voltage implementation for single voltage regulators 2012-08-28 11:00:27 -07:00
mc13783-regulator.c regulator: mc13xxx: Remove get_voltage implementation for single voltage regulators 2012-08-28 11:00:27 -07:00
mc13892-regulator.c regulator: mc13xxx: Remove get_voltage implementation for single voltage regulators 2012-08-28 11:00:27 -07:00
of_regulator.c regulator: dt: regulator match by regulator-compatible 2012-07-03 20:19:41 +01:00
palmas-regulator.c regulator: palmas: Convert palmas_ops_ldo to [get|set]_voltage_sel_regmap 2012-08-28 11:00:16 -07:00
pcap-regulator.c regulator: pcap: Convert to regulator_list_voltage_table 2012-06-08 07:37:29 +08:00
pcf50633-regulator.c regulator: pcf50633: Convert to regulator_set_voltage_sel_regmap and map_voltage 2012-06-17 21:05:28 +01:00
rc5t583-regulator.c regulator: rc5t583: Use regulator_set_voltage_time_sel() 2012-06-24 12:13:38 +01:00
s2mps11.c regulator: s2mps11: Use array to save pointer to rdev 2012-08-28 11:00:15 -07:00
s5m8767.c regulator: Fix an s5m8767 build failure 2012-07-31 00:51:09 +02:00
tps6105x-regulator.c regulator: tps6105x: Use regulator_list_voltage_table() 2012-06-03 13:25:01 +01:00
tps6507x-regulator.c regulator: tps6507x: Avoid duplicating the same mapping table for LDO2 and VDCDCx 2012-06-05 11:20:53 +01:00
tps6524x-regulator.c regulator: tps6524x: set_current_limit should select the maximum current in specific range 2012-08-28 11:00:26 -07:00
tps6586x-regulator.c regulator: tps6586x: Convert to regulator_[enable|disable|is_enabled|get_voltage_sel]_regmap 2012-08-28 11:00:25 -07:00
tps62360-regulator.c regulator: tps62360: use devm_* for gpio request 2012-07-15 21:49:52 +01:00
tps65023-regulator.c regulator: tps65023: Convert tps65023_ldo_ops to regulator_[get|set]_voltage_sel_regmap 2012-06-19 12:14:11 +01:00
tps65090-regulator.c Merge remote-tracking branch 'regulator/topic/drivers' into regulator-next 2012-05-12 11:10:25 +01:00
tps65217-regulator.c regulator: tps65217: Add device tree support 2012-07-12 18:27:36 +01:00
tps65910-regulator.c regulator: tps65910: set input_supply on desc unconditionally 2012-07-17 11:08:46 +01:00
tps65912-regulator.c regulator: tps65912: Convert to get_voltage_sel 2012-04-23 13:20:27 +01:00
twl-regulator.c regulator: twl: make twl_info tables const 2012-08-28 11:00:28 -07:00
userspace-consumer.c regulator: userspace-consumer: Convert to use devm_* APIs 2012-04-18 10:26:24 +01:00
virtual.c regulator: virtual: Replace strict_strtol with kstrtol 2012-04-19 13:48:34 +01:00
wm831x-dcdc.c regulator: wm831x-dcdc: set_current_limit should select the maximum current in specific range 2012-08-28 11:00:26 -07:00
wm831x-isink.c MFD changes for 3.5 2012-05-29 11:53:11 -07:00
wm831x-ldo.c regulator: wm831x-ldo: Check return value of wm831x_reg_read() 2012-08-28 11:00:25 -07:00
wm8350-regulator.c regulator: wm8350: Reuse map_voltage() to get selector of a given uV 2012-06-17 20:53:58 +01:00
wm8400-regulator.c regulator: wm8400: Simplify set REGULATOR_MODE_IDLE mode in wm8400_dcdc_set_mode 2012-08-28 11:00:25 -07:00
wm8994-regulator.c regulator: wm8994: Use core GPIO enable support 2012-07-03 20:29:29 +01:00