diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/i2c/twl.h | 31 | ||||
| -rw-r--r-- | include/linux/input/ti_am335x_tsc.h | 23 | ||||
| -rw-r--r-- | include/linux/mfd/88pm80x.h | 17 | ||||
| -rw-r--r-- | include/linux/mfd/abx500/ab8500.h | 2 | ||||
| -rw-r--r-- | include/linux/mfd/arizona/core.h | 2 | ||||
| -rw-r--r-- | include/linux/mfd/davinci_voicecodec.h | 4 | ||||
| -rw-r--r-- | include/linux/mfd/kempld.h | 125 | ||||
| -rw-r--r-- | include/linux/mfd/max8998-private.h | 7 | ||||
| -rw-r--r-- | include/linux/mfd/max8998.h | 20 | ||||
| -rw-r--r-- | include/linux/mfd/palmas.h | 14 | ||||
| -rw-r--r-- | include/linux/mfd/rtsx_pci.h | 1 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/core.h | 6 | ||||
| -rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 35 | ||||
| -rw-r--r-- | include/linux/mfd/wm8994/core.h | 2 | ||||
| -rw-r--r-- | include/linux/mfd/wm8994/pdata.h | 5 | ||||
| -rw-r--r-- | include/linux/platform_data/ti_am335x_adc.h | 14 |
16 files changed, 209 insertions, 99 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 488debbef895..81cbbdb96aae 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
| @@ -658,7 +658,6 @@ struct twl4030_power_data { | |||
| 658 | bool use_poweroff; /* Board is wired for TWL poweroff */ | 658 | bool use_poweroff; /* Board is wired for TWL poweroff */ |
| 659 | }; | 659 | }; |
| 660 | 660 | ||
| 661 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); | ||
| 662 | extern int twl4030_remove_script(u8 flags); | 661 | extern int twl4030_remove_script(u8 flags); |
| 663 | extern void twl4030_power_off(void); | 662 | extern void twl4030_power_off(void); |
| 664 | 663 | ||
| @@ -726,7 +725,7 @@ struct twl4030_platform_data { | |||
| 726 | struct regulator_init_data *clk32kg; | 725 | struct regulator_init_data *clk32kg; |
| 727 | struct regulator_init_data *v1v8; | 726 | struct regulator_init_data *v1v8; |
| 728 | struct regulator_init_data *v2v1; | 727 | struct regulator_init_data *v2v1; |
| 729 | /* TWL6025 LDO regulators */ | 728 | /* TWL6032 LDO regulators */ |
| 730 | struct regulator_init_data *ldo1; | 729 | struct regulator_init_data *ldo1; |
| 731 | struct regulator_init_data *ldo2; | 730 | struct regulator_init_data *ldo2; |
| 732 | struct regulator_init_data *ldo3; | 731 | struct regulator_init_data *ldo3; |
| @@ -736,7 +735,7 @@ struct twl4030_platform_data { | |||
| 736 | struct regulator_init_data *ldo7; | 735 | struct regulator_init_data *ldo7; |
| 737 | struct regulator_init_data *ldoln; | 736 | struct regulator_init_data *ldoln; |
| 738 | struct regulator_init_data *ldousb; | 737 | struct regulator_init_data *ldousb; |
| 739 | /* TWL6025 DCDC regulators */ | 738 | /* TWL6032 DCDC regulators */ |
| 740 | struct regulator_init_data *smps3; | 739 | struct regulator_init_data *smps3; |
| 741 | struct regulator_init_data *smps4; | 740 | struct regulator_init_data *smps4; |
| 742 | struct regulator_init_data *vio6025; | 741 | struct regulator_init_data *vio6025; |
| @@ -753,7 +752,7 @@ struct twl_regulator_driver_data { | |||
| 753 | #define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */ | 752 | #define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */ |
| 754 | #define TWL5031 BIT(2) /* twl5031 has different registers */ | 753 | #define TWL5031 BIT(2) /* twl5031 has different registers */ |
| 755 | #define TWL6030_CLASS BIT(3) /* TWL6030 class */ | 754 | #define TWL6030_CLASS BIT(3) /* TWL6030 class */ |
| 756 | #define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */ | 755 | #define TWL6032_SUBCLASS BIT(4) /* TWL6032 has changed registers */ |
| 757 | #define TWL4030_ALLOW_UNSUPPORTED BIT(5) /* Some voltages are possible | 756 | #define TWL4030_ALLOW_UNSUPPORTED BIT(5) /* Some voltages are possible |
| 758 | * but not officially supported. | 757 | * but not officially supported. |
| 759 | * This flag is necessary to | 758 | * This flag is necessary to |
| @@ -840,20 +839,20 @@ static inline int twl4030charger_usb_en(int enable) { return 0; } | |||
| 840 | #define TWL6030_REG_CLK32KG 48 | 839 | #define TWL6030_REG_CLK32KG 48 |
| 841 | 840 | ||
| 842 | /* LDOs on 6025 have different names */ | 841 | /* LDOs on 6025 have different names */ |
| 843 | #define TWL6025_REG_LDO2 49 | 842 | #define TWL6032_REG_LDO2 49 |
| 844 | #define TWL6025_REG_LDO4 50 | 843 | #define TWL6032_REG_LDO4 50 |
| 845 | #define TWL6025_REG_LDO3 51 | 844 | #define TWL6032_REG_LDO3 51 |
| 846 | #define TWL6025_REG_LDO5 52 | 845 | #define TWL6032_REG_LDO5 52 |
| 847 | #define TWL6025_REG_LDO1 53 | 846 | #define TWL6032_REG_LDO1 53 |
| 848 | #define TWL6025_REG_LDO7 54 | 847 | #define TWL6032_REG_LDO7 54 |
| 849 | #define TWL6025_REG_LDO6 55 | 848 | #define TWL6032_REG_LDO6 55 |
| 850 | #define TWL6025_REG_LDOLN 56 | 849 | #define TWL6032_REG_LDOLN 56 |
| 851 | #define TWL6025_REG_LDOUSB 57 | 850 | #define TWL6032_REG_LDOUSB 57 |
| 852 | 851 | ||
| 853 | /* 6025 DCDC supplies */ | 852 | /* 6025 DCDC supplies */ |
| 854 | #define TWL6025_REG_SMPS3 58 | 853 | #define TWL6032_REG_SMPS3 58 |
| 855 | #define TWL6025_REG_SMPS4 59 | 854 | #define TWL6032_REG_SMPS4 59 |
| 856 | #define TWL6025_REG_VIO 60 | 855 | #define TWL6032_REG_VIO 60 |
| 857 | 856 | ||
| 858 | 857 | ||
| 859 | #endif /* End of __TWL4030_H */ | 858 | #endif /* End of __TWL4030_H */ |
diff --git a/include/linux/input/ti_am335x_tsc.h b/include/linux/input/ti_am335x_tsc.h deleted file mode 100644 index 49269a2aa329..000000000000 --- a/include/linux/input/ti_am335x_tsc.h +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | #ifndef __LINUX_TI_AM335X_TSC_H | ||
| 2 | #define __LINUX_TI_AM335X_TSC_H | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct tsc_data Touchscreen wire configuration | ||
| 6 | * @wires: Wires refer to application modes | ||
| 7 | * i.e. 4/5/8 wire touchscreen support | ||
| 8 | * on the platform. | ||
| 9 | * @x_plate_resistance: X plate resistance. | ||
| 10 | * @steps_to_configure: The sequencer supports a total of | ||
| 11 | * 16 programmable steps. | ||
| 12 | * A step configured to read a single | ||
| 13 | * co-ordinate value, can be applied | ||
| 14 | * more number of times for better results. | ||
| 15 | */ | ||
| 16 | |||
| 17 | struct tsc_data { | ||
| 18 | int wires; | ||
| 19 | int x_plate_resistance; | ||
| 20 | int steps_to_configure; | ||
| 21 | }; | ||
| 22 | |||
| 23 | #endif | ||
diff --git a/include/linux/mfd/88pm80x.h b/include/linux/mfd/88pm80x.h index e94537befabd..97cb283cc8e1 100644 --- a/include/linux/mfd/88pm80x.h +++ b/include/linux/mfd/88pm80x.h | |||
| @@ -17,7 +17,6 @@ | |||
| 17 | #include <linux/regmap.h> | 17 | #include <linux/regmap.h> |
| 18 | #include <linux/atomic.h> | 18 | #include <linux/atomic.h> |
| 19 | 19 | ||
| 20 | #define PM80X_VERSION_MASK (0xFF) /* 80X chip ID mask */ | ||
| 21 | enum { | 20 | enum { |
| 22 | CHIP_INVALID = 0, | 21 | CHIP_INVALID = 0, |
| 23 | CHIP_PM800, | 22 | CHIP_PM800, |
| @@ -299,8 +298,7 @@ struct pm80x_chip { | |||
| 299 | struct regmap *regmap; | 298 | struct regmap *regmap; |
| 300 | struct regmap_irq_chip *regmap_irq_chip; | 299 | struct regmap_irq_chip *regmap_irq_chip; |
| 301 | struct regmap_irq_chip_data *irq_data; | 300 | struct regmap_irq_chip_data *irq_data; |
| 302 | unsigned char version; | 301 | int type; |
| 303 | int id; | ||
| 304 | int irq; | 302 | int irq; |
| 305 | int irq_mode; | 303 | int irq_mode; |
| 306 | unsigned long wu_flag; | 304 | unsigned long wu_flag; |
| @@ -309,8 +307,14 @@ struct pm80x_chip { | |||
| 309 | 307 | ||
| 310 | struct pm80x_platform_data { | 308 | struct pm80x_platform_data { |
| 311 | struct pm80x_rtc_pdata *rtc; | 309 | struct pm80x_rtc_pdata *rtc; |
| 312 | unsigned short power_page_addr; /* power page I2C address */ | 310 | /* |
| 313 | unsigned short gpadc_page_addr; /* gpadc page I2C address */ | 311 | * For the regulator not defined, set regulators[not_defined] to be |
| 312 | * NULL. num_regulators are the number of regulators supposed to be | ||
| 313 | * initialized. If all regulators are not defined, set num_regulators | ||
| 314 | * to be 0. | ||
| 315 | */ | ||
| 316 | struct regulator_init_data *regulators[PM800_ID_RG_MAX]; | ||
| 317 | unsigned int num_regulators; | ||
| 314 | int irq_mode; /* Clear interrupt by read/write(0/1) */ | 318 | int irq_mode; /* Clear interrupt by read/write(0/1) */ |
| 315 | int batt_det; /* enable/disable */ | 319 | int batt_det; /* enable/disable */ |
| 316 | int (*plat_config)(struct pm80x_chip *chip, | 320 | int (*plat_config)(struct pm80x_chip *chip, |
| @@ -363,7 +367,6 @@ static inline int pm80x_dev_resume(struct device *dev) | |||
| 363 | } | 367 | } |
| 364 | #endif | 368 | #endif |
| 365 | 369 | ||
| 366 | extern int pm80x_init(struct i2c_client *client, | 370 | extern int pm80x_init(struct i2c_client *client); |
| 367 | const struct i2c_device_id *id); | ||
| 368 | extern int pm80x_deinit(void); | 371 | extern int pm80x_deinit(void); |
| 369 | #endif /* __LINUX_MFD_88PM80X_H */ | 372 | #endif /* __LINUX_MFD_88PM80X_H */ |
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 0390d5943ed6..f4acd898dac9 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
| @@ -291,6 +291,8 @@ enum ab8500_version { | |||
| 291 | #define AB8540_INT_FSYNC2R 213 | 291 | #define AB8540_INT_FSYNC2R 213 |
| 292 | #define AB8540_INT_BITCLK2F 214 | 292 | #define AB8540_INT_BITCLK2F 214 |
| 293 | #define AB8540_INT_BITCLK2R 215 | 293 | #define AB8540_INT_BITCLK2R 215 |
| 294 | /* ab8540_irq_regoffset[27] -> IT[Source|Latch|Mask]33 */ | ||
| 295 | #define AB8540_INT_RTC_1S 216 | ||
| 294 | 296 | ||
| 295 | /* | 297 | /* |
| 296 | * AB8500_AB9540_NR_IRQS is used when configuring the IRQ numbers for the | 298 | * AB8500_AB9540_NR_IRQS is used when configuring the IRQ numbers for the |
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index f797bb9b8b56..5cf8b91ce996 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | enum arizona_type { | 23 | enum arizona_type { |
| 24 | WM5102 = 1, | 24 | WM5102 = 1, |
| 25 | WM5110 = 2, | 25 | WM5110 = 2, |
| 26 | WM8997 = 3, | ||
| 26 | }; | 27 | }; |
| 27 | 28 | ||
| 28 | #define ARIZONA_IRQ_GP1 0 | 29 | #define ARIZONA_IRQ_GP1 0 |
| @@ -121,5 +122,6 @@ int arizona_set_irq_wake(struct arizona *arizona, int irq, int on); | |||
| 121 | 122 | ||
| 122 | int wm5102_patch(struct arizona *arizona); | 123 | int wm5102_patch(struct arizona *arizona); |
| 123 | int wm5110_patch(struct arizona *arizona); | 124 | int wm5110_patch(struct arizona *arizona); |
| 125 | int wm8997_patch(struct arizona *arizona); | ||
| 124 | 126 | ||
| 125 | #endif | 127 | #endif |
diff --git a/include/linux/mfd/davinci_voicecodec.h b/include/linux/mfd/davinci_voicecodec.h index 7dd6524d2aac..13a1ee95a233 100644 --- a/include/linux/mfd/davinci_voicecodec.h +++ b/include/linux/mfd/davinci_voicecodec.h | |||
| @@ -28,6 +28,8 @@ | |||
| 28 | #include <linux/mfd/core.h> | 28 | #include <linux/mfd/core.h> |
| 29 | #include <linux/platform_data/edma.h> | 29 | #include <linux/platform_data/edma.h> |
| 30 | 30 | ||
| 31 | #include <mach/hardware.h> | ||
| 32 | |||
| 31 | /* | 33 | /* |
| 32 | * Register values. | 34 | * Register values. |
| 33 | */ | 35 | */ |
| @@ -111,8 +113,6 @@ struct davinci_vc { | |||
| 111 | 113 | ||
| 112 | /* Memory resources */ | 114 | /* Memory resources */ |
| 113 | void __iomem *base; | 115 | void __iomem *base; |
| 114 | resource_size_t pbase; | ||
| 115 | size_t base_size; | ||
| 116 | 116 | ||
| 117 | /* MFD cells */ | 117 | /* MFD cells */ |
| 118 | struct mfd_cell cells[DAVINCI_VC_CELLS]; | 118 | struct mfd_cell cells[DAVINCI_VC_CELLS]; |
diff --git a/include/linux/mfd/kempld.h b/include/linux/mfd/kempld.h new file mode 100644 index 000000000000..b911ef3add03 --- /dev/null +++ b/include/linux/mfd/kempld.h | |||
| @@ -0,0 +1,125 @@ | |||
| 1 | /* | ||
| 2 | * Kontron PLD driver definitions | ||
| 3 | * | ||
| 4 | * Copyright (c) 2010-2012 Kontron Europe GmbH | ||
| 5 | * Author: Michael Brunner <michael.brunner@kontron.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License 2 as published | ||
| 9 | * by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _LINUX_MFD_KEMPLD_H_ | ||
| 13 | #define _LINUX_MFD_KEMPLD_H_ | ||
| 14 | |||
| 15 | /* kempld register definitions */ | ||
| 16 | #define KEMPLD_IOINDEX 0xa80 | ||
| 17 | #define KEMPLD_IODATA 0xa81 | ||
| 18 | #define KEMPLD_MUTEX_KEY 0x80 | ||
| 19 | #define KEMPLD_VERSION 0x00 | ||
| 20 | #define KEMPLD_VERSION_LSB 0x00 | ||
| 21 | #define KEMPLD_VERSION_MSB 0x01 | ||
| 22 | #define KEMPLD_VERSION_GET_MINOR(x) (x & 0x1f) | ||
| 23 | #define KEMPLD_VERSION_GET_MAJOR(x) ((x >> 5) & 0x1f) | ||
| 24 | #define KEMPLD_VERSION_GET_NUMBER(x) ((x >> 10) & 0xf) | ||
| 25 | #define KEMPLD_VERSION_GET_TYPE(x) ((x >> 14) & 0x3) | ||
| 26 | #define KEMPLD_BUILDNR 0x02 | ||
| 27 | #define KEMPLD_BUILDNR_LSB 0x02 | ||
| 28 | #define KEMPLD_BUILDNR_MSB 0x03 | ||
| 29 | #define KEMPLD_FEATURE 0x04 | ||
| 30 | #define KEMPLD_FEATURE_LSB 0x04 | ||
| 31 | #define KEMPLD_FEATURE_MSB 0x05 | ||
| 32 | #define KEMPLD_FEATURE_BIT_I2C (1 << 0) | ||
| 33 | #define KEMPLD_FEATURE_BIT_WATCHDOG (1 << 1) | ||
| 34 | #define KEMPLD_FEATURE_BIT_GPIO (1 << 2) | ||
| 35 | #define KEMPLD_FEATURE_MASK_UART (7 << 3) | ||
| 36 | #define KEMPLD_FEATURE_BIT_NMI (1 << 8) | ||
| 37 | #define KEMPLD_FEATURE_BIT_SMI (1 << 9) | ||
| 38 | #define KEMPLD_FEATURE_BIT_SCI (1 << 10) | ||
| 39 | #define KEMPLD_SPEC 0x06 | ||
| 40 | #define KEMPLD_SPEC_GET_MINOR(x) (x & 0x0f) | ||
| 41 | #define KEMPLD_SPEC_GET_MAJOR(x) ((x >> 4) & 0x0f) | ||
| 42 | #define KEMPLD_IRQ_GPIO 0x35 | ||
| 43 | #define KEMPLD_IRQ_I2C 0x36 | ||
| 44 | #define KEMPLD_CFG 0x37 | ||
| 45 | #define KEMPLD_CFG_GPIO_I2C_MUX (1 << 0) | ||
| 46 | #define KEMPLD_CFG_BIOS_WP (1 << 7) | ||
| 47 | |||
| 48 | #define KEMPLD_CLK 33333333 | ||
| 49 | |||
| 50 | #define KEMPLD_TYPE_RELEASE 0x0 | ||
| 51 | #define KEMPLD_TYPE_DEBUG 0x1 | ||
| 52 | #define KEMPLD_TYPE_CUSTOM 0x2 | ||
| 53 | |||
| 54 | /** | ||
| 55 | * struct kempld_info - PLD device information structure | ||
| 56 | * @major: PLD major revision | ||
| 57 | * @minor: PLD minor revision | ||
| 58 | * @buildnr: PLD build number | ||
| 59 | * @number: PLD board specific index | ||
| 60 | * @type: PLD type | ||
| 61 | * @spec_major: PLD FW specification major revision | ||
| 62 | * @spec_minor: PLD FW specification minor revision | ||
| 63 | */ | ||
| 64 | struct kempld_info { | ||
| 65 | unsigned int major; | ||
| 66 | unsigned int minor; | ||
| 67 | unsigned int buildnr; | ||
| 68 | unsigned int number; | ||
| 69 | unsigned int type; | ||
| 70 | unsigned int spec_major; | ||
| 71 | unsigned int spec_minor; | ||
| 72 | }; | ||
| 73 | |||
| 74 | /** | ||
| 75 | * struct kempld_device_data - Internal representation of the PLD device | ||
| 76 | * @io_base: Pointer to the IO memory | ||
| 77 | * @io_index: Pointer to the IO index register | ||
| 78 | * @io_data: Pointer to the IO data register | ||
| 79 | * @pld_clock: PLD clock frequency | ||
| 80 | * @feature_mask: PLD feature mask | ||
| 81 | * @dev: Pointer to kernel device structure | ||
| 82 | * @info: KEMPLD info structure | ||
| 83 | * @lock: PLD mutex | ||
| 84 | */ | ||
| 85 | struct kempld_device_data { | ||
| 86 | void __iomem *io_base; | ||
| 87 | void __iomem *io_index; | ||
| 88 | void __iomem *io_data; | ||
| 89 | u32 pld_clock; | ||
| 90 | u32 feature_mask; | ||
| 91 | struct device *dev; | ||
| 92 | struct kempld_info info; | ||
| 93 | struct mutex lock; | ||
| 94 | }; | ||
| 95 | |||
| 96 | /** | ||
| 97 | * struct kempld_platform_data - PLD hardware configuration structure | ||
| 98 | * @pld_clock: PLD clock frequency | ||
| 99 | * @gpio_base GPIO base pin number | ||
| 100 | * @ioresource: IO addresses of the PLD | ||
| 101 | * @get_mutex: PLD specific get_mutex callback | ||
| 102 | * @release_mutex: PLD specific release_mutex callback | ||
| 103 | * @get_info: PLD specific get_info callback | ||
| 104 | * @register_cells: PLD specific register_cells callback | ||
| 105 | */ | ||
| 106 | struct kempld_platform_data { | ||
| 107 | u32 pld_clock; | ||
| 108 | int gpio_base; | ||
| 109 | struct resource *ioresource; | ||
| 110 | void (*get_hardware_mutex) (struct kempld_device_data *); | ||
| 111 | void (*release_hardware_mutex) (struct kempld_device_data *); | ||
| 112 | int (*get_info) (struct kempld_device_data *); | ||
| 113 | int (*register_cells) (struct kempld_device_data *); | ||
| 114 | }; | ||
| 115 | |||
| 116 | extern void kempld_get_mutex(struct kempld_device_data *pld); | ||
| 117 | extern void kempld_release_mutex(struct kempld_device_data *pld); | ||
| 118 | extern u8 kempld_read8(struct kempld_device_data *pld, u8 index); | ||
| 119 | extern void kempld_write8(struct kempld_device_data *pld, u8 index, u8 data); | ||
| 120 | extern u16 kempld_read16(struct kempld_device_data *pld, u8 index); | ||
| 121 | extern void kempld_write16(struct kempld_device_data *pld, u8 index, u16 data); | ||
| 122 | extern u32 kempld_read32(struct kempld_device_data *pld, u8 index); | ||
| 123 | extern void kempld_write32(struct kempld_device_data *pld, u8 index, u32 data); | ||
| 124 | |||
| 125 | #endif /* _LINUX_MFD_KEMPLD_H_ */ | ||
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h index effa5d3b96ae..84844e0a5704 100644 --- a/include/linux/mfd/max8998-private.h +++ b/include/linux/mfd/max8998-private.h | |||
| @@ -132,9 +132,12 @@ enum { | |||
| 132 | 132 | ||
| 133 | #define MAX8998_ENRAMP (1 << 4) | 133 | #define MAX8998_ENRAMP (1 << 4) |
| 134 | 134 | ||
| 135 | struct irq_domain; | ||
| 136 | |||
| 135 | /** | 137 | /** |
| 136 | * struct max8998_dev - max8998 master device for sub-drivers | 138 | * struct max8998_dev - max8998 master device for sub-drivers |
| 137 | * @dev: master device of the chip (can be used to access platform data) | 139 | * @dev: master device of the chip (can be used to access platform data) |
| 140 | * @pdata: platform data for the driver and subdrivers | ||
| 138 | * @i2c: i2c client private data for regulator | 141 | * @i2c: i2c client private data for regulator |
| 139 | * @rtc: i2c client private data for rtc | 142 | * @rtc: i2c client private data for rtc |
| 140 | * @iolock: mutex for serializing io access | 143 | * @iolock: mutex for serializing io access |
| @@ -148,12 +151,14 @@ enum { | |||
| 148 | */ | 151 | */ |
| 149 | struct max8998_dev { | 152 | struct max8998_dev { |
| 150 | struct device *dev; | 153 | struct device *dev; |
| 154 | struct max8998_platform_data *pdata; | ||
| 151 | struct i2c_client *i2c; | 155 | struct i2c_client *i2c; |
| 152 | struct i2c_client *rtc; | 156 | struct i2c_client *rtc; |
| 153 | struct mutex iolock; | 157 | struct mutex iolock; |
| 154 | struct mutex irqlock; | 158 | struct mutex irqlock; |
| 155 | 159 | ||
| 156 | int irq_base; | 160 | unsigned int irq_base; |
| 161 | struct irq_domain *irq_domain; | ||
| 157 | int irq; | 162 | int irq; |
| 158 | int ono; | 163 | int ono; |
| 159 | u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; | 164 | u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; |
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h index 6823548d0c0a..e3956a654cbc 100644 --- a/include/linux/mfd/max8998.h +++ b/include/linux/mfd/max8998.h | |||
| @@ -58,10 +58,12 @@ enum { | |||
| 58 | * max8998_regulator_data - regulator data | 58 | * max8998_regulator_data - regulator data |
| 59 | * @id: regulator id | 59 | * @id: regulator id |
| 60 | * @initdata: regulator init data (contraints, supplies, ...) | 60 | * @initdata: regulator init data (contraints, supplies, ...) |
| 61 | * @reg_node: DT node of regulator (unused on non-DT platforms) | ||
| 61 | */ | 62 | */ |
| 62 | struct max8998_regulator_data { | 63 | struct max8998_regulator_data { |
| 63 | int id; | 64 | int id; |
| 64 | struct regulator_init_data *initdata; | 65 | struct regulator_init_data *initdata; |
| 66 | struct device_node *reg_node; | ||
| 65 | }; | 67 | }; |
| 66 | 68 | ||
| 67 | /** | 69 | /** |
| @@ -73,12 +75,8 @@ struct max8998_regulator_data { | |||
| 73 | * @buck_voltage_lock: Do NOT change the values of the following six | 75 | * @buck_voltage_lock: Do NOT change the values of the following six |
| 74 | * registers set by buck?_voltage?. The voltage of BUCK1/2 cannot | 76 | * registers set by buck?_voltage?. The voltage of BUCK1/2 cannot |
| 75 | * be other than the preset values. | 77 | * be other than the preset values. |
| 76 | * @buck1_voltage1: BUCK1 DVS mode 1 voltage register | 78 | * @buck1_voltage: BUCK1 DVS mode 1 voltage registers |
| 77 | * @buck1_voltage2: BUCK1 DVS mode 2 voltage register | 79 | * @buck2_voltage: BUCK2 DVS mode 2 voltage registers |
| 78 | * @buck1_voltage3: BUCK1 DVS mode 3 voltage register | ||
| 79 | * @buck1_voltage4: BUCK1 DVS mode 4 voltage register | ||
| 80 | * @buck2_voltage1: BUCK2 DVS mode 1 voltage register | ||
| 81 | * @buck2_voltage2: BUCK2 DVS mode 2 voltage register | ||
| 82 | * @buck1_set1: BUCK1 gpio pin 1 to set output voltage | 80 | * @buck1_set1: BUCK1 gpio pin 1 to set output voltage |
| 83 | * @buck1_set2: BUCK1 gpio pin 2 to set output voltage | 81 | * @buck1_set2: BUCK1 gpio pin 2 to set output voltage |
| 84 | * @buck1_default_idx: Default for BUCK1 gpio pin 1, 2 | 82 | * @buck1_default_idx: Default for BUCK1 gpio pin 1, 2 |
| @@ -100,15 +98,11 @@ struct max8998_regulator_data { | |||
| 100 | struct max8998_platform_data { | 98 | struct max8998_platform_data { |
| 101 | struct max8998_regulator_data *regulators; | 99 | struct max8998_regulator_data *regulators; |
| 102 | int num_regulators; | 100 | int num_regulators; |
| 103 | int irq_base; | 101 | unsigned int irq_base; |
| 104 | int ono; | 102 | int ono; |
| 105 | bool buck_voltage_lock; | 103 | bool buck_voltage_lock; |
| 106 | int buck1_voltage1; | 104 | int buck1_voltage[4]; |
| 107 | int buck1_voltage2; | 105 | int buck2_voltage[2]; |
| 108 | int buck1_voltage3; | ||
| 109 | int buck1_voltage4; | ||
| 110 | int buck2_voltage1; | ||
| 111 | int buck2_voltage2; | ||
| 112 | int buck1_set1; | 106 | int buck1_set1; |
| 113 | int buck1_set2; | 107 | int buck1_set2; |
| 114 | int buck1_default_idx; | 108 | int buck1_default_idx; |
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h index 9b81b2bdc46b..1a8dd7afe084 100644 --- a/include/linux/mfd/palmas.h +++ b/include/linux/mfd/palmas.h | |||
| @@ -34,6 +34,19 @@ | |||
| 34 | ((a) == PALMAS_CHIP_ID)) | 34 | ((a) == PALMAS_CHIP_ID)) |
| 35 | #define is_palmas_charger(a) ((a) == PALMAS_CHIP_CHARGER_ID) | 35 | #define is_palmas_charger(a) ((a) == PALMAS_CHIP_CHARGER_ID) |
| 36 | 36 | ||
| 37 | /** | ||
| 38 | * Palmas PMIC feature types | ||
| 39 | * | ||
| 40 | * PALMAS_PMIC_FEATURE_SMPS10_BOOST - used when the PMIC provides SMPS10_BOOST | ||
| 41 | * regulator. | ||
| 42 | * | ||
| 43 | * PALMAS_PMIC_HAS(b, f) - macro to check if a bandgap device is capable of a | ||
| 44 | * specific feature (above) or not. Return non-zero, if yes. | ||
| 45 | */ | ||
| 46 | #define PALMAS_PMIC_FEATURE_SMPS10_BOOST BIT(0) | ||
| 47 | #define PALMAS_PMIC_HAS(b, f) \ | ||
| 48 | ((b)->features & PALMAS_PMIC_FEATURE_ ## f) | ||
| 49 | |||
| 37 | struct palmas_pmic; | 50 | struct palmas_pmic; |
| 38 | struct palmas_gpadc; | 51 | struct palmas_gpadc; |
| 39 | struct palmas_resource; | 52 | struct palmas_resource; |
| @@ -54,6 +67,7 @@ struct palmas { | |||
| 54 | /* Stored chip id */ | 67 | /* Stored chip id */ |
| 55 | int id; | 68 | int id; |
| 56 | 69 | ||
| 70 | unsigned int features; | ||
| 57 | /* IRQ Data */ | 71 | /* IRQ Data */ |
| 58 | int irq; | 72 | int irq; |
| 59 | u32 irq_mask; | 73 | u32 irq_mask; |
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 86bc635f8385..7a9f7089435d 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
| @@ -575,6 +575,7 @@ | |||
| 575 | 575 | ||
| 576 | #define CARD_PWR_CTL 0xFD50 | 576 | #define CARD_PWR_CTL 0xFD50 |
| 577 | #define CARD_CLK_SWITCH 0xFD51 | 577 | #define CARD_CLK_SWITCH 0xFD51 |
| 578 | #define RTL8411B_PACKAGE_MODE 0xFD51 | ||
| 578 | #define CARD_SHARE_MODE 0xFD52 | 579 | #define CARD_SHARE_MODE 0xFD52 |
| 579 | #define CARD_DRIVE_SEL 0xFD53 | 580 | #define CARD_DRIVE_SEL 0xFD53 |
| 580 | #define CARD_STOP 0xFD54 | 581 | #define CARD_STOP 0xFD54 |
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index f0f4de3b4ccc..378ae8a04c6a 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
| @@ -14,8 +14,6 @@ | |||
| 14 | #ifndef __LINUX_MFD_SEC_CORE_H | 14 | #ifndef __LINUX_MFD_SEC_CORE_H |
| 15 | #define __LINUX_MFD_SEC_CORE_H | 15 | #define __LINUX_MFD_SEC_CORE_H |
| 16 | 16 | ||
| 17 | #define NUM_IRQ_REGS 4 | ||
| 18 | |||
| 19 | enum sec_device_type { | 17 | enum sec_device_type { |
| 20 | S5M8751X, | 18 | S5M8751X, |
| 21 | S5M8763X, | 19 | S5M8763X, |
| @@ -44,8 +42,6 @@ struct sec_pmic_dev { | |||
| 44 | struct regmap *regmap; | 42 | struct regmap *regmap; |
| 45 | struct i2c_client *i2c; | 43 | struct i2c_client *i2c; |
| 46 | struct i2c_client *rtc; | 44 | struct i2c_client *rtc; |
| 47 | struct mutex iolock; | ||
| 48 | struct mutex irqlock; | ||
| 49 | 45 | ||
| 50 | int device_type; | 46 | int device_type; |
| 51 | int irq_base; | 47 | int irq_base; |
| @@ -53,8 +49,6 @@ struct sec_pmic_dev { | |||
| 53 | struct regmap_irq_chip_data *irq_data; | 49 | struct regmap_irq_chip_data *irq_data; |
| 54 | 50 | ||
| 55 | int ono; | 51 | int ono; |
| 56 | u8 irq_masks_cur[NUM_IRQ_REGS]; | ||
| 57 | u8 irq_masks_cache[NUM_IRQ_REGS]; | ||
| 58 | int type; | 52 | int type; |
| 59 | bool wakeup; | 53 | bool wakeup; |
| 60 | }; | 54 | }; |
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index c79ad5d2f271..8d73fe29796a 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
| @@ -30,8 +30,8 @@ | |||
| 30 | #define REG_IDLECONFIG 0x058 | 30 | #define REG_IDLECONFIG 0x058 |
| 31 | #define REG_CHARGECONFIG 0x05C | 31 | #define REG_CHARGECONFIG 0x05C |
| 32 | #define REG_CHARGEDELAY 0x060 | 32 | #define REG_CHARGEDELAY 0x060 |
| 33 | #define REG_STEPCONFIG(n) (0x64 + ((n - 1) * 8)) | 33 | #define REG_STEPCONFIG(n) (0x64 + ((n) * 8)) |
| 34 | #define REG_STEPDELAY(n) (0x68 + ((n - 1) * 8)) | 34 | #define REG_STEPDELAY(n) (0x68 + ((n) * 8)) |
| 35 | #define REG_FIFO0CNT 0xE4 | 35 | #define REG_FIFO0CNT 0xE4 |
| 36 | #define REG_FIFO0THR 0xE8 | 36 | #define REG_FIFO0THR 0xE8 |
| 37 | #define REG_FIFO1CNT 0xF0 | 37 | #define REG_FIFO1CNT 0xF0 |
| @@ -46,8 +46,6 @@ | |||
| 46 | /* Step Enable */ | 46 | /* Step Enable */ |
| 47 | #define STEPENB_MASK (0x1FFFF << 0) | 47 | #define STEPENB_MASK (0x1FFFF << 0) |
| 48 | #define STEPENB(val) ((val) << 0) | 48 | #define STEPENB(val) ((val) << 0) |
| 49 | #define STPENB_STEPENB STEPENB(0x1FFFF) | ||
| 50 | #define STPENB_STEPENB_TC STEPENB(0x1FFF) | ||
| 51 | 49 | ||
| 52 | /* IRQ enable */ | 50 | /* IRQ enable */ |
| 53 | #define IRQENB_HW_PEN BIT(0) | 51 | #define IRQENB_HW_PEN BIT(0) |
| @@ -73,8 +71,6 @@ | |||
| 73 | #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) | 71 | #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) |
| 74 | #define STEPCONFIG_INP_MASK (0xF << 19) | 72 | #define STEPCONFIG_INP_MASK (0xF << 19) |
| 75 | #define STEPCONFIG_INP(val) ((val) << 19) | 73 | #define STEPCONFIG_INP(val) ((val) << 19) |
| 76 | #define STEPCONFIG_INP_AN2 STEPCONFIG_INP(2) | ||
| 77 | #define STEPCONFIG_INP_AN3 STEPCONFIG_INP(3) | ||
| 78 | #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) | 74 | #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) |
| 79 | #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) | 75 | #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) |
| 80 | #define STEPCONFIG_FIFO1 BIT(26) | 76 | #define STEPCONFIG_FIFO1 BIT(26) |
| @@ -96,7 +92,6 @@ | |||
| 96 | #define STEPCHARGE_INM_AN1 STEPCHARGE_INM(1) | 92 | #define STEPCHARGE_INM_AN1 STEPCHARGE_INM(1) |
| 97 | #define STEPCHARGE_INP_MASK (0xF << 19) | 93 | #define STEPCHARGE_INP_MASK (0xF << 19) |
| 98 | #define STEPCHARGE_INP(val) ((val) << 19) | 94 | #define STEPCHARGE_INP(val) ((val) << 19) |
| 99 | #define STEPCHARGE_INP_AN1 STEPCHARGE_INP(1) | ||
| 100 | #define STEPCHARGE_RFM_MASK (3 << 23) | 95 | #define STEPCHARGE_RFM_MASK (3 << 23) |
| 101 | #define STEPCHARGE_RFM(val) ((val) << 23) | 96 | #define STEPCHARGE_RFM(val) ((val) << 23) |
| 102 | #define STEPCHARGE_RFM_XNUR STEPCHARGE_RFM(1) | 97 | #define STEPCHARGE_RFM_XNUR STEPCHARGE_RFM(1) |
| @@ -125,22 +120,17 @@ | |||
| 125 | 120 | ||
| 126 | #define TSCADC_CELLS 2 | 121 | #define TSCADC_CELLS 2 |
| 127 | 122 | ||
| 128 | enum tscadc_cells { | ||
| 129 | TSC_CELL, | ||
| 130 | ADC_CELL, | ||
| 131 | }; | ||
| 132 | |||
| 133 | struct mfd_tscadc_board { | ||
| 134 | struct tsc_data *tsc_init; | ||
| 135 | struct adc_data *adc_init; | ||
| 136 | }; | ||
| 137 | |||
| 138 | struct ti_tscadc_dev { | 123 | struct ti_tscadc_dev { |
| 139 | struct device *dev; | 124 | struct device *dev; |
| 140 | struct regmap *regmap_tscadc; | 125 | struct regmap *regmap_tscadc; |
| 141 | void __iomem *tscadc_base; | 126 | void __iomem *tscadc_base; |
| 142 | int irq; | 127 | int irq; |
| 128 | int used_cells; /* 1-2 */ | ||
| 129 | int tsc_cell; /* -1 if not used */ | ||
| 130 | int adc_cell; /* -1 if not used */ | ||
| 143 | struct mfd_cell cells[TSCADC_CELLS]; | 131 | struct mfd_cell cells[TSCADC_CELLS]; |
| 132 | u32 reg_se_cache; | ||
| 133 | spinlock_t reg_lock; | ||
| 144 | 134 | ||
| 145 | /* tsc device */ | 135 | /* tsc device */ |
| 146 | struct titsc *tsc; | 136 | struct titsc *tsc; |
| @@ -149,4 +139,15 @@ struct ti_tscadc_dev { | |||
| 149 | struct adc_device *adc; | 139 | struct adc_device *adc; |
| 150 | }; | 140 | }; |
| 151 | 141 | ||
| 142 | static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p) | ||
| 143 | { | ||
| 144 | struct ti_tscadc_dev **tscadc_dev = p->dev.platform_data; | ||
| 145 | |||
| 146 | return *tscadc_dev; | ||
| 147 | } | ||
| 148 | |||
| 149 | void am335x_tsc_se_update(struct ti_tscadc_dev *tsadc); | ||
| 150 | void am335x_tsc_se_set(struct ti_tscadc_dev *tsadc, u32 val); | ||
| 151 | void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val); | ||
| 152 | |||
| 152 | #endif | 153 | #endif |
diff --git a/include/linux/mfd/wm8994/core.h b/include/linux/mfd/wm8994/core.h index ae5c249530b4..40854ac0ba3d 100644 --- a/include/linux/mfd/wm8994/core.h +++ b/include/linux/mfd/wm8994/core.h | |||
| @@ -29,6 +29,7 @@ enum wm8994_type { | |||
| 29 | 29 | ||
| 30 | struct regulator_dev; | 30 | struct regulator_dev; |
| 31 | struct regulator_bulk_data; | 31 | struct regulator_bulk_data; |
| 32 | struct irq_domain; | ||
| 32 | 33 | ||
| 33 | #define WM8994_NUM_GPIO_REGS 11 | 34 | #define WM8994_NUM_GPIO_REGS 11 |
| 34 | #define WM8994_NUM_LDO_REGS 2 | 35 | #define WM8994_NUM_LDO_REGS 2 |
| @@ -73,6 +74,7 @@ struct wm8994 { | |||
| 73 | 74 | ||
| 74 | int irq; | 75 | int irq; |
| 75 | struct regmap_irq_chip_data *irq_data; | 76 | struct regmap_irq_chip_data *irq_data; |
| 77 | struct irq_domain *edge_irq; | ||
| 76 | 78 | ||
| 77 | /* Used over suspend/resume */ | 79 | /* Used over suspend/resume */ |
| 78 | bool suspended; | 80 | bool suspended; |
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index b5046f6313a9..90c60524a496 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
| @@ -228,6 +228,11 @@ struct wm8994_pdata { | |||
| 228 | * lines is mastered. | 228 | * lines is mastered. |
| 229 | */ | 229 | */ |
| 230 | int max_channels_clocked[WM8994_NUM_AIF]; | 230 | int max_channels_clocked[WM8994_NUM_AIF]; |
| 231 | |||
| 232 | /** | ||
| 233 | * GPIO for the IRQ pin if host only supports edge triggering | ||
| 234 | */ | ||
| 235 | int irq_gpio; | ||
| 231 | }; | 236 | }; |
| 232 | 237 | ||
| 233 | #endif | 238 | #endif |
diff --git a/include/linux/platform_data/ti_am335x_adc.h b/include/linux/platform_data/ti_am335x_adc.h deleted file mode 100644 index e41d5834cb84..000000000000 --- a/include/linux/platform_data/ti_am335x_adc.h +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | #ifndef __LINUX_TI_AM335X_ADC_H | ||
| 2 | #define __LINUX_TI_AM335X_ADC_H | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct adc_data ADC Input information | ||
| 6 | * @adc_channels: Number of analog inputs | ||
| 7 | * available for ADC. | ||
| 8 | */ | ||
| 9 | |||
| 10 | struct adc_data { | ||
| 11 | unsigned int adc_channels; | ||
| 12 | }; | ||
| 13 | |||
| 14 | #endif | ||
