Re: [PATCH 3/4] iio: adc: mediatek: SET_LATE_SYSTEM_SLEEP_PM_OPS support

2019-05-19 Thread Chun-Hung Wu
Hi Jonathan: Thanks for the prompt reply, On Sat, 2019-05-18 at 11:35 +0100, Jonathan Cameron wrote: > On Thu, 16 May 2019 16:10:46 +0800 > Chun-Hung Wu wrote: > > > Move suspend/resume to late_suspend and > > early_resume to gurantee users can use auxadc > guarante

Re: [PATCH 4/4] iio: auxadc: mediatek: change to subsys_initcall

2019-05-19 Thread Chun-Hung Wu
Hi Jonathan, On Sat, 2019-05-18 at 11:36 +0100, Jonathan Cameron wrote: > On Thu, 16 May 2019 16:10:47 +0800 > Chun-Hung Wu wrote: > > > Move auxadc platform_driver_register() from module_init > > to subsys_initcall because auxadc user drivers > > are all moudl

Re: [PATCH 1/4] dt-bindings: iio: adc: mediatek: Add document for mt6765

2019-05-19 Thread Chun-Hung Wu
Hi Jonathan, On Sat, 2019-05-18 at 11:33 +0100, Jonathan Cameron wrote: > On Thu, 16 May 2019 16:10:44 +0800 > Chun-Hung Wu wrote: > > > Add compatible node for mt6765 auxadc > > > > Signed-off-by: Chun-Hung Wu > Applied, but in numeric order. There was also

[PATCH v1 1/2] mmc: cqhci: add new cqhci_host_ops pre_enable() and post_disable()

2020-08-27 Thread Chun-Hung Wu
Add pre_enable() and post_disable() for cqhci_host_ops. Add hook functions before cqhci enable and after cqhci disable for platforms need them. Signed-off-by: Chun-Hung Wu --- drivers/mmc/host/cqhci.c |6 ++ drivers/mmc/host/cqhci.h |2 ++ 2 files changed, 8 insertions(+) diff

[PATCH v1 0/2] mmc: cqhci: Add pre_enable() and post_disable() hook function

2020-08-27 Thread Chun-Hung Wu
This series provides MediaTek cqhci implementations as below: - Add cqhci_host_ops->pre_enable() and cqhci_host_ops->post_disable() - Implement MediaTek's hook functions Chun-Hung Wu (2): mmc: cqhci: add new cqhci_host_ops pre_enable() and post_disable() mmc: mediatek: add

[PATCH v1 2/2] mmc: mediatek: add pre_enable() and post_disable() hook function

2020-08-27 Thread Chun-Hung Wu
CQHCI_ENABLE bit in CQHCI_CFG should be disabled after msdc_cqe_disable(), and should be enabled before msdc_ceq_enable() for MTK platform. Add hook functions for cqhci_host_ops->pre_enable() and cqhci_host_ops->post_disable(). Signed-off-by: Chun-Hung Wu --- drivers/mmc/host/mtk-sd.c

[PATCH v7 4/4] dt-bindings: mmc: mediatek: Add document for mt6779

2020-07-19 Thread Chun-Hung Wu
Add compatible node for mt6779 mmc. Signed-off-by: Chun-Hung Wu --- Documentation/devicetree/bindings/mmc/mtk-sd.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt index 8a532f4..0c9cf6a

[PATCH v7 1/4] mmc: mediatek: add MT6779 MMC driver support

2020-07-19 Thread Chun-Hung Wu
Add new code to support MT6779 mmc driver. Signed-off-by: Chun-Hung Wu --- drivers/mmc/host/mtk-sd.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 39e7fc5..ed37a3c 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b

[PATCH v7 0/4] mmc: mediatek: add mmc cqhci support

2020-07-19 Thread Chun-Hung Wu
indings back to vendor driver - Add mt6779 mmc support as an individual patch - Error handling for cq_host devm_kzallo() v6 -> v7: - Select MMC_CQHCI for MMC_MTK - Remove unnecessary option MMC_CQHCI in mtk-sd.c - Add error handling for cqhci_init() - Use native cqhci dt-bindings 's

[PATCH v7 2/4] mmc: mediatek: refine msdc timeout api

2020-07-19 Thread Chun-Hung Wu
Extract msdc timeout api common part to have better code architecture and avoid redundant code. Signed-off-by: Chun-Hung Wu --- drivers/mmc/host/mtk-sd.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers

[PATCH v7 3/4] mmc: mediatek: command queue support

2020-07-19 Thread Chun-Hung Wu
r messages like RSPCRCERR/CMDTO/DATACRCERR/DATTMO. d. Select kernel config MMC_CQHCI for MMC_MTK Signed-off-by: Chun-Hung Wu --- drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/mtk-sd.c | 115 ++ 2 files changed, 116 insertions(+) diff --git a/driver

Re: [PATCH 3/4] iio: adc: mediatek: SET_LATE_SYSTEM_SLEEP_PM_OPS support

2019-05-28 Thread Chun-Hung Wu
2 at 18:28 +0200, Matthias Brugger wrote: > > On 20/05/2019 08:03, Chun-Hung Wu wrote: > > Hi Jonathan: > > > > Thanks for the prompt reply, > > > > On Sat, 2019-05-18 at 11:35 +0100, Jonathan Cameron wrote: > >> On Thu, 16 May 2019 16:10:46 +0

[PATCH 2/4] iio: adc: mediatek: mt6765 upstream driver

2019-05-16 Thread Chun-Hung Wu
1. Add calibrated sample data support 2. Use of_match_table to decide each platform's feature set Signed-off-by: Chun-Hung Wu --- drivers/iio/adc/mt6577_auxadc.c | 54 +++-- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/drivers/ii

[PATCH 1/4] dt-bindings: iio: adc: mediatek: Add document for mt6765

2019-05-16 Thread Chun-Hung Wu
Add compatible node for mt6765 auxadc Signed-off-by: Chun-Hung Wu --- Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt b/Documentation/devicetree/bindings/iio/adc

[PATCH 4/4] iio: auxadc: mediatek: change to subsys_initcall

2019-05-16 Thread Chun-Hung Wu
Move auxadc platform_driver_register() from module_init to subsys_initcall because auxadc user drivers are all moudle drivers, need to gurantee auxadc driver ready before module_init. Signed-off-by: Chun-Hung Wu --- drivers/iio/adc/mt6577_auxadc.c | 14 +- 1 file changed, 13

[PATCH 0/4] iio: adc: mediatek: add mt6765 driver support

2019-05-16 Thread Chun-Hung Wu
This patch adds support of auxadc to MT6765 SoC. Chun-Hung Wu (4): dt-bindings: iio: adc: mediatek: Add document for mt6765 iio: adc: mediatek: mt6765 upstream driver iio: adc: mediatek: SET_LATE_SYSTEM_SLEEP_PM_OPS support iio: auxadc: mediatek: change to subsys_initcall .../devicetree

[PATCH 3/4] iio: adc: mediatek: SET_LATE_SYSTEM_SLEEP_PM_OPS support

2019-05-16 Thread Chun-Hung Wu
Move suspend/resume to late_suspend and early_resume to gurantee users can use auxadc driver at suspend/resume stage. Signed-off-by: Chun-Hung Wu --- drivers/iio/adc/mt6577_auxadc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/iio/adc/mt6577_auxadc.c b

[PATCH v6 2/4] mmc: mediatek: refine msdc timeout api

2020-06-08 Thread Chun-Hung Wu
Extract msdc timeout api common part to have better code architecture and avoid redundant code. Signed-off-by: Chun-Hung Wu --- drivers/mmc/host/mtk-sd.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers

[PATCH v6 0/4] mmc: mediatek: add mmc cqhci support

2020-06-08 Thread Chun-Hung Wu
leij) v4 -> v5: - Add Acked-by and more maintainers v5 -> v6: - Move CQE bindings back to vendor driver - Add mt6779 mmc support as an individual patch - Error handling for cq_host devm_kzallo() Chun-Hung Wu (4): [1/4] mmc: mediatek: add MT6779 MMC driver support [2/4] mmc: mediat

[PATCH v6 3/4] mmc: mediatek: command queue support

2020-06-08 Thread Chun-Hung Wu
port CQHCI #endif Signed-off-by: Chun-Hung Wu --- drivers/mmc/host/mtk-sd.c | 119 ++ 1 file changed, 119 insertions(+) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 84a7bd44..9d69269 100644 --- a/drivers/mmc/host/mtk-sd.c +++

[PATCH v6 4/4] dt-bindings: mmc: mediatek: Add document for mt6779

2020-06-08 Thread Chun-Hung Wu
Add compatible node for mt6779 mmc and HW cmdq selection node "mediatek,cqhci". Signed-off-by: Chun-Hung Wu --- Documentation/devicetree/bindings/mmc/mtk-sd.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/

[PATCH v6 1/4] mmc: mediatek: add MT6779 MMC driver support

2020-06-08 Thread Chun-Hung Wu
MT6779 add cqhci support, so need to add new code to support it. Signed-off-by: Chun-Hung Wu --- drivers/mmc/host/mtk-sd.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index b221c02..8ada675 100644 --- a/drivers/mmc