History

Merge tag 'mfd-for-linus-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull MFD fixes from Samuel Ortiz: "This is the first pull request for MFD fixes for 3.8 We have some build failure fixes (twl4030, vexpress, abx500 and tps65910), some actual runtime oops and lockup fixes (rtsx, da9052), and some more hypothetical NULL pointers dereferences fixes for pcf50633 and max776xx. Then we also have additional rtsx fixes for a correct switch output voltage and clock divider correctness for rtl8411 (rtsx driver), and irqdomain fix for db8550-prcmu, and some more cosmetic fixes for arizona and wm5102." * tag 'mfd-for-linus-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: rtsx: Fix oops when rtsx_pci_sdmmc is not probed mfd: wm5102: Fix definition of WM5102_MAX_REGISTER mfd: twl4030: Don't warn about uninitialized return code mfd: da9052/53 lockup fix mfd: rtsx: Add clock divider hook mmc: rtsx: Call MFD hook to switch output voltage mfd: rtsx: Add output voltage switch hook mfd: Fix compile errors and warnings when !CONFIG_AB8500_BM mfd: vexpress: Export global functions to fix build error mfd: arizona: Check errors from regcache_sync() mfd: tc3589x: Use simple irqdomain mfd: pcf50633: Init pcf->dev before using it mfd: max77693: Init max77693->dev before using it mfd: max77686: Init max77686->dev before using it mfd: db8500-prcmu: Fix irqdomain usage mfd: tps65910: Select REGMAP_IRQ in Kconfig to fix build error mfd: arizona: Disable control interface reporting for WM5102 and WM5110

Linus Torvalds committed 13 years ago

Commit 325a86b2 parents 22f8379 2d1484f24 files · +314 −129Browse files

Showing the changes to include/linux (6 of 24 files). Show all

Unified · Split

6 files
  1. include/linux/mfd/abx500.h +0 −2
  2. include/linux/mfd/abx500/ab8500-bm.h +4 −25
  3. include/linux/mfd/da9052/da9052.h +62 −4
  4. include/linux/mfd/da9052/reg.h +3 −0
  5. include/linux/mfd/rtsx_common.h +3 −0
  6. include/linux/mfd/rtsx_pci.h +21 −4
include/linux/mfd/abx500.h+0−2
@@ -272,8 +272,6 @@ struct abx500_bm_data { · 271 unmodified lines
272 const struct abx500_fg_parameters *fg_params;272 const struct abx500_fg_parameters *fg_params;
273};273};
274 274
275extern struct abx500_bm_data ab8500_bm_data;
276
277enum {275enum {
278 NTC_EXTERNAL = 0,276 NTC_EXTERNAL = 0,
279 NTC_INTERNAL,277 NTC_INTERNAL,
include/linux/mfd/abx500/ab8500-bm.h+4−25
@@ -422,7 +422,10 @@ struct ab8500_chargalg_platform_data { · 421 unmodified lines
422struct ab8500_btemp;422struct ab8500_btemp;
423struct ab8500_gpadc;423struct ab8500_gpadc;
424struct ab8500_fg;424struct ab8500_fg;
425
425#ifdef CONFIG_AB8500_BM426#ifdef CONFIG_AB8500_BM
427extern struct abx500_bm_data ab8500_bm_data;
428
426void ab8500_fg_reinit(void);429void ab8500_fg_reinit(void);
427void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA);430void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA);
428struct ab8500_btemp *ab8500_btemp_get(void);431struct ab8500_btemp *ab8500_btemp_get(void);
@@ -434,31 +437,7 @@ int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res); · 5 unmodified lines
434int ab8500_fg_inst_curr_done(struct ab8500_fg *di);437int ab8500_fg_inst_curr_done(struct ab8500_fg *di);
435 438
436#else439#else
437int ab8500_fg_inst_curr_done(struct ab8500_fg *di)440static struct abx500_bm_data ab8500_bm_data;
438{
439}
440static void ab8500_fg_reinit(void)
441{
442}
443static void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA)
444{
445}
446static struct ab8500_btemp *ab8500_btemp_get(void)
447{
448 return NULL;
449}
450static int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp)
451{
452 return 0;
453}
454struct ab8500_fg *ab8500_fg_get(void)
455{
456 return NULL;
457}
458static int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev)
459{
460 return -ENODEV;
461}
462 441
463static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di)442static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di)
464{443{
include/linux/mfd/da9052/da9052.h+62−4
@@ -99,6 +99,9 @@ struct da9052 { · 98 unmodified lines
99 u8 chip_id;99 u8 chip_id;
100 100
101 int chip_irq;101 int chip_irq;
102
103 /* SOC I/O transfer related fixes for DA9052/53 */
104 int (*fix_io) (struct da9052 *da9052, unsigned char reg);
102};105};
103 106
104/* ADC API */107/* ADC API */
@@ -113,32 +116,87 @@ static inline int da9052_reg_read(struct da9052 *da9052, unsigned char reg) · 8 unmodified lines
113 ret = regmap_read(da9052->regmap, reg, &val);116 ret = regmap_read(da9052->regmap, reg, &val);
114 if (ret < 0)117 if (ret < 0)
115 return ret;118 return ret;
119
120 if (da9052->fix_io) {
121 ret = da9052->fix_io(da9052, reg);
122 if (ret < 0)
123 return ret;
124 }
125
116 return val;126 return val;
117}127}
118 128
119static inline int da9052_reg_write(struct da9052 *da9052, unsigned char reg,129static inline int da9052_reg_write(struct da9052 *da9052, unsigned char reg,
120 unsigned char val)130 unsigned char val)
121{131{
122 return regmap_write(da9052->regmap, reg, val);132 int ret;
133
134 ret = regmap_write(da9052->regmap, reg, val);
135 if (ret < 0)
136 return ret;
137
138 if (da9052->fix_io) {
139 ret = da9052->fix_io(da9052, reg);
140 if (ret < 0)
141 return ret;
142 }
143
144 return ret;
123}145}
124 146
125static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg,147static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg,
126 unsigned reg_cnt, unsigned char *val)148 unsigned reg_cnt, unsigned char *val)
127{149{
128 return regmap_bulk_read(da9052->regmap, reg, val, reg_cnt);150 int ret;
151
152 ret = regmap_bulk_read(da9052->regmap, reg, val, reg_cnt);
153 if (ret < 0)
154 return ret;
155
156 if (da9052->fix_io) {
157 ret = da9052->fix_io(da9052, reg);
158 if (ret < 0)
159 return ret;
160 }
161
162 return ret;
129}163}
130 164
131static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg,165static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg,
132 unsigned reg_cnt, unsigned char *val)166 unsigned reg_cnt, unsigned char *val)
133{167{
134 return regmap_raw_write(da9052->regmap, reg, val, reg_cnt);168 int ret;
169
170 ret = regmap_raw_write(da9052->regmap, reg, val, reg_cnt);
171 if (ret < 0)
172 return ret;
173
174 if (da9052->fix_io) {
175 ret = da9052->fix_io(da9052, reg);
176 if (ret < 0)
177 return ret;
178 }
179
180 return ret;
135}181}
136 182
137static inline int da9052_reg_update(struct da9052 *da9052, unsigned char reg,183static inline int da9052_reg_update(struct da9052 *da9052, unsigned char reg,
138 unsigned char bit_mask,184 unsigned char bit_mask,
139 unsigned char reg_val)185 unsigned char reg_val)
140{186{
141 return regmap_update_bits(da9052->regmap, reg, bit_mask, reg_val);187 int ret;
188
189 ret = regmap_update_bits(da9052->regmap, reg, bit_mask, reg_val);
190 if (ret < 0)
191 return ret;
192
193 if (da9052->fix_io) {
194 ret = da9052->fix_io(da9052, reg);
195 if (ret < 0)
196 return ret;
197 }
198
199 return ret;
142}200}
143 201
144int da9052_device_init(struct da9052 *da9052, u8 chip_id);202int da9052_device_init(struct da9052 *da9052, u8 chip_id);
include/linux/mfd/da9052/reg.h+3−0
@@ -34,6 +34,9 @@ · 33 unmodified lines
34#define DA9052_STATUS_C_REG 334#define DA9052_STATUS_C_REG 3
35#define DA9052_STATUS_D_REG 435#define DA9052_STATUS_D_REG 4
36 36
37/* PARK REGISTER */
38#define DA9052_PARK_REGISTER DA9052_STATUS_D_REG
39
37/* EVENT REGISTERS */40/* EVENT REGISTERS */
38#define DA9052_EVENT_A_REG 541#define DA9052_EVENT_A_REG 5
39#define DA9052_EVENT_B_REG 642#define DA9052_EVENT_B_REG 6
include/linux/mfd/rtsx_common.h+3−0
@@ -38,6 +38,9 @@ · 37 unmodified lines
38#define RTSX_SD_CARD 038#define RTSX_SD_CARD 0
39#define RTSX_MS_CARD 139#define RTSX_MS_CARD 1
40 40
41#define CLK_TO_DIV_N 0
42#define DIV_N_TO_CLK 1
43
41struct platform_device;44struct platform_device;
42 45
43struct rtsx_slot {46struct rtsx_slot {
include/linux/mfd/rtsx_pci.h+21−4
@@ -158,10 +158,9 @@ · 157 unmodified lines
158#define SG_TRANS_DATA (0x02 << 4)158#define SG_TRANS_DATA (0x02 << 4)
159#define SG_LINK_DESC (0x03 << 4)159#define SG_LINK_DESC (0x03 << 4)
160 160
161/* SD bank voltage */161/* Output voltage */
162#define SD_IO_3V3 0162#define OUTPUT_3V3 0
163#define SD_IO_1V8 1163#define OUTPUT_1V8 1
164
165 164
166/* Card Clock Enable Register */165/* Card Clock Enable Register */
167#define SD_CLK_EN 0x04166#define SD_CLK_EN 0x04
@@ -201,6 +200,20 @@ · 33 unmodified lines
201#define CHANGE_CLK 0x01200#define CHANGE_CLK 0x01
202 201
203/* LDO_CTL */202/* LDO_CTL */
203#define BPP_ASIC_1V7 0x00
204#define BPP_ASIC_1V8 0x01
205#define BPP_ASIC_1V9 0x02
206#define BPP_ASIC_2V0 0x03
207#define BPP_ASIC_2V7 0x04
208#define BPP_ASIC_2V8 0x05
209#define BPP_ASIC_3V2 0x06
210#define BPP_ASIC_3V3 0x07
211#define BPP_REG_TUNED18 0x07
212#define BPP_TUNED18_SHIFT_8402 5
213#define BPP_TUNED18_SHIFT_8411 4
214#define BPP_PAD_MASK 0x04
215#define BPP_PAD_3V3 0x04
216#define BPP_PAD_1V8 0x00
204#define BPP_LDO_POWB 0x03217#define BPP_LDO_POWB 0x03
205#define BPP_LDO_ON 0x00218#define BPP_LDO_ON 0x00
206#define BPP_LDO_SUSPEND 0x02219#define BPP_LDO_SUSPEND 0x02
@@ -688,7 +701,10 @@ struct pcr_ops { · 481 unmodified lines
688 int (*disable_auto_blink)(struct rtsx_pcr *pcr);701 int (*disable_auto_blink)(struct rtsx_pcr *pcr);
689 int (*card_power_on)(struct rtsx_pcr *pcr, int card);702 int (*card_power_on)(struct rtsx_pcr *pcr, int card);
690 int (*card_power_off)(struct rtsx_pcr *pcr, int card);703 int (*card_power_off)(struct rtsx_pcr *pcr, int card);
704 int (*switch_output_voltage)(struct rtsx_pcr *pcr,
705 u8 voltage);
691 unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr);706 unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr);
707 int (*conv_clk_and_div_n)(int clk, int dir);
692};708};
693 709
694enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN};710enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN};
@@ -783,6 +799,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, · 88 unmodified lines
783 u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk);799 u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk);
784int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card);800int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card);
785int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card);801int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card);
802int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage);
786unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr);803unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr);
787void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr);804void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr);
788 805