diff options
author | Wei WANG <wei_wang@realsil.com.cn> | 2013-01-29 02:21:35 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-02-13 18:22:57 -0500 |
commit | 678cacdfda800b0cdbfdd01350dcf5e3b767f6ed (patch) | |
tree | 746389666f65c5130935e618651ffc9190a5b39a /drivers/mfd/rtsx_pcr.c | |
parent | f84ef04227d8983c8f76ac0f5cf8b0a15e0c67af (diff) |
mfd: rtsx: Fix checkpatch warning
WARNING: Avoid CamelCase: <min_N>
+ u8 N, min_N, max_N, clk_divider;
WARNING: Avoid CamelCase: <max_N>
+ u8 N, min_N, max_N, clk_divider;
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/rtsx_pcr.c')
-rw-r--r-- | drivers/mfd/rtsx_pcr.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index b2cfd2ed616c..4897c39cfb7b 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers/mfd/rtsx_pcr.c | |||
@@ -590,7 +590,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, | |||
590 | u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk) | 590 | u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk) |
591 | { | 591 | { |
592 | int err, clk; | 592 | int err, clk; |
593 | u8 N, min_N, max_N, clk_divider; | 593 | u8 n, min_n, max_n, clk_divider; |
594 | u8 mcu_cnt, div, max_div; | 594 | u8 mcu_cnt, div, max_div; |
595 | u8 depth[] = { | 595 | u8 depth[] = { |
596 | [RTSX_SSC_DEPTH_4M] = SSC_DEPTH_4M, | 596 | [RTSX_SSC_DEPTH_4M] = SSC_DEPTH_4M, |
@@ -615,8 +615,8 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, | |||
615 | card_clock /= 1000000; | 615 | card_clock /= 1000000; |
616 | dev_dbg(&(pcr->pci->dev), "Switch card clock to %dMHz\n", card_clock); | 616 | dev_dbg(&(pcr->pci->dev), "Switch card clock to %dMHz\n", card_clock); |
617 | 617 | ||
618 | min_N = 80; | 618 | min_n = 80; |
619 | max_N = 208; | 619 | max_n = 208; |
620 | max_div = CLK_DIV_8; | 620 | max_div = CLK_DIV_8; |
621 | 621 | ||
622 | clk = card_clock; | 622 | clk = card_clock; |
@@ -630,30 +630,30 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, | |||
630 | return 0; | 630 | return 0; |
631 | 631 | ||
632 | if (pcr->ops->conv_clk_and_div_n) | 632 | if (pcr->ops->conv_clk_and_div_n) |
633 | N = (u8)pcr->ops->conv_clk_and_div_n(clk, CLK_TO_DIV_N); | 633 | n = (u8)pcr->ops->conv_clk_and_div_n(clk, CLK_TO_DIV_N); |
634 | else | 634 | else |
635 | N = (u8)(clk - 2); | 635 | n = (u8)(clk - 2); |
636 | if ((clk <= 2) || (N > max_N)) | 636 | if ((clk <= 2) || (n > max_n)) |
637 | return -EINVAL; | 637 | return -EINVAL; |
638 | 638 | ||
639 | mcu_cnt = (u8)(125/clk + 3); | 639 | mcu_cnt = (u8)(125/clk + 3); |
640 | if (mcu_cnt > 15) | 640 | if (mcu_cnt > 15) |
641 | mcu_cnt = 15; | 641 | mcu_cnt = 15; |
642 | 642 | ||
643 | /* Make sure that the SSC clock div_n is equal or greater than min_N */ | 643 | /* Make sure that the SSC clock div_n is equal or greater than min_n */ |
644 | div = CLK_DIV_1; | 644 | div = CLK_DIV_1; |
645 | while ((N < min_N) && (div < max_div)) { | 645 | while ((n < min_n) && (div < max_div)) { |
646 | if (pcr->ops->conv_clk_and_div_n) { | 646 | if (pcr->ops->conv_clk_and_div_n) { |
647 | int dbl_clk = pcr->ops->conv_clk_and_div_n(N, | 647 | int dbl_clk = pcr->ops->conv_clk_and_div_n(n, |
648 | DIV_N_TO_CLK) * 2; | 648 | DIV_N_TO_CLK) * 2; |
649 | N = (u8)pcr->ops->conv_clk_and_div_n(dbl_clk, | 649 | n = (u8)pcr->ops->conv_clk_and_div_n(dbl_clk, |
650 | CLK_TO_DIV_N); | 650 | CLK_TO_DIV_N); |
651 | } else { | 651 | } else { |
652 | N = (N + 2) * 2 - 2; | 652 | n = (n + 2) * 2 - 2; |
653 | } | 653 | } |
654 | div++; | 654 | div++; |
655 | } | 655 | } |
656 | dev_dbg(&(pcr->pci->dev), "N = %d, div = %d\n", N, div); | 656 | dev_dbg(&(pcr->pci->dev), "n = %d, div = %d\n", n, div); |
657 | 657 | ||
658 | ssc_depth = depth[ssc_depth]; | 658 | ssc_depth = depth[ssc_depth]; |
659 | if (double_clk) | 659 | if (double_clk) |
@@ -670,7 +670,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, | |||
670 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, 0); | 670 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, 0); |
671 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL2, | 671 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL2, |
672 | SSC_DEPTH_MASK, ssc_depth); | 672 | SSC_DEPTH_MASK, ssc_depth); |
673 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_DIV_N_0, 0xFF, N); | 673 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_DIV_N_0, 0xFF, n); |
674 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, SSC_RSTB); | 674 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, SSC_RSTB); |
675 | if (vpclk) { | 675 | if (vpclk) { |
676 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_VPCLK0_CTL, | 676 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_VPCLK0_CTL, |