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.
Showing the changes to include/linux (2 of 6 files). Show all
Unified · Split
| @@ -38,6 +38,9 @@ · 37 unmodified lines | ||
| 38 | 38 | #define RTSX_SD_CARD 0 |
| 39 | 39 | #define RTSX_MS_CARD 1 |
| 40 | 40 | |
| 41 | +#define CLK_TO_DIV_N 0 | |
| 42 | +#define DIV_N_TO_CLK 1 | |
| 43 | + | |
| 41 | 44 | struct platform_device; |
| 42 | 45 | |
| 43 | 46 | struct rtsx_slot { |
| @@ -704,6 +704,7 @@ struct pcr_ops { · 703 unmodified lines | ||
| 704 | 704 | int (*switch_output_voltage)(struct rtsx_pcr *pcr, |
| 705 | 705 | u8 voltage); |
| 706 | 706 | unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr); |
| 707 | + int (*conv_clk_and_div_n)(int clk, int dir); | |
| 707 | 708 | }; |
| 708 | 709 | |
| 709 | 710 | enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN}; |