History

mfd: rtsx: Add output voltage switch hook

Different card reader has different method to switch output voltage, add this callback to let the card reader implement its individual switch function. This is needed as rtl8411 has a specific switch output voltage procedure.

Wei WANG committed 13 years ago

Commit d817ac41 parent 00441b55 files · +85 −4Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/mfd/rtsx_pci.h+20−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,6 +701,8 @@ 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);
692};707};
693 708
@@ -783,6 +798,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, · 89 unmodified lines
783 u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk);798 u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk);
784int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card);799int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card);
785int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card);800int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card);
801int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage);
786unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr);802unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr);
787void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr);803void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr);
788 804