aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2013-08-06 09:12:35 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-08-14 15:00:42 -0400
commit0a8d3e2412841c6b1dab1006fd5f7ab5b689db21 (patch)
tree85073dffb6f90054e59446578315ec3a67ffc5e8 /include/linux/mfd
parente81c8f18afc4fdd6e34d8c83814b8b5134dbb30f (diff)
pinctrl: palmas: add pincontrol driver
TI Palmas series Power Management IC have multiple pins which can be configured for different functionality. This pins can be configured for different function. Also their properties like pull up/down, open drain enable/disable are configurable. Add support for pincontrol driver Palmas series device like TPS65913, TPS80036. The driver supports to be register from DT only. Changes from V1: - Add generic property for pins and functions in pinconf-generic. - Add APIs to map the DT and subnode. - Move common utils APIs to the pinctrl-utils from this file. - Update the binding document accordingly. Changes from V2: - Add ack by Lee. - Correct the binding docs. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/palmas.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 1a8dd7afe084..2891f7cd902e 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -449,7 +449,7 @@ enum usb_irq_events {
449#define PALMAS_DVFS_BASE 0x180 449#define PALMAS_DVFS_BASE 0x180
450#define PALMAS_PMU_CONTROL_BASE 0x1A0 450#define PALMAS_PMU_CONTROL_BASE 0x1A0
451#define PALMAS_RESOURCE_BASE 0x1D4 451#define PALMAS_RESOURCE_BASE 0x1D4
452#define PALMAS_PU_PD_OD_BASE 0x1F4 452#define PALMAS_PU_PD_OD_BASE 0x1F0
453#define PALMAS_LED_BASE 0x200 453#define PALMAS_LED_BASE 0x200
454#define PALMAS_INTERRUPT_BASE 0x210 454#define PALMAS_INTERRUPT_BASE 0x210
455#define PALMAS_USB_OTG_BASE 0x250 455#define PALMAS_USB_OTG_BASE 0x250
@@ -1734,16 +1734,20 @@ enum usb_irq_events {
1734#define PALMAS_REGEN3_CTRL_MODE_ACTIVE_SHIFT 0 1734#define PALMAS_REGEN3_CTRL_MODE_ACTIVE_SHIFT 0
1735 1735
1736/* Registers for function PAD_CONTROL */ 1736/* Registers for function PAD_CONTROL */
1737#define PALMAS_PU_PD_INPUT_CTRL1 0x0 1737#define PALMAS_OD_OUTPUT_CTRL2 0x2
1738#define PALMAS_PU_PD_INPUT_CTRL2 0x1 1738#define PALMAS_POLARITY_CTRL2 0x3
1739#define PALMAS_PU_PD_INPUT_CTRL3 0x2 1739#define PALMAS_PU_PD_INPUT_CTRL1 0x4
1740#define PALMAS_OD_OUTPUT_CTRL 0x4 1740#define PALMAS_PU_PD_INPUT_CTRL2 0x5
1741#define PALMAS_POLARITY_CTRL 0x5 1741#define PALMAS_PU_PD_INPUT_CTRL3 0x6
1742#define PALMAS_PRIMARY_SECONDARY_PAD1 0x6 1742#define PALMAS_PU_PD_INPUT_CTRL5 0x7
1743#define PALMAS_PRIMARY_SECONDARY_PAD2 0x7 1743#define PALMAS_OD_OUTPUT_CTRL 0x8
1744#define PALMAS_I2C_SPI 0x8 1744#define PALMAS_POLARITY_CTRL 0x9
1745#define PALMAS_PU_PD_INPUT_CTRL4 0x9 1745#define PALMAS_PRIMARY_SECONDARY_PAD1 0xA
1746#define PALMAS_PRIMARY_SECONDARY_PAD3 0xA 1746#define PALMAS_PRIMARY_SECONDARY_PAD2 0xB
1747#define PALMAS_I2C_SPI 0xC
1748#define PALMAS_PU_PD_INPUT_CTRL4 0xD
1749#define PALMAS_PRIMARY_SECONDARY_PAD3 0xE
1750#define PALMAS_PRIMARY_SECONDARY_PAD4 0xF
1747 1751
1748/* Bit definitions for PU_PD_INPUT_CTRL1 */ 1752/* Bit definitions for PU_PD_INPUT_CTRL1 */
1749#define PALMAS_PU_PD_INPUT_CTRL1_RESET_IN_PD 0x40 1753#define PALMAS_PU_PD_INPUT_CTRL1_RESET_IN_PD 0x40
@@ -2501,6 +2505,15 @@ enum usb_irq_events {
2501#define PALMAS_PU_PD_GPIO_CTRL1 0x6 2505#define PALMAS_PU_PD_GPIO_CTRL1 0x6
2502#define PALMAS_PU_PD_GPIO_CTRL2 0x7 2506#define PALMAS_PU_PD_GPIO_CTRL2 0x7
2503#define PALMAS_OD_OUTPUT_GPIO_CTRL 0x8 2507#define PALMAS_OD_OUTPUT_GPIO_CTRL 0x8
2508#define PALMAS_GPIO_DATA_IN2 0x9
2509#define PALMAS_GPIO_DATA_DIR2 0x0A
2510#define PALMAS_GPIO_DATA_OUT2 0x0B
2511#define PALMAS_GPIO_DEBOUNCE_EN2 0x0C
2512#define PALMAS_GPIO_CLEAR_DATA_OUT2 0x0D
2513#define PALMAS_GPIO_SET_DATA_OUT2 0x0E
2514#define PALMAS_PU_PD_GPIO_CTRL3 0x0F
2515#define PALMAS_PU_PD_GPIO_CTRL4 0x10
2516#define PALMAS_OD_OUTPUT_GPIO_CTRL2 0x11
2504 2517
2505/* Bit definitions for GPIO_DATA_IN */ 2518/* Bit definitions for GPIO_DATA_IN */
2506#define PALMAS_GPIO_DATA_IN_GPIO_7_IN 0x80 2519#define PALMAS_GPIO_DATA_IN_GPIO_7_IN 0x80