History

mfd: rtsx: Add clock divider hook

Add callback function conv_clk_and_div_n to convert between SSC clock and its divider N. For rtl8411, the formula to calculate SSC clock divider N is different with the other card reader models.

Wei WANG committed 13 years ago

Commit ab4e8f81 parent ef85e736 files · +31 −2Browse files

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

Unified · Split

2 files
  1. include/linux/mfd/rtsx_common.h +3 −0
  2. include/linux/mfd/rtsx_pci.h +1 −0
include/linux/mfd/rtsx_common.h+3−0
@@ -38,6 +38,9 @@ · 37 unmodified lines
3838 #define RTSX_SD_CARD 0
3939 #define RTSX_MS_CARD 1
4040
41+#define CLK_TO_DIV_N 0
42+#define DIV_N_TO_CLK 1
43+
4144 struct platform_device;
4245
4346 struct rtsx_slot {
include/linux/mfd/rtsx_pci.h+1−0
@@ -704,6 +704,7 @@ struct pcr_ops { · 703 unmodified lines
704704 int (*switch_output_voltage)(struct rtsx_pcr *pcr,
705705 u8 voltage);
706706 unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr);
707+ int (*conv_clk_and_div_n)(int clk, int dir);
707708 };
708709
709710 enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN};