[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

[PATCH v4] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-13 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

[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 --

[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 --

[PATCH] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-10 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rts5249.c| 48

[PATCH v3] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-10 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rts5249.c| 48

[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 --

[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

[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] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-05 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rts5249.c | 25

[PATCH v2] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-05 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

[PATCH v2] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-05 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rts5249.c| 35

[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

[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

[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,

[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 ++

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

2013-08-20 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 +-

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

2013-08-20 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

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

2013-08-20 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

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

2013-08-20 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-20 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-20 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-20 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 ---

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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:

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn Update copyright date, and remove author address. Signed-off-by: Wei WANG wei_w...@realsil.com.cn --- drivers/mfd/rtl8411.c |4 ++-- drivers/mfd/rts5209.c |3 +-- drivers/mfd/rts5227.c |5 +

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rts5209.c |4 drivers/mfd/rts5227.c |2 ++

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rtl8411.c|2 ++ include/linux/mfd/rtsx_pci.h |1

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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:

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rtl8411.c|2 +- drivers/mfd/rts5209.c|2 +-

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 |

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c |9 - 1 file changed, 8

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

2013-08-20 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

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

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

[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 ---

[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 +-

[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

[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

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

2013-07-17 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

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

2013-07-17 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rtl8411.c|2 ++ include/linux/mfd/rtsx_pci.h |1

[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 wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rts5209.c |4 drivers/mfd/rts5227.c |2 ++

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

2013-07-17 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

[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 wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rtl8411.c|2 +- drivers/mfd/rts5209.c|2 +-

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

2013-07-17 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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:

[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 +-

[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

[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 ---

[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 0/5] mfd:rtsx: MFD patches for Realtek cardreader

2013-07-15 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

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

2013-07-15 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rtl8411.c|2 ++ include/linux/mfd/rtsx_pci.h |1

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

2013-07-15 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

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

2013-07-15 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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:

[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 wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rts5209.c |4 drivers/mfd/rts5227.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 wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rtl8411.c|2 +- drivers/mfd/rts5209.c|2 +-

[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

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

2013-04-26 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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:

[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 ++

[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 +

[PATCH v2] mfd:rtsx: Support RTS5249

2013-04-10 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn Support new model: RTS5249 Signed-off-by: Wei WANG wei_w...@realsil.com.cn --- drivers/mfd/Makefile |2 +- drivers/mfd/rts5249.c| 241 ++ drivers/mfd/rtsx_pcr.c |5 +

[PATCH v2] Add new model: rts5249

2013-04-10 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

[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 +

[PATCH] mfd:rtsx: Support RTS5249

2013-03-24 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn Support new model: RTS5249 Signed-off-by: Wei WANG wei_w...@realsil.com.cn --- drivers/mfd/Makefile |2 +- drivers/mfd/rts5249.c| 245 ++ drivers/mfd/rtsx_pcr.c |5 +

[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 ---

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

2013-03-07 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

[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] mfd:rtsx: Fix issue that booting OS with SD card inserted

2013-02-07 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

[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

[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 ---

[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

[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

[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

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

2013-01-28 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

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

2013-01-28 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

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

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

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

2013-01-28 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn In function rtsx_pci_add_sg_tbl, the statement ptr++ is useless. Signed-off-by: Wei WANG wei_w...@realsil.com.cn Acked-by: Borislav Petkov b...@alien8.de --- drivers/mfd/rtsx_pcr.c |1 - 1 file changed, 1 deletion(-) diff --git

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

2013-01-28 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn Fix a misspelling word in comment Signed-off-by: Wei WANG wei_w...@realsil.com.cn --- 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

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

2013-01-28 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

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

2013-01-28 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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_w...@realsil.com.cn --- drivers/mfd/rtsx_pcr.c | 26 +-

[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] MFD:rtsx:Avoid kernel panic if rtsx_pci_sdmmc not probed

2013-01-25 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

[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 +

[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

[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 1/3] MFD:rtsx: Add callback function switch_output_voltage

2013-01-22 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mfd/rtl8411.c| 16

[PATCH 0/3] Fix two bugs in rtl8411

2013-01-22 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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

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

2013-01-22 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 30

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

2013-01-22 Thread wei_wang
From: Wei WANG wei_w...@realsil.com.cn 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 wei_w...@realsil.com.cn ---

[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 ---

[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

[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

[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,

  1   2   3   >