[PATCH v4] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-13 Thread wei_wang
From: Wei WANG In some platforms, specially Thinkpad series, rts5249 won't be initialized properly. So we need adjust some phy parameters to improve the compatibility issue. It is a little different between simulation and real chip. We have no idea about which configuration is better before tape

[PATCH v3] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-10 Thread wei_wang
From: Wei WANG In some platforms, specially Thinkpad series, rts5249 won't be initialized properly. So we need adjust some phy parameters to improve the compatibility issue. Signed-off-by: Wei WANG --- drivers/mfd/rts5249.c| 48 -- include/linux/mf

[PATCH] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-10 Thread wei_wang
From: Wei WANG In some platforms, specially Thinkpad series, rts5249 won't be initialized properly. So we need adjust some phy parameters to improve the compatibility issue. Signed-off-by: Wei WANG --- drivers/mfd/rts5249.c| 48 -- include/linux/mf

[PATCH v2] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-05 Thread wei_wang
From: Wei WANG In some platforms, specially Thinkpad series, rts5249 won't be initialized properly. So we need adjust some phy parameters to improve the compatibility issue. Signed-off-by: Wei WANG --- drivers/mfd/rts5249.c| 35 -- include/linux/mfd/rt

[PATCH v2] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-05 Thread wei_wang
From: Wei WANG v2: Name those new-added register values Wei WANG (1): mfd: rtsx: Modify rts5249_optimize_phy drivers/mfd/rts5249.c| 35 -- include/linux/mfd/rtsx_pci.h | 43 ++ 2 files changed, 76 insertions(

[PATCH] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-05 Thread wei_wang
From: Wei WANG In some platforms, specially Thinkpad series, rts5249 won't be initialized properly. So we need adjust some phy parameters to improve the compatibility issue. Signed-off-by: Wei WANG --- drivers/mfd/rts5249.c | 25 +++-- 1 file changed, 23 insertions(+), 2

[PATCH 3/3] mmc:memstick:rtsx: Modify copyright comments

2013-08-20 Thread wei_wang
From: Wei WANG Update copyright date, and remove author address. Signed-off-by: Wei WANG --- drivers/memstick/host/rtsx_pci_ms.c |3 +-- drivers/mmc/host/rtsx_pci_sdmmc.c |3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/memstick/host/rtsx_pci_ms.c b/dri

[PATCH 2/3] mmc:rtsx:Clear SD_CLK toggle enable bit if switching voltage fail

2013-08-20 Thread wei_wang
From: Wei WANG If switching voltage fails, SD_CLK toggle enable bit should been cleared so that SD host can control SD clock automatically. Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmmc.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/h

[PATCH 1/3] mfd:mmc:rtsx: Change default tx phase

2013-08-20 Thread wei_wang
From: Wei WANG The default phase can meet most cards' requirement, but it is not the optimal one. In some extreme situation, the rx phase point produced by the following tuning process will drift quite a distance. Before tuning UHS card, this patch will set a more proper initial tx phase point, w

[PATCH 0/3] Fix sd3.0 issues for Realtek card reader

2013-08-20 Thread wei_wang
From: Wei WANG Wei WANG (3): mfd:mmc:rtsx: Change default tx phase mmc:rtsx:Clear SD_CLK toggle enable bit if switching voltage fail mmc:memstick:rtsx: Modify copyright comments drivers/memstick/host/rtsx_pci_ms.c |3 +- drivers/mfd/rtl8411.c |4 ++ drivers/mfd/rts52

[PATCH v3 5/6] mfd:rtsx: Configure to enter a deeper power-saving mode in S3

2013-08-19 Thread wei_wang
From: Wei WANG Set a bit to enable rts5227 and rts5249 to enter a deeper internal power-saving mode in S3, and recover it after resuming. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c|2 +- drivers/mfd/rts5209.c|2 +- drivers/mfd/rts5227.c|6 +- driv

[PATCH v3 0/6] MFD patches for Realtek cardreader

2013-08-19 Thread wei_wang
From: Wei WANG v3: Seperate copyright changes to a distinct patch Modify some coding style and naming style Fix a bug that sd30_drive_sel would be assigned a wrong value, in rts5227 and rts5249 v2: Use macro when initializing vendor settings Wei WANG (6): mfd:rtsx: Read vendor setting from c

[PATCH v3 4/6] mfd:rtsx: Clear hardware PFM mode in rtl8411b

2013-08-19 Thread wei_wang
From: Wei WANG Clear hw_pfm_en to disable hardware PFM mode, to fix a bug that in some situation registers in 0xFDxx domain can't be accessed. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c|2 ++ include/linux/mfd/rtsx_pci.h |1 + 2 files changed, 3 insertions(+) diff --git

[PATCH v3 3/6] mfd:rtsx: Move some actions from rtsx_pci_init_hw to individual extra_init_hw

2013-08-19 Thread wei_wang
From: Wei WANG These actions are individual for each reader model, so should be put in extra_init_hw instead of rtsx_pci_init_hw. Signed-off-by: Wei WANG --- drivers/mfd/rts5209.c |4 drivers/mfd/rts5227.c |2 ++ drivers/mfd/rts5229.c |4 drivers/mfd/rts5249.c |2

[PATCH v3 2/6] mfd:rtsx: Add shutdown callback in rtsx_pci_driver

2013-08-19 Thread wei_wang
From: Wei WANG Some actions to clear power state should be handled in .shutdown callback in rtsx_pci_driver. This patch adopts the following measures to catch this goal: 1. Add a function rtsx_pci_power_off to abstract the common ops in .shutdown and .suspend 2. Add pcr->ops->force_power_down to

[PATCH v3 6/6] mfd:rtsx: Modify copyright comments

2013-08-19 Thread wei_wang
From: Wei WANG Update copyright date, and remove author address. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c |4 ++-- drivers/mfd/rts5209.c |3 +-- drivers/mfd/rts5227.c |5 + drivers/mfd/rts5229.c |3 +-- drivers/mfd/rts5249.c

[PATCH v3 1/6] mfd:rtsx: Read vendor setting from config space

2013-08-19 Thread wei_wang
From: Wei WANG Normally OEMs will set vendor setting to the config space of Realtek card reader in BIOS stage. This patch reads the setting at the first, and configure the internal registers according to it, to improve card reader's compatibility condition. Signed-off-by: Wei WANG --- drivers/

[PATCH v2 1/5] mfd:rtsx: Read vendor setting from config space

2013-07-17 Thread wei_wang
From: Wei WANG Normally OEMs will set vendor setting to the config space of Realtek card reader in BIOS stage. This patch reads the setting at the first, and configure the internal registers according to it, to improve card reader's compatibility condition. Signed-off-by: Wei WANG --- drivers/

[PATCH v2 5/5] mfd:rtsx: Configure to enter a deeper power-saving mode in S3

2013-07-17 Thread wei_wang
From: Wei WANG Set a bit to enable rts5227 and rts5249 to enter a deeper internal power-saving mode in S3, and recover it after resuming. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c|2 +- drivers/mfd/rts5209.c|2 +- drivers/mfd/rts5227.c|6 +- driv

[PATCH v2 2/5] mfd:rtsx: Add shutdown callback in rtsx_pci_driver

2013-07-17 Thread wei_wang
From: Wei WANG Some actions to clear power state should be handled in .shutdown callback in rtsx_pci_driver. This patch adopts the following measures to catch this goal: 1. Add a function rtsx_pci_power_off to abstract the common ops in .shutdown and .suspend 2. Add pcr->ops->force_power_down to

[PATCH v2 4/5] mfd:rtsx: Clear hardware PFM mode in rtl8411b

2013-07-17 Thread wei_wang
From: Wei WANG Clear hw_pfm_en to disable hardware PFM mode, to fix a bug that in some situation registers in 0xFDxx domain can't be accessed. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c|2 ++ include/linux/mfd/rtsx_pci.h |1 + 2 files changed, 3 insertions(+) diff --git

[PATCH v2 3/5] mfd:rtsx: Move some actions from rtsx_pci_init_hw to individual extra_init_hw

2013-07-17 Thread wei_wang
From: Wei WANG These actions are individual for each reader model, so should be put in extra_init_hw instead of rtsx_pci_init_hw. Signed-off-by: Wei WANG --- drivers/mfd/rts5209.c |4 drivers/mfd/rts5227.c |2 ++ drivers/mfd/rts5229.c |4 drivers/mfd/rts5249.c |2

[PATCH v2 0/5] mfd:rtsx: MFD patches for Realtek cardreader

2013-07-17 Thread wei_wang
From: Wei WANG v2: Use macro when initializing vendor settings Wei WANG (5): mfd:rtsx: Read vendor setting from config space mfd:rtsx: Add shutdown callback in rtsx_pci_driver mfd:rtsx: Move some actions from rtsx_pci_init_hw to individual extra_init_hw mfd:rtsx: Clear hardware PFM m

[PATCH 3/5] mfd:rtsx: Move some actions from rtsx_pci_init_hw to individual extra_init_hw

2013-07-15 Thread wei_wang
From: Wei WANG These actions are individual for each reader model, so should be put in extra_init_hw instead of rtsx_pci_init_hw. Signed-off-by: Wei WANG --- drivers/mfd/rts5209.c |4 drivers/mfd/rts5227.c |2 ++ drivers/mfd/rts5229.c |4 drivers/mfd/rts5249.c |2

[PATCH 5/5] mfd:rtsx: Configure to enter a deeper power-saving mode in S3

2013-07-15 Thread wei_wang
From: Wei WANG Set a bit to enable rts5227 and rts5249 to enter a deeper internal power-saving mode in S3, and recover it after resuming. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c|2 +- drivers/mfd/rts5209.c|2 +- drivers/mfd/rts5227.c|6 +- driv

[PATCH 4/5] mfd:rtsx: Clear hardware PFM mode in rtl8411b

2013-07-15 Thread wei_wang
From: Wei WANG Clear hw_pfm_en to disable hardware PFM mode, to fix a bug that in some situation registers in 0xFDxx domain can't be accessed. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c|2 ++ include/linux/mfd/rtsx_pci.h |1 + 2 files changed, 3 insertions(+) diff --git

[PATCH 2/5] mfd:rtsx: Add shutdown callback in rtsx_pci_driver

2013-07-15 Thread wei_wang
From: Wei WANG Some actions to clear power state should be handled in .shutdown callback in rtsx_pci_driver. This patch adopts the following measures to catch this goal: 1. Add a function rtsx_pci_power_off to abstract the common ops in .shutdown and .suspend 2. Add pcr->ops->force_power_down to

[PATCH 1/5] mfd:rtsx: Read vendor setting from config space

2013-07-15 Thread wei_wang
From: Wei WANG Normally OEMs will set vendor setting to the config space of Realtek card reader in BIOS stage. This patch reads the setting at the first, and configure the internal registers according to it, to improve card reader's compatibility condition. Signed-off-by: Wei WANG --- drivers/

[PATCH 0/5] mfd:rtsx: MFD patches for Realtek cardreader

2013-07-15 Thread wei_wang
From: Wei WANG Wei WANG (5): mfd:rtsx: Read vendor setting from config space mfd:rtsx: Add shutdown callback in rtsx_pci_driver mfd:rtsx: Move some actions from rtsx_pci_init_hw to individual extra_init_hw mfd:rtsx: Clear hardware PFM mode in rtl8411b mfd:rtsx: Configure to enter a

[PATCH] linux-next:usb-stor:realtek_cr:Fix compile error

2013-04-26 Thread wei_wang
From: Wei WANG To fix the compile error when CONFIG_PM_RUNTIME is not enabled, move the declaration of us out of CONFIG_REALTEK_AUTOPM macro in rts51x_chip. drivers/usb/storage/realtek_cr.c: In function 'realtek_cr_destructor': drivers/usb/storage/realtek_cr.c:942:11: error: 'struct rts51x_chip'

[PATCH v2] Add new model: rts5249

2013-04-10 Thread wei_wang
From: Wei WANG v2: 1. Modify copyright notice 2. Add macro definitions for phy registers 3. Replace mdelay with msleep Wei WANG (1): mfd:rtsx: Support RTS5249 drivers/mfd/Makefile |2 +- drivers/mfd/rts5249.c| 241 ++ drivers/mfd/r

[PATCH v2] mfd:rtsx: Support RTS5249

2013-04-10 Thread wei_wang
From: Wei WANG Support new model: RTS5249 Signed-off-by: Wei WANG --- drivers/mfd/Makefile |2 +- drivers/mfd/rts5249.c| 241 ++ drivers/mfd/rtsx_pcr.c |5 + drivers/mfd/rtsx_pcr.h |1 + include/linux/mfd/rtsx_pci

[PATCH] mfd:rtsx: Support RTS5249

2013-03-24 Thread wei_wang
From: Wei WANG Support new model: RTS5249 Signed-off-by: Wei WANG --- drivers/mfd/Makefile |2 +- drivers/mfd/rts5249.c| 245 ++ drivers/mfd/rtsx_pcr.c |5 + drivers/mfd/rtsx_pcr.h |1 + include/linux/mfd/rtsx_pci

[PATCH] mmc/host:rtsx: Don't execute power up sequence repeatedly

2013-03-07 Thread wei_wang
From: Wei WANG For some Realtek's card reader, power up sequence can only be executed when power has been turned off fully. So rtsx host should not start power up sequence again when set_ios been called if the power has been turned on. Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmm

[PATCH] mfd:rtsx: Fix issue that booting OS with SD card inserted

2013-02-07 Thread wei_wang
From: Wei WANG Realtek card reader supports both SD and MS card. According to the settings of rtsx MFD driver, SD host will be probed before MS host. If we boot/reboot Linux with SD card inserted, the resetting flow of SD card will succeed, and the following resetting flow of MS is sure to fail.

[PATCH 6/6] MFD:rtsx: Optimize card detect flow

2013-01-28 Thread wei_wang
From: Wei WANG 1. Schedule card detect work at the end of ISR 2. Callback function ops->cd_deglitch may delay for a period of time. It is not proper to call this callback when local irq disabled 3. Card detect flow can't be exectued in parallel with other card reader operations, so it's better to

[PATCH 4/6] MFD:rtsx: Fix checkpatch warning

2013-01-28 Thread wei_wang
From: Wei WANG WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff

[PATCH 1/6] MFD:rtsx: Fix typo in comment

2013-01-28 Thread wei_wang
From: Wei WANG Fix a misspelling word in comment Signed-off-by: Wei WANG --- include/linux/mfd/rtsx_pci.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 4b117a3..3f2bf26 100644 --- a/include/linux/mfd/rts

[PATCH 3/6] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly

2013-01-28 Thread wei_wang
From: Wei WANG Realtek PCIe card reader only supports 32bit DMA. This declaration can improve the readability Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index c021ce3..b2cfd2e 100

[PATCH 2/6] MFD:rtsx: Remove redundant code

2013-01-28 Thread wei_wang
From: Wei WANG In function rtsx_pci_add_sg_tbl, the statement "ptr++" is useless. Signed-off-by: Wei WANG Acked-by: Borislav Petkov --- drivers/mfd/rtsx_pcr.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index 9fc5700..c021ce3 100644 --

[PATCH 0/6] MFD:rtsx: Fix coding style and optimize flow

2013-01-28 Thread wei_wang
From: Wei WANG This patchset fixes some coding style issues, and optimizes card detect flow to improve the stability when inserting card. Wei WANG (6): MFD:rtsx: Fix typo in comment MFD:rtsx: Remove redundant code MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly MFD:

[PATCH 5/6] MFD:rtsx: Use macro defines to replace some variables

2013-01-28 Thread wei_wang
From: Wei WANG In function rtsx_pci_switch_clock, some variables, such as min_n, max_n, and max_div, are not necessary. And those assigned values look very obscure for others. It's more proper to use macro definitions here to replace these variables. Signed-off-by: Wei WANG Acked-by: Borislav P

[PATCH] MFD:rtsx:Avoid kernel panic if rtsx_pci_sdmmc not probed

2013-01-25 Thread wei_wang
From: Wei WANG If rtsx_pci_sdmmc is not probed, function pointer pcr->slots[].card_event will point to NULL, and thus rtsx_pci_card_detect will reference a NULL pointer. Check card_event pointer before referencing it can avoid kernel panic. Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c |

[PATCH 3/3] MFD:rtsx: Add callback function conv_clk_and_div_n

2013-01-22 Thread wei_wang
From: Wei WANG 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. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c | 13 + dr

[PATCH 2/3] MMC:rtsx: Using callback function to switch output voltage

2013-01-22 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, so we have to use the callback function provided by MFD driver to switch output pad voltage. Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +- 1 file changed,

[PATCH 0/3] Fix two bugs in rtl8411

2013-01-22 Thread wei_wang
From: Wei WANG 1. The method to switch output voltage is different in rtl8411 2. Fix the formula to calculate N from SD clock if clock divider is more than 1 Wei WANG (3): MFD:rtsx: Add callback function switch_output_voltage MMC:rtsx: Using callback function to switch output voltage MFD:r

[PATCH 1/3] MFD:rtsx: Add callback function switch_output_voltage

2013-01-22 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, add this callback to let the card reader implement its individual switch function. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c| 16 drivers/mfd/rts5209.c| 20 +

[PATCH v4 1/8] MFD:rtsx: Fix typo in comment

2013-01-08 Thread wei_wang
From: Wei WANG Fix a misspelling word in comment Signed-off-by: Wei WANG --- include/linux/mfd/rtsx_pci.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 060b721..bebe9f9 100644 --- a/include/linux/mfd/rts

[PATCH v4 8/8] MFD:rtsx: Use macro defines to replace some variables

2013-01-08 Thread wei_wang
From: Wei WANG In function rtsx_pci_switch_clock, some variables, such as min_n, max_n, and max_div, are not necessary. And those assigned values look very obscure for others. It's more proper to use macro definitions here to replace these variables. Signed-off-by: Wei WANG Acked-by: Borislav P

[PATCH v4 4/8] MFD:rtsx: Add callback function switch_output_voltage

2013-01-08 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, add this callback to let the card reader implement its individual switch function. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c| 16 drivers/mfd/rts5209.c| 20 +

[PATCH v4 3/8] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly

2013-01-08 Thread wei_wang
From: Wei WANG Realtek PCIe card reader only supports 32bit DMA. This declaration can improve the readability Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index fa2c2bc..1dc64bb 100

[PATCH v4 7/8] MFD:rtsx: Fix checkpatch warning

2013-01-08 Thread wei_wang
From: Wei WANG WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff

[PATCH v4 5/8] MMC:rtsx: Using callback function to switch output voltage

2013-01-08 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, so we have to use the callback function provided by MFD driver to switch output pad voltage. Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +- 1 file changed,

[PATCH v4 0/8] rtsx patchset for MFD and MMC tree

2013-01-08 Thread wei_wang
From: Wei WANG v2: 1. Add commit message for patch 2 2. Move pci_set_dma_mask before the pci_enable_device(pcidev) call v3: 1. Add commit message for patch 3 2. Add patch 8: Use macro defines to replace some variables v4: 1. Describe why patch 3 is needed 2. Modify a comment character in patch

[PATCH v4 2/8] MFD:rtsx: Remove redundant code

2013-01-08 Thread wei_wang
From: Wei WANG In function rtsx_pci_add_sg_tbl, the statement "ptr++" is useless. Signed-off-by: Wei WANG Acked-by: Borislav Petkov --- drivers/mfd/rtsx_pcr.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index 3a44efa..fa2c2bc 100644 --

[PATCH v4 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n

2013-01-08 Thread wei_wang
From: Wei WANG 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. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c | 13 + dr

[PATCH v3 1/8] MFD:rtsx: Fix typo in comment

2012-12-27 Thread wei_wang
From: Wei WANG Fix a misspelling word in comment Signed-off-by: Wei WANG --- include/linux/mfd/rtsx_pci.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 060b721..bebe9f9 100644 --- a/include/linux/mfd/rts

[PATCH v3 8/8] MFD:rtsx: Use macro defines to replace some variables

2012-12-27 Thread wei_wang
From: Wei WANG In function rtsx_pci_switch_clock, some variables, such as min_n, max_n, and max_div, are not necessary. And those assigned values look very obscure for others. It's more proper to use macro definitions here to replace these variables. Signed-off-by: Wei WANG Acked-by: Borislav P

[PATCH v3 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n

2012-12-27 Thread wei_wang
From: Wei WANG 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. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c | 13 + dr

[PATCH v3 7/8] MFD:rtsx: Fix checkpatch warning

2012-12-27 Thread wei_wang
From: Wei WANG WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff

[PATCH v3 4/8] MFD:rtsx: Add callback function switch_output_voltage

2012-12-27 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, add this callback to let the card reader implement its individual switch function. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c| 16 drivers/mfd/rts5209.c| 20 +

[PATCH v3 5/8] MMC:rtsx: Using callback function to switch output voltage

2012-12-27 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, so we have to use the callback function provided by MFD driver to switch output pad voltage. Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +- 1 file changed,

[PATCH v3 3/8] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly

2012-12-27 Thread wei_wang
From: Wei WANG Realtek PCIe card reader only supports 32bit DMA Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index fa2c2bc..1dc64bb 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers

[PATCH v3 2/8] MFD:rtsx: Remove redundant code

2012-12-27 Thread wei_wang
From: Wei WANG In function rtsx_pci_add_sg_tbl, the statement "ptr++" is useless. Signed-off-by: Wei WANG Acked-by: Borislav Petkov --- drivers/mfd/rtsx_pcr.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index 3a44efa..fa2c2bc 100644 --

[PATCH v3 0/8] rtsx patchset for MFD and MMC tree

2012-12-27 Thread wei_wang
From: Wei WANG Wei WANG (8): MFD:rtsx: Fix typo in comment MFD:rtsx: Remove redundant code MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly MFD:rtsx: Add callback function switch_output_voltage MMC:rtsx: Using callback function to switch output voltage MFD:rtsx: A

[PATCH v2 4/8] MFD:rtsx: Add callback function switch_output_voltage

2012-12-24 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, add this callback to let the card reader implement its individual switch function. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c| 16 drivers/mfd/rts5209.c| 20 +

[PATCH v2 2/8] MFD:rtsx: Remove redundant code

2012-12-24 Thread wei_wang
From: Wei WANG In function rtsx_pci_add_sg_tbl, the statement "ptr++" is useless. Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index 3a44efa..fa2c2bc 100644 --- a/drivers/mfd/rtsx_pcr.c

[PATCH v2 1/8] MFD:rtsx: Fix typo in comment

2012-12-24 Thread wei_wang
From: Wei WANG Fix a misspelling word in comment Signed-off-by: Wei WANG --- include/linux/mfd/rtsx_pci.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 060b721..bebe9f9 100644 --- a/include/linux/mfd/rts

[PATCH v2 7/8] MFD:rtsx: Fix checkpatch warning

2012-12-24 Thread wei_wang
From: Wei WANG WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff

[PATCH v2 8/8] MFD:rtsx: Use macro defines to replace some variables

2012-12-24 Thread wei_wang
From: Wei WANG In function rtsx_pci_switch_clock, some variables, such as min_n, max_n, and max_div, are not necessary. And those assigned values look very obscure for others. It's more proper to use macro definitions here to replace these variables. Signed-off-by: Wei WANG --- drivers/mfd/rts

[PATCH v2 5/8] MMC:rtsx: Using callback function to switch output voltage

2012-12-24 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, so we have to use the callback function provided by MFD driver to switch output pad voltage. Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +- 1 file changed,

[PATCH v2 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n

2012-12-24 Thread wei_wang
From: Wei WANG 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. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c | 13 + dr

[PATCH v2 3/8] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly

2012-12-24 Thread wei_wang
From: Wei WANG Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index fa2c2bc..1dc64bb 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers/mfd/rtsx_pcr.c @@ -1010,6 +1010,10 @@ static int

[PATCH v2 0/8] rtsx patchset for MFD and MMC tree

2012-12-24 Thread wei_wang
From: Wei WANG Wei WANG (8): MFD:rtsx: Fix typo in comment MFD:rtsx: Remove redundant code MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly MFD:rtsx: Add callback function switch_output_voltage MMC:rtsx: Using callback function to switch output voltage MFD:rtsx: A

[PATCH 3/7] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly

2012-12-23 Thread wei_wang
From: Wei WANG Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index fa2c2bc..2ee6be5 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers/mfd/rtsx_pcr.c @@ -1084,6 +1084,10 @@ static int

[PATCH 5/7] MMC:rtsx: Using callback function to switch output voltage

2012-12-23 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, so we have to use the callback function provided by MFD driver to switch output pad voltage. Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +- 1 file changed,

[PATCH 0/7] rtsx patchset for MFD and MMC tree

2012-12-23 Thread wei_wang
From: Wei WANG Wei WANG (7): MFD:rtsx: Fix typo in comment MFD:rtsx: Remove redundant code MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly MFD:rtsx: Add callback function switch_output_voltage MMC:rtsx: Using callback function to switch output voltage MFD:rtsx: A

[PATCH 2/7] MFD:rtsx: Remove redundant code

2012-12-23 Thread wei_wang
From: Wei WANG Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index 3a44efa..fa2c2bc 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers/mfd/rtsx_pcr.c @@ -325,7 +325,6 @@ static void rtsx_pc

[PATCH 6/7] MFD:rtsx: Add callback function conv_clk_and_div_n

2012-12-23 Thread wei_wang
From: Wei WANG 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. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c | 13 + dr

[PATCH 4/7] MFD:rtsx: Add callback function switch_output_voltage

2012-12-23 Thread wei_wang
From: Wei WANG Different card reader has different method to switch output voltage, add this callback to let the card reader implement its individual switch function. Signed-off-by: Wei WANG --- drivers/mfd/rtl8411.c| 16 drivers/mfd/rts5209.c| 20 +

[PATCH 7/7] MFD:rtsx: Fix checkpatch warning

2012-12-23 Thread wei_wang
From: Wei WANG WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; WARNING: Avoid CamelCase: + u8 N, min_N, max_N, clk_divider; Signed-off-by: Wei WANG --- drivers/mfd/rtsx_pcr.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff

[PATCH 1/7] MFD:rtsx: Fix typo in comment

2012-12-23 Thread wei_wang
From: Wei WANG Fix a misspelling word in comment Signed-off-by: Wei WANG --- include/linux/mfd/rtsx_pci.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 060b721..bebe9f9 100644 --- a/include/linux/mfd/rts

[PATCH v3 2/2] mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c

2012-11-19 Thread wei_wang
From: Wei WANG This fixes the following build error on some architectures (parisc at least): drivers/mmc/host/rtsx_pci_sdmmc.c: In function 'sd_normal_rw': drivers/mmc/host/rtsx_pci_sdmmc.c:448:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration] drivers/m

[PATCH v3 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi

2012-11-19 Thread wei_wang
From: Wei WANG For Realtek card reader, internal regsiter SD_CFG2 should be configured before transferring data. The default value of SD_CFG2 is proper for writing data. But for reading sequence, the timing is not good enough. So in some extreme circumstance, card reader may sample the response d

[PATCH v3 0/2] rtsx patch for for-next branch in MFD tree

2012-11-19 Thread wei_wang
From: Wei WANG Wei WANG (2): mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c drivers/mmc/host/rtsx_pci_sdmmc.c |2 ++ 1 file changed, 2 insertions(+) -- 1.7.9.5 -- To unsubscribe from this list: send the line "uns

[PATCH v2 0/2] rtsx patch for for-next branch in MFD tree

2012-11-19 Thread wei_wang
From: Wei WANG Wei WANG (2): mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c drivers/mmc/host/rtsx_pci_sdmmc.c |2 ++ 1 file changed, 2 insertions(+) -- 1.7.9.5 -- To unsubscribe from this list: send the line "uns

[PATCH v2 2/2] mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c

2012-11-19 Thread wei_wang
From: Wei WANG This fixes the following build error on some architectures (parisc at least): drivers/mmc/host/rtsx_pci_sdmmc.c: In function 'sd_normal_rw': drivers/mmc/host/rtsx_pci_sdmmc.c:448:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration] drivers/m

[PATCH v2 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi

2012-11-19 Thread wei_wang
From: Wei WANG For Realtek card reader, internal regsiter SD_CFG2 should be configured before transferring data. In the prior version, the value of this register has been calculated, but forgotten to write back to the internal register. Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdm

[PATCH 2/2] mmc: Explicitely include slab.h in rtsx_pci_sdmmc.c

2012-11-19 Thread wei_wang
From: Wei WANG Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmmc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 067dd46..571915d 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host

[PATCH 1/2] mmc: Configure SD_CFG2 register in sd_rw_multi

2012-11-19 Thread wei_wang
From: Wei WANG Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmmc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 0e934bf..067dd46 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host

[PATCH 0/2] rtsx patch for for-next branch in MFD tree

2012-11-19 Thread wei_wang
From: Wei WANG Wei WANG (2): mmc: Configure SD_CFG2 register in sd_rw_multi mmc: Explicitely include slab.h in rtsx_pci_sdmmc.c drivers/mmc/host/rtsx_pci_sdmmc.c |2 ++ 1 file changed, 2 insertions(+) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kerne

[PATCH v7 2/3] drivers/mmc: Add realtek pcie sdmmc host driver

2012-10-28 Thread wei_wang
From: Wei WANG Realtek PCI-E SD/MMC card host driver is used to access SD/MMC card, with the help of Realtek PCI-E card reader MFD driver. Signed-off-by: Wei WANG Reviewed-by: Arnd Bergmann Tested-by: Borislav Petkov --- drivers/mmc/host/Kconfig |7 + drivers/mmc/host/Makefile

[PATCH v7 3/3] drivers/memstick: Add realtek pcie memstick host driver

2012-10-28 Thread wei_wang
From: Wei WANG Realtek PCI-E Memstick card host driver is used to access Memstick card, with the help of Realtek PCI-E card reader MFD driver. Signed-off-by: Wei WANG Acked-by: Alex Dubov --- drivers/memstick/host/Kconfig | 10 + drivers/memstick/host/Makefile |1 + drivers/m

[PATCH v7 0/3] Add modules to support realtek PCIE card reader

2012-10-28 Thread wei_wang
From: Wei WANG Support for Realtek PCI-Express driver-based card readers including rts5209, rts5229 and rtl8411. v2: 1. Using platform device to replace realtek slot bus v3: 1. Fix a bug that DMA out of SW-IOMMU space in Lenovo Thinkpad x121e 2. Tested by Borislav Petkov v4: 1. Fulfill power

[PATCH v6 2/3] drivers/mmc: Add realtek pcie sdmmc host driver

2012-09-10 Thread wei_wang
From: Wei WANG Realtek PCI-E SD/MMC card host driver is used to access SD/MMC card, with the help of Realtek PCI-E card reader MFD driver. Signed-off-by: Wei WANG Reviewed-by: Arnd Bergmann Tested-by: Borislav Petkov --- drivers/mmc/host/Kconfig |7 + drivers/mmc/host/Makefile

[PATCH v6 3/3] drivers/memstick: Add realtek pcie memstick host driver

2012-09-10 Thread wei_wang
From: Wei WANG Realtek PCI-E Memstick card host driver is used to access Memstick card, with the help of Realtek PCI-E card reader MFD driver. Signed-off-by: Wei WANG --- drivers/memstick/host/Kconfig | 10 + drivers/memstick/host/Makefile |1 + drivers/memstick/host/rtsx_pci_

[PATCH v6 0/3] Add modules to support realtek PCIE card reader

2012-09-10 Thread wei_wang
From: Wei WANG Support for Realtek PCI-Express driver-based card readers including rts5209 and rts5229. v2: 1. Using platform device to replace realtek slot bus v3: 1. Fix a bug that DMA out of SW-IOMMU space in Lenovo Thinkpad x121e 2. Tested by Borislav Petkov v4: 1. Fulfill power manageme

[PATCH v5 2/3] drivers/mmc: Add realtek pcie sdmmc host driver

2012-09-10 Thread wei_wang
From: Wei WANG Realtek PCI-E SD/MMC card host driver is used to access SD/MMC card, with the help of Realtek PCI-E card reader MFD driver. Signed-off-by: Wei WANG Reviewed-by: Arnd Bergmann Tested-by: Borislav Petkov --- drivers/mmc/host/Kconfig |7 + drivers/mmc/host/Makefile

[PATCH v5 3/3] drivers/memstick: Add realtek pcie memstick host driver

2012-09-10 Thread wei_wang
From: Wei WANG Realtek PCI-E Memstick card host driver is used to access Memstick card, with the help of Realtek PCI-E card reader MFD driver. Signed-off-by: Wei WANG --- drivers/memstick/host/Kconfig | 10 + drivers/memstick/host/Makefile |1 + drivers/memstick/host/rtsx_pci_

[PATCH v5 0/3] Add modules to support realtek PCIE card reader

2012-09-10 Thread wei_wang
From: Wei WANG Support for Realtek PCI-Express driver-based card readers including rts5209 and rts5229. v2: 1. Using platform device to replace realtek slot bus v3: 1. Fix a bug that DMA out of SW-IOMMU space in Lenovo Thinkpad x121e 2. Tested by Borislav Petkov v4: 1. Fulfill power manageme

  1   2   >