diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-05-09 13:54:04 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:15:03 +0200 |
commit | c57cdab3a8d76c025b2d969f09523bf9137e6148 (patch) | |
tree | 3ede1b70d096d98d1e9a07c3d6fa50b74273b7d0 | |
parent | f13106b5c5fae60d113afd4f377860919bb029d3 (diff) |
regulator Added regulator for sysclkreq and connected BT and WLAN
ST-Ericsson Linux next: -
ST-Ericsson ID: ER 324615
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I616eda9d8e292c05dd8094d8085f5b488ee90396
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/19533
Reviewed-by: Par-Gunnar HJALMDAHL <par-gunnar.p.hjalmdahl@stericsson.com>
Reviewed-by: Yvan FILLION <yvan.fillion@stericsson.com>
Tested-by: Yvan FILLION <yvan.fillion@stericsson.com>
Reviewed-by: Henrik CARLING <henrik.carling@stericsson.com>
Conflicts:
arch/arm/mach-ux500/board-mop500-regulators.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/virt-regulator-u8500.c
drivers/regulator/ab8500.c
include/linux/mfd/ab8500/ab8500-gpio.h
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.c | 42 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-ux500/virt-regulator-u8500.c | 68 | ||||
-rw-r--r-- | drivers/gpio/ab8500-gpio.c | 63 | ||||
-rw-r--r-- | drivers/regulator/ab8500.c | 114 | ||||
-rw-r--r-- | include/linux/mfd/ab8500/gpio.h | 7 | ||||
-rw-r--r-- | include/linux/regulator/ab8500.h | 2 |
8 files changed, 269 insertions, 36 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index ff2351b665e..a80ce76e90e 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -115,25 +115,25 @@ static struct regulator_consumer_supply ab8500_vtvout_consumers[] = { static struct regulator_consumer_supply ab8500_vaudio_consumers[] = { /* vaudio regulator, supply for ab8500-vaudio */ REGULATOR_SUPPLY("v-audio", NULL), - REGULATOR_SUPPLY_DEBUG("audio", "reg-virt-consumer.6") + REGULATOR_SUPPLY_DEBUG("audio", "reg-virt-consumer.5") }; static struct regulator_consumer_supply ab8500_vamic1_consumers[] = { /* vamic1 regulator */ REGULATOR_SUPPLY("v-amic1", NULL), - REGULATOR_SUPPLY_DEBUG("anamic1", "reg-virt-consumer.7") + REGULATOR_SUPPLY_DEBUG("anamic1", "reg-virt-consumer.6") }; static struct regulator_consumer_supply ab8500_vamic2_consumers[] = { /* vamic2 regulator */ REGULATOR_SUPPLY("v-amic2", NULL), - REGULATOR_SUPPLY_DEBUG("anamic2", "reg-virt-consumer.8") + REGULATOR_SUPPLY_DEBUG("anamic2", "reg-virt-consumer.7") }; static struct regulator_consumer_supply ab8500_vdmic_consumers[] = { /* supply for v-dmic, VDMIC LDO */ REGULATOR_SUPPLY("v-dmic", NULL), - REGULATOR_SUPPLY_DEBUG("dmic", "reg-virt-consumer.9") + REGULATOR_SUPPLY_DEBUG("dmic", "reg-virt-consumer.8") }; static struct regulator_consumer_supply ab8500_vana_consumers[] = { @@ -143,7 +143,19 @@ static struct regulator_consumer_supply ab8500_vana_consumers[] = { REGULATOR_SUPPLY("v-ana", "mcde"), /* camera supply */ REGULATOR_SUPPLY("v-ana", "mmio_camera"), - REGULATOR_SUPPLY_DEBUG("ana", "reg-virt-consumer.10") + REGULATOR_SUPPLY_DEBUG("ana", "reg-virt-consumer.9") +}; + +/* supply for CG2900 */ +static struct regulator_consumer_supply ab8500_sysclkreq_2_consumers[] = { + REGULATOR_SUPPLY("gbf_1v8", "cg2900-uart.0"), + REGULATOR_SUPPLY_DEBUG("sysclkreq-2", "reg-virt-consumer.10") +}; + +/* supply for CW1200 */ +static struct regulator_consumer_supply ab8500_sysclkreq_4_consumers[] = { + REGULATOR_SUPPLY("wlan_1v8", "cw1200"), + REGULATOR_SUPPLY_DEBUG("sysclkreq-4", "reg-virt-consumer.11") }; /* ab8500 regulator register initialization */ @@ -481,4 +493,24 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers), .consumer_supplies = ab8500_vana_consumers, }, + /* sysclkreq 2 pin */ + [AB8500_SYSCLKREQ_2] = { + .constraints = { + .name = "ab8500-sysclkreq-2", + .valid_ops_mask = REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = + ARRAY_SIZE(ab8500_sysclkreq_2_consumers), + .consumer_supplies = ab8500_sysclkreq_2_consumers, + }, + /* sysclkreq 4 pin */ + [AB8500_SYSCLKREQ_4] = { + .constraints = { + .name = "ab8500-sysclkreq-4", + .valid_ops_mask = REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = + ARRAY_SIZE(ab8500_sysclkreq_4_consumers), + .consumer_supplies = ab8500_sysclkreq_4_consumers, + }, }; diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 11bb99d5a74..4a9f9d71034 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -99,7 +99,9 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { * register. This is the array of 7 configuration settings. * One has to compile time decide these settings. Below is the * explaination of these setting - * GpioSel1 = 0x02 => Pin GPIO2 (SysClkReq3) is configured as GPIO + * GpioSel1 = 0x07 => Pin GPIO1 (SysClkReq2) + * Pin GPIO2 (SysClkReq3) + * Pin GPIO3 (SysClkReq4) are configured as GPIO * GpioSel2 = 0x9E => Pins GPIO10..13 & GPIO16 are configured as GPIO * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO * GpioSel4 = 0x01 => Pin GPIo25 is configured as GPIO @@ -108,7 +110,7 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { * AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured * as GPIO then this register selectes the alternate fucntions */ - .config_reg = {0x02, 0x9E, 0x80, 0x01, + .config_reg = {0x07, 0x9E, 0x80, 0x01, 0x7A, 0x02, 0x00}, }; diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 3b125a76091..afe132feb88 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -162,9 +162,6 @@ static struct regulator_consumer_supply db8500_vape_consumers[] = { }; static struct regulator_consumer_supply db8500_vsmps2_consumers[] = { - /* CG2900 and CW1200 power to off-chip peripherals */ - REGULATOR_SUPPLY("gbf_1v8", "cg2900-uart.0"), - REGULATOR_SUPPLY("wlan_1v8", "cw1200.0"), REGULATOR_SUPPLY("musb_1v8", "ab8500-usb.0"), /* AV8100 regulator */ REGULATOR_SUPPLY("hdmi_1v8", "0-0070"), diff --git a/arch/arm/mach-ux500/virt-regulator-u8500.c b/arch/arm/mach-ux500/virt-regulator-u8500.c index 3de4a645fef..4915a4cf636 100644 --- a/arch/arm/mach-ux500/virt-regulator-u8500.c +++ b/arch/arm/mach-ux500/virt-regulator-u8500.c @@ -58,7 +58,7 @@ static struct platform_device u8500_tvout_virtual_regulator_device = { static struct platform_device u8500_audio_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 6, + .id = 5, .dev = { .platform_data = "audio", }, @@ -66,7 +66,7 @@ static struct platform_device u8500_audio_virtual_regulator_device = { static struct platform_device u8500_anamic1_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 7, + .id = 6, .dev = { .platform_data = "anamic1", }, @@ -74,7 +74,7 @@ static struct platform_device u8500_anamic1_virtual_regulator_device = { static struct platform_device u8500_anamic2_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 8, + .id = 7, .dev = { .platform_data = "anamic2", }, @@ -82,7 +82,7 @@ static struct platform_device u8500_anamic2_virtual_regulator_device = { static struct platform_device u8500_dmic_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 9, + .id = 8, .dev = { .platform_data = "dmic", }, @@ -90,18 +90,34 @@ static struct platform_device u8500_dmic_virtual_regulator_device = { static struct platform_device u8500_ana_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 10, + .id = 9, .dev = { .platform_data = "ana", }, }; +static struct platform_device u8500_sysclkreq_2_virtual_regulator_device = { + .name = "reg-virt-consumer", + .id = 10, + .dev = { + .platform_data = "sysclkreq-2", + }, +}; + +static struct platform_device u8500_sysclkreq_4_virtual_regulator_device = { + .name = "reg-virt-consumer", + .id = 11, + .dev = { + .platform_data = "sysclkreq-4", + }, +}; + /* * Configuration for other U8500 virtual regulators */ static struct platform_device u8500_ape_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 11, + .id = 12, .dev = { .platform_data = "test", }, @@ -109,7 +125,7 @@ static struct platform_device u8500_ape_virtual_regulator_device = { static struct platform_device u8500_arm_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 12, + .id = 13, .dev = { .platform_data = "test", }, @@ -117,7 +133,7 @@ static struct platform_device u8500_arm_virtual_regulator_device = { static struct platform_device u8500_modem_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 13, + .id = 14, .dev = { .platform_data = "test", }, @@ -125,7 +141,7 @@ static struct platform_device u8500_modem_virtual_regulator_device = { static struct platform_device u8500_pll_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 14, + .id = 15, .dev = { .platform_data = "test", }, @@ -133,7 +149,7 @@ static struct platform_device u8500_pll_virtual_regulator_device = { static struct platform_device u8500_smps1_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 15, + .id = 16, .dev = { .platform_data = "test", }, @@ -141,7 +157,7 @@ static struct platform_device u8500_smps1_virtual_regulator_device = { static struct platform_device u8500_smps2_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 16, + .id = 17, .dev = { .platform_data = "test", }, @@ -149,7 +165,7 @@ static struct platform_device u8500_smps2_virtual_regulator_device = { static struct platform_device u8500_smps3_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 17, + .id = 18, .dev = { .platform_data = "test", }, @@ -157,7 +173,7 @@ static struct platform_device u8500_smps3_virtual_regulator_device = { static struct platform_device u8500_rf1_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 18, + .id = 19, .dev = { .platform_data = "test", }, @@ -168,7 +184,7 @@ static struct platform_device u8500_rf1_virtual_regulator_device = { */ static struct platform_device u8500_sva_mmdsp_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 19, + .id = 20, .dev = { .platform_data = "test", }, @@ -176,7 +192,7 @@ static struct platform_device u8500_sva_mmdsp_virtual_regulator_device = { static struct platform_device u8500_sva_mmdsp_ret_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 20, + .id = 21, .dev = { .platform_data = "test", }, @@ -184,7 +200,7 @@ static struct platform_device u8500_sva_mmdsp_ret_virtual_regulator_device = { static struct platform_device u8500_sva_pipe_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 21, + .id = 22, .dev = { .platform_data = "test", }, @@ -192,7 +208,7 @@ static struct platform_device u8500_sva_pipe_virtual_regulator_device = { static struct platform_device u8500_sia_mmdsp_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 22, + .id = 23, .dev = { .platform_data = "test", }, @@ -200,7 +216,7 @@ static struct platform_device u8500_sia_mmdsp_virtual_regulator_device = { static struct platform_device u8500_sia_mmdsp_ret_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 23, + .id = 24, .dev = { .platform_data = "test", }, @@ -208,7 +224,7 @@ static struct platform_device u8500_sia_mmdsp_ret_virtual_regulator_device = { static struct platform_device u8500_sia_pipe_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 24, + .id = 25, .dev = { .platform_data = "test", }, @@ -216,7 +232,7 @@ static struct platform_device u8500_sia_pipe_virtual_regulator_device = { static struct platform_device u8500_sga_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 25, + .id = 26, .dev = { .platform_data = "test", }, @@ -224,7 +240,7 @@ static struct platform_device u8500_sga_virtual_regulator_device = { static struct platform_device u8500_b2r2_mcde_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 26, + .id = 27, .dev = { .platform_data = "test", }, @@ -232,7 +248,7 @@ static struct platform_device u8500_b2r2_mcde_virtual_regulator_device = { static struct platform_device u8500_esram12_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 27, + .id = 28, .dev = { .platform_data = "test", }, @@ -240,7 +256,7 @@ static struct platform_device u8500_esram12_virtual_regulator_device = { static struct platform_device u8500_esram12_ret_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 28, + .id = 29, .dev = { .platform_data = "test", }, @@ -248,7 +264,7 @@ static struct platform_device u8500_esram12_ret_virtual_regulator_device = { static struct platform_device u8500_esram34_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 29, + .id = 30, .dev = { .platform_data = "test", }, @@ -256,7 +272,7 @@ static struct platform_device u8500_esram34_virtual_regulator_device = { static struct platform_device u8500_esram34_ret_virtual_regulator_device = { .name = "reg-virt-consumer", - .id = 30, + .id = 31, .dev = { .platform_data = "test", }, @@ -273,6 +289,8 @@ static struct platform_device *u8500_virtual_regulator_devices[] = { &u8500_anamic2_virtual_regulator_device, &u8500_dmic_virtual_regulator_device, &u8500_ana_virtual_regulator_device, + &u8500_sysclkreq_2_virtual_regulator_device, + &u8500_sysclkreq_4_virtual_regulator_device, &u8500_ape_virtual_regulator_device, &u8500_arm_virtual_regulator_device, &u8500_modem_virtual_regulator_device, diff --git a/drivers/gpio/ab8500-gpio.c b/drivers/gpio/ab8500-gpio.c index 46e146a0eb4..d5bfbc40cdd 100644 --- a/drivers/gpio/ab8500-gpio.c +++ b/drivers/gpio/ab8500-gpio.c @@ -519,6 +519,69 @@ int ab8500_config_pull_up_or_down(struct device *dev, } EXPORT_SYMBOL(ab8500_config_pull_up_or_down); +/* + * ab8500_gpio_config_select() + * + * Configure functionality of pin, either specific use or GPIO. + * @dev: device pointer + * @gpio: gpio number + * @gpio_select: true if the pin should be used as GPIO + */ +int ab8500_gpio_config_select(struct device *dev, + unsigned gpio_offset, bool gpio_select) +{ + u8 reg = AB8500_GPIO_SEL1_REG + (gpio_offset / 8); + u8 pos = gpio_offset % 8; + u8 val = gpio_select ? 1 : 0; + int ret; + + ret = abx500_mask_and_set_register_interruptible(dev, + AB8500_MISC, reg, 1 << pos, val << pos); + if (ret < 0) + dev_err(dev, "%s write failed\n", __func__); + + dev_vdbg(dev, "%s (bank, addr, mask, value): 0x%x, 0x%x, 0x%x, 0x%x\n", + __func__, AB8500_MISC, reg, 1 << pos, val << pos); + + return ret; +} +EXPORT_SYMBOL(ab8500_gpio_config_select); + +/* + * ab8500_gpio_config_get_select() + * + * Configure functionality of pin, either specific use or GPIO. + * @dev: device pointer + * @gpio: gpio number + * @gpio_select: pointer to pin selection status + */ +int ab8500_gpio_config_get_select(struct device *dev, + unsigned gpio_offset, bool *gpio_select) +{ + u8 reg = AB8500_GPIO_SEL1_REG + (gpio_offset / 8); + u8 pos = gpio_offset % 8; + u8 val; + int ret; + + ret = abx500_get_register_interruptible(dev, + AB8500_MISC, reg, &val); + if (ret < 0) { + dev_err(dev, "%s read failed\n", __func__); + return ret; + } + + if (val & (1 << pos)) + *gpio_select = true; + else + *gpio_select = false; + + dev_vdbg(dev, "%s (bank, addr, mask, value): 0x%x, 0x%x, 0x%x, 0x%x\n", + __func__, AB8500_MISC, reg, 1 << pos, val); + + return 0; +} +EXPORT_SYMBOL(ab8500_gpio_config_get_select); + static struct platform_driver ab8500_gpio_driver = { .driver = { .name = "ab8500-gpio", diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 40d84a745e7..354962d8f6b 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -20,6 +20,8 @@ #include <linux/regulator/driver.h> #include <linux/regulator/machine.h> #include <linux/regulator/ab8500.h> +#include <linux/mfd/ab8500/gpio.h> /* for sysclkreq pins */ +#include <mach/gpio.h> /* for sysclkreq pins */ /** * struct ab8500_regulator_info - ab8500 regulator information @@ -39,6 +41,7 @@ * @voltages: supported voltage table * @voltages_len: number of supported voltages for the regulator * @delay: startup/set voltage delay in us + * @gpio_pin: ab8500 gpio pin offset number (for sysclkreq regulator only) */ struct ab8500_regulator_info { struct device *dev; @@ -57,6 +60,7 @@ struct ab8500_regulator_info { int const *voltages; int voltages_len; unsigned int delay; + unsigned int gpio_pin; }; /* voltage tables for the vauxn/vintcore supplies */ @@ -348,6 +352,88 @@ static struct regulator_ops ab8500_regulator_fixed_ops = { .set_voltage_time_sel = ab8500_regulator_set_voltage_time_sel, }; +static int ab8500_sysclkreq_enable(struct regulator_dev *rdev) +{ + int ret; + struct ab8500_regulator_info *info = rdev_get_drvdata(rdev); + + if (info == NULL) { + dev_err(rdev_get_dev(rdev), "regulator info null pointer\n"); + return -EINVAL; + } + + ret = ab8500_gpio_config_select(info->dev, info->gpio_pin, false); + if (ret < 0) { + dev_err(rdev_get_dev(rdev), + "couldn't set sysclkreq pin selection\n"); + return ret; + } + + dev_vdbg(rdev_get_dev(rdev), + "%s-enable (gpio_pin, gpio_select): %i, false\n", + info->desc.name, info->gpio_pin); + + return ret; +} + +static int ab8500_sysclkreq_disable(struct regulator_dev *rdev) +{ + int ret; + struct ab8500_regulator_info *info = rdev_get_drvdata(rdev); + + if (info == NULL) { + dev_err(rdev_get_dev(rdev), "regulator info null pointer\n"); + return -EINVAL; + } + + ret = ab8500_gpio_config_select(info->dev, info->gpio_pin, true); + if (ret < 0) { + dev_err(rdev_get_dev(rdev), + "couldn't set gpio pin selection\n"); + return ret; + } + + dev_vdbg(rdev_get_dev(rdev), + "%s-disable (gpio_pin, gpio_select): %i, true\n", + info->desc.name, info->gpio_pin); + + return ret; +} + +static int ab8500_sysclkreq_is_enabled(struct regulator_dev *rdev) +{ + int ret; + struct ab8500_regulator_info *info = rdev_get_drvdata(rdev); + bool gpio_select; + + if (info == NULL) { + dev_err(rdev_get_dev(rdev), "regulator info null pointer\n"); + return -EINVAL; + } + + ret = ab8500_gpio_config_get_select(info->dev, info->gpio_pin, + &gpio_select); + if (ret < 0) { + dev_err(rdev_get_dev(rdev), + "couldn't read gpio pin selection\n"); + return ret; + } + + dev_vdbg(rdev_get_dev(rdev), + "%s-is_enabled (gpio_pin, is_enabled): %i, %i\n", + info->desc.name, info->gpio_pin, !gpio_select); + + return !gpio_select; +} + +static struct regulator_ops ab8500_sysclkreq_ops = { + .enable = ab8500_sysclkreq_enable, + .disable = ab8500_sysclkreq_disable, + .is_enabled = ab8500_sysclkreq_is_enabled, + .get_voltage = ab8500_fixed_get_voltage, + .list_voltage = ab8500_list_voltage, +}; + static struct ab8500_regulator_info ab8500_regulator_info[AB8500_NUM_REGULATORS] = { /* @@ -553,7 +639,33 @@ static struct ab8500_regulator_info .update_val_enable = 0x04, }, - + /* + * SysClkReq regulators + */ + [AB8500_SYSCLKREQ_2] = { + .desc = { + .name = "SYSCLKREQ-2", + .ops = &ab8500_sysclkreq_ops, + .type = REGULATOR_VOLTAGE, + .id = AB8500_SYSCLKREQ_2, + .owner = THIS_MODULE, + .n_voltages = 1, + }, + .fixed_uV = 1, /* bogus value */ + .gpio_pin = 0, /* AB8500_PIN_GPIO1 */ + }, + [AB8500_SYSCLKREQ_4] = { + .desc = { + .name = "SYSCLKREQ-4", + .ops = &ab8500_sysclkreq_ops, + .type = REGULATOR_VOLTAGE, + .id = AB8500_SYSCLKREQ_4, + .owner = THIS_MODULE, + .n_voltages = 1, + }, + .fixed_uV = 1, /* bogus value */ + .gpio_pin = 2, /* AB8500_PIN_GPIO3 */ + }, }; struct ab8500_reg_init { diff --git a/include/linux/mfd/ab8500/gpio.h b/include/linux/mfd/ab8500/gpio.h index 2b4f1452c74..8ab95be71af 100644 --- a/include/linux/mfd/ab8500/gpio.h +++ b/include/linux/mfd/ab8500/gpio.h @@ -20,5 +20,12 @@ struct ab8500_gpio_platform_data { int ab8500_config_pull_up_or_down(struct device *dev, unsigned ab8500_gpio_offset, bool enable); + +int ab8500_gpio_config_select(struct device *dev, + unsigned ab8500_gpio_offset, bool gpio_select); + +int ab8500_gpio_config_get_select(struct device *dev, + unsigned ab8500_gpio_offset, bool *gpio_select); + #endif /* _AB8500_GPIO_H */ diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index b753789fabc..29b5e19c4f4 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h @@ -23,6 +23,8 @@ enum ab8500_regulator_id { AB8500_LDO_ANAMIC2, AB8500_LDO_DMIC, AB8500_LDO_ANA, + AB8500_SYSCLKREQ_2, + AB8500_SYSCLKREQ_4, AB8500_NUM_REGULATORS, }; |