[PATCH] dmaengine: sprd: Fix the DMA link-list configuration

2019-08-30 Thread Baolin Wang
mode") Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index baac476..525dc73 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -908,6 +908,7 @@

Re: [PATCH 0/5] a few fixes for sprd's sd host controller

2019-08-25 Thread Baolin Wang
ewed-by: Baolin Wang Tested-by: Baolin Wang > Chunyan Zhang (5): > mmc: sdhci-sprd: fixed incorrect clock divider > mmc: sdhci: sprd: add get_ro hook function > mmc: sdhci: sprd: add SDHCI_QUIRK2_PRESET_VALUE_BROKEN > mms: sdhci: sprd: add SDHCI_QUIRK_BROKEN_CARD_DETECTI

[PATCH] serial: sprd: Add loopback function support

2019-08-21 Thread Baolin Wang
Add loopback function support for Spreadtrum serial controller. Signed-off-by: Baolin Wang --- drivers/tty/serial/sprd_serial.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index 73d71a4

Re: [PATCH] iio: adc: sc27xx: Change to polling mode to read data

2019-08-18 Thread Baolin Wang
On Mon, 19 Aug 2019 at 03:27, Jonathan Cameron wrote: > > On Mon, 12 Aug 2019 10:37:44 +0800 > Baolin Wang wrote: > > > On Sun, 11 Aug 2019 at 16:03, Jonathan Cameron wrote: > > > > > > On Tue, 6 Aug 2019 15:39:45 +0800 > > > Baolin Wang wrote: >

[PATCH 2/2] nvmem: sprd: Add Spreadtrum SoCs eFuse support

2019-08-16 Thread Baolin Wang
From: Freeman Liu The Spreadtrum eFuse controller is widely used to dump chip ID, configuration setting, function select and so on, as well as supporting one-time programming. Signed-off-by: Freeman Liu Signed-off-by: Baolin Wang --- drivers/nvmem/Kconfig | 11 ++ drivers/nvmem

[PATCH 1/2] dt-bindings: nvmem: Add Spreadtrum eFuse controller documentation

2019-08-16 Thread Baolin Wang
From: Freeman Liu This patch adds the binding documentation for Spreadtrum eFuse controller. Signed-off-by: Freeman Liu Signed-off-by: Baolin Wang --- .../devicetree/bindings/nvmem/sprd-efuse.txt | 39 1 file changed, 39 insertions(+) create mode 100644

Re: [PATCH v3 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-15 Thread Baolin Wang
On Thu, 15 Aug 2019 at 20:25, Uwe Kleine-König wrote: > > On Thu, Aug 15, 2019 at 07:05:53PM +0800, Baolin Wang wrote: > > On Thu, 15 Aug 2019 at 18:11, Uwe Kleine-König > > wrote: > > > > > > Hello, > > > > > > On Thu, Aug 15, 2019 at 05:34

Re: [PATCH v3 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-15 Thread Baolin Wang
On Thu, 15 Aug 2019 at 18:11, Uwe Kleine-König wrote: > > Hello, > > On Thu, Aug 15, 2019 at 05:34:02PM +0800, Baolin Wang wrote: > > On Thu, 15 Aug 2019 at 16:54, Uwe Kleine-König > > wrote: > > > On Thu, Aug 15, 2019 at 04:16:32PM +0800, Baolin Wang wrote: >

Re: [PATCH v3 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-15 Thread Baolin Wang
On Thu, 15 Aug 2019 at 16:54, Uwe Kleine-König wrote: > > Hello Baolin, > > On Thu, Aug 15, 2019 at 04:16:32PM +0800, Baolin Wang wrote: > > On Thu, 15 Aug 2019 at 14:15, Uwe Kleine-König > > wrote: > > > On Thu, Aug 15, 2019 at 11:34:27AM +0800, Baolin Wang w

Re: [PATCH v3 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-15 Thread Baolin Wang
Hi Uwe, On Thu, 15 Aug 2019 at 14:15, Uwe Kleine-König wrote: > > Hello Baolin, > > On Thu, Aug 15, 2019 at 11:34:27AM +0800, Baolin Wang wrote: > > On Wed, 14 Aug 2019 at 23:03, Uwe Kleine-König > > wrote: > > > > > > On Wed, Aug 14, 2

Re: [PATCH v3 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-14 Thread Baolin Wang
Hi Uwe, On Wed, 14 Aug 2019 at 23:03, Uwe Kleine-König wrote: > > On Wed, Aug 14, 2019 at 08:46:11PM +0800, Baolin Wang wrote: > > + > > + /* > > + * The hardware provides a counter that is feed by the source clock. > > + * The period length is (PRE

[PATCH v3 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-14 Thread Baolin Wang
This patch adds the Spreadtrum PWM support, which provides maximum 4 channels. Signed-off-by: Neo Hou Signed-off-by: Baolin Wang --- Changes from v2: - Optimize some macors' name. - Improve some comments. - Optimize the calculation of prescale. - Do not print error log if error numeber

[PATCH v3 1/2] dt-bindings: pwm: sprd: Add Spreadtrum PWM documentation

2019-08-14 Thread Baolin Wang
Add Spreadtrum PWM controller documentation. Signed-off-by: Baolin Wang --- Changes from v2: - Fix some typos. - Move assigned-clocks to be optional. Changes from v1: - Use assigned-clock-parents and assigned-clocks to set PWM clock parent. --- Documentation/devicetree/bindings/pwm/pwm

Re: [PATCH v2 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-14 Thread Baolin Wang
Hi Uwe, On Wed, 14 Aug 2019 at 18:55, Uwe Kleine-König wrote: > > Hello Baolin, > > On Wed, Aug 14, 2019 at 06:01:50PM +0800, Baolin Wang wrote: > > On Wed, 14 Aug 2019 at 17:23, Uwe Kleine-König > > wrote: > > > On Wed, Aug 14, 2019 at 04:42:28PM +0800, Baol

Re: [PATCH v2 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-14 Thread Baolin Wang
Hi Uwe, On Wed, 14 Aug 2019 at 17:23, Uwe Kleine-König wrote: > > Hello Baolin, > > On Wed, Aug 14, 2019 at 04:42:28PM +0800, Baolin Wang wrote: > > On Tue, 13 Aug 2019 at 23:16, Uwe Kleine-König > > wrote: > > > On Tue, Aug 13, 2019 at 09

Re: [PATCH v2 1/2] dt-bindings: pwm: sprd: Add Spreadtrum PWM documentation

2019-08-14 Thread Baolin Wang
On Wed, 14 Aug 2019 at 16:49, Uwe Kleine-König wrote: > > Hello, > > On Wed, Aug 14, 2019 at 03:52:08PM +0800, Baolin Wang wrote: > > On 14/08/2019, Uwe Kleine-König wrote: > > > On Wed, Aug 14, 2019 at 03:25:53PM +0800, Baolin Wang wrote: > > >> On Wed,

Re: [PATCH v2 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-14 Thread Baolin Wang
Hi Uwe, On Tue, 13 Aug 2019 at 23:16, Uwe Kleine-König wrote: > > Hello, > > On Tue, Aug 13, 2019 at 09:46:41PM +0800, Baolin Wang wrote: > > This patch adds the Spreadtrum PWM support, which provides maximum 4 > > channels. > > > > Signed-off-by: Neo

Re: [PATCH v2 1/2] dt-bindings: pwm: sprd: Add Spreadtrum PWM documentation

2019-08-14 Thread Baolin Wang
Hi Uwe, On 14/08/2019, Uwe Kleine-König wrote: > On Wed, Aug 14, 2019 at 03:25:53PM +0800, Baolin Wang wrote: >> Hi Uwe, >> >> On Wed, 14 Aug 2019 at 15:01, Uwe Kleine-König >> wrote: >> > >> > Hello Baolin, >> > >> > On Wed, Aug

Re: [PATCH v2 1/2] dt-bindings: pwm: sprd: Add Spreadtrum PWM documentation

2019-08-14 Thread Baolin Wang
Hi Uwe, On Wed, 14 Aug 2019 at 15:01, Uwe Kleine-König wrote: > > Hello Baolin, > > On Wed, Aug 14, 2019 at 09:51:34AM +0800, Baolin Wang wrote: > > On Tue, 13 Aug 2019 at 22:13, Uwe Kleine-König > > wrote: > > > On Tue, Aug 13, 2019 at 09:46:40PM +0800, Baoli

Re: [PATCH v2 1/2] dt-bindings: pwm: sprd: Add Spreadtrum PWM documentation

2019-08-13 Thread Baolin Wang
Hi Uwe, On Tue, 13 Aug 2019 at 22:13, Uwe Kleine-König wrote: > > On Tue, Aug 13, 2019 at 09:46:40PM +0800, Baolin Wang wrote: > > Add Spreadtrum PWM controller documentation. > > > > Signed-off-by: Baolin Wang > > --- > > Changes from v1: > > - Use

[PATCH v2 1/2] dt-bindings: pwm: sprd: Add Spreadtrum PWM documentation

2019-08-13 Thread Baolin Wang
Add Spreadtrum PWM controller documentation. Signed-off-by: Baolin Wang --- Changes from v1: - Use assigned-clock-parents and assigned-clocks to set PWM clock parent. --- Documentation/devicetree/bindings/pwm/pwm-sprd.txt | 38 1 file changed, 38 insertions(+) create

[PATCH v2 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-13 Thread Baolin Wang
This patch adds the Spreadtrum PWM support, which provides maximum 4 channels. Signed-off-by: Neo Hou Signed-off-by: Baolin Wang --- Changes from v1: - Add depending on HAS_IOMEM. - Rename parameters' names. - Implement .apply() instead of .config(), .enable() and .disable(). - Use

Re: [PATCH 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-13 Thread Baolin Wang
Hi Uwe, On Fri, 9 Aug 2019 at 18:06, Baolin Wang wrote: > > Hi Uwe, > > On Fri, 9 Aug 2019 at 17:10, Uwe Kleine-König > wrote: > > > > On Thu, Aug 08, 2019 at 04:59:39PM +0800, Baolin Wang wrote: > > > From: Neo Hou > > > > > > This

Re: [PATCH 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-12 Thread Baolin Wang
On Mon, 12 Aug 2019 at 17:46, Uwe Kleine-König wrote: > > Hello Baolin, > > On Mon, Aug 12, 2019 at 05:11:56PM +0800, Baolin Wang wrote: > > On Mon, 12 Aug 2019 at 16:36, Uwe Kleine-König > > wrote: > > > On Mon, Aug 12, 2019 at 03:29:07PM +0800, Baolin Wang w

Re: [RFC PATCH 0/7] Add MMC packed function

2019-08-12 Thread Baolin Wang
Hi Adrian, On Mon, 12 Aug 2019 at 16:59, Adrian Hunter wrote: > > On 12/08/19 8:20 AM, Baolin Wang wrote: > > Hi, > > > > On Mon, 22 Jul 2019 at 21:10, Baolin Wang wrote: > >> > >> Hi All, > >> > >> Now some SD/MMC controllers can supp

Re: [PATCH 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-12 Thread Baolin Wang
Hi Uwe, On Mon, 12 Aug 2019 at 16:36, Uwe Kleine-König wrote: > > Hello Baolin, > > On Mon, Aug 12, 2019 at 03:29:07PM +0800, Baolin Wang wrote: > > Hi Uwe, > > > > On Fri, 9 Aug 2019 at 22:41, Uwe Kleine-König > > wrote: > > > On Fri, Aug 09

Re: [PATCH 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-12 Thread Baolin Wang
Hi Uwe, On Fri, 9 Aug 2019 at 22:41, Uwe Kleine-König wrote: > > Hello Baolin, > > On Fri, Aug 09, 2019 at 06:06:21PM +0800, Baolin Wang wrote: > > On Fri, 9 Aug 2019 at 17:10, Uwe Kleine-König > > wrote: > > > On Thu, Aug 08, 2019 at 04

Re: [PATCH] iio: adc: sc27xx: Change to polling mode to read data

2019-08-11 Thread Baolin Wang
On Sun, 11 Aug 2019 at 16:03, Jonathan Cameron wrote: > > On Tue, 6 Aug 2019 15:39:45 +0800 > Baolin Wang wrote: > > > Hi Jonathan, > > > > On Mon, 5 Aug 2019 at 21:50, Jonathan Cameron wrote: > > > > > > On Mon, 29 Jul 2019 10:19:48 +0800 >

Re: [PATCH 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-09 Thread Baolin Wang
Hi Uwe, On Fri, 9 Aug 2019 at 17:10, Uwe Kleine-König wrote: > > On Thu, Aug 08, 2019 at 04:59:39PM +0800, Baolin Wang wrote: > > From: Neo Hou > > > > This patch adds the Spreadtrum PWM support, which provides maximum 4 > > channels. > > > > Signed-of

[PATCH 1/2] dt-bindings: pwm: sprd: Add Spreadtrum PWM documentation

2019-08-08 Thread Baolin Wang
Add Spreadtrum PWM controller documentation. Signed-off-by: Baolin Wang --- Documentation/devicetree/bindings/pwm/pwm-sprd.txt | 31 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/pwm-sprd.txt diff --git a/Documentation

[PATCH 2/2] pwm: sprd: Add Spreadtrum PWM support

2019-08-08 Thread Baolin Wang
From: Neo Hou This patch adds the Spreadtrum PWM support, which provides maximum 4 channels. Signed-off-by: Neo Hou Co-developed-by: Baolin Wang Signed-off-by: Baolin Wang --- drivers/pwm/Kconfig| 10 ++ drivers/pwm/Makefile |1 + drivers/pwm/pwm-sprd.c | 311

Re: [PATCH] iio: adc: sc27xx: Change to polling mode to read data

2019-08-06 Thread Baolin Wang
Hi Jonathan, On Mon, 5 Aug 2019 at 21:50, Jonathan Cameron wrote: > > On Mon, 29 Jul 2019 10:19:48 +0800 > Baolin Wang wrote: > > > Hi Jonathan, > > > > On Sun, 28 Jul 2019 at 01:27, Jonathan Cameron wrote: > > > > > > On Thu, 25

Re: [PATCH 7/9] clk: sprd: Don't reference clk_init_data after registration

2019-08-01 Thread Baolin Wang
eptions. > > Cc: Chunyan Zhang > Cc: Baolin Wang > Signed-off-by: Stephen Boyd > --- > > Please ack so I can take this through clk tree Thanks. Acked-by: Baolin Wang -- Baolin Wang Best Regards

[PATCH 3/6] power: supply: sc27xx: Fix the the accuracy issue of coulomb calculation

2019-07-31 Thread Baolin Wang
. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/power/supply/sc27xx_fuel_gauge.c b/drivers/power/supply/sc27xx_fuel_gauge.c index ca7b73e..ab3afa1 100644

[PATCH 0/6] Optimize the Spreadtrum SC27xx fuel gauge

2019-07-31 Thread Baolin Wang
Hi, This patch set adds new attributes for userspace, and fixes the the accuracy issue of coulomb counter calculation, as well as optimizing the battery capacity calibration in some abnormal scenarios. Any comments are welcome. Thanks. Yuanjiang Yu (6): power: supply: sc27xx: Add

[PATCH 6/6] power: supply: sc27xx: Add POWER_SUPPLY_PROP_CALIBRATE attribute

2019-07-31 Thread Baolin Wang
From: Yuanjiang Yu Add the 'POWER_SUPPLY_PROP_CALIBRATE' attribute to allow chareger manager to calibrate the battery capacity. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c | 27 +++ 1 file changed, 19

[PATCH 5/6] power: supply: sc27xx: Make sure the alarm capacity is larger than 0

2019-07-31 Thread Baolin Wang
From: Yuanjiang Yu We must make sure the alarm capacity is larger than 0, to help to calibrate the low battery capacity. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/power

[PATCH 4/6] power: supply: sc27xx: Optimize the battery capacity calibration

2019-07-31 Thread Baolin Wang
when charger magager tries to get current capacity to make sure we give a correct capacity for userspace. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c | 127 ++ 1 file changed, 92 insertions(+), 35 deletions

[PATCH 1/6] power: supply: sc27xx: Add POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN attribute

2019-07-31 Thread Baolin Wang
From: Yuanjiang Yu Add POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN attribute to provide the battery's design capacity for charger manager to calculate the charging counter. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c |5 + 1 file

[PATCH 2/6] power: supply: sc27xx: Fix conditon to enable the FGU interrupt

2019-07-31 Thread Baolin Wang
From: Yuanjiang Yu We should allow to enable FGU interrupt to adjust the battery capacity, when charging status is POWER_SUPPLY_STATUS_DISCHARGING. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c |3 ++- 1 file changed, 2 insertions

Re: [PATCH] iio: adc: sc27xx: Change to polling mode to read data

2019-07-28 Thread Baolin Wang
Hi Jonathan, On Sun, 28 Jul 2019 at 01:27, Jonathan Cameron wrote: > > On Thu, 25 Jul 2019 14:33:50 +0800 > Baolin Wang wrote: > > > From: Freeman Liu > > > > On Spreadtrum platform, the headphone will read one ADC channel multiple > > times to identify t

Re: [PATCH 6/6] dt-bindings: spi: sprd: Change the hwlock support to be optional

2019-07-26 Thread Baolin Wang
Hi Mark, On Fri, 26 Jul 2019 at 19:29, Mark Brown wrote: > > On Fri, Jul 26, 2019 at 03:20:53PM +0800, Baolin Wang wrote: > > No need to add hardware spinlock proctection due to add multiple > > msater channel, so change it to be optional in documentation. > > Please us

[PATCH 5/6] spi: sprd: adi: Change hwlock to be optional

2019-07-26 Thread Baolin Wang
change to use of_hwspin_lock_get_id() function which return -ENOENT error number to indicate no hwlock support. Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd-adi.c | 68 +++- 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/drivers/spi

[PATCH 6/6] dt-bindings: spi: sprd: Change the hwlock support to be optional

2019-07-26 Thread Baolin Wang
No need to add hardware spinlock proctection due to add multiple msater channel, so change it to be optional in documentation. Signed-off-by: Baolin Wang --- .../devicetree/bindings/spi/spi-sprd-adi.txt | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH 4/6] spi: sprd: adi: Add a reset reason for watchdog mode

2019-07-26 Thread Baolin Wang
was rebooted by other reason through the restart_handler(), then we will clear the default watchdog reset mode to save the correct reset mode. Signed-off-by: Sherry Zong Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd-adi.c | 15 +++ 1 file changed, 15 insertions(+) diff --git

[PATCH 2/6] spi: sprd: adi: Add a reset reason for TOS panic

2019-07-26 Thread Baolin Wang
From: Chenxu Wei Add a new reset flag to indicate the reset reason is caused by TOS. Signed-off-by: Chenxu Wei Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd-adi.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c index

[PATCH 3/6] spi: sprd: adi: Add a reset reason for factory test mode

2019-07-26 Thread Baolin Wang
From: Sherry Zong Add a new reset flag to indicate that the system need enter factory test mode after restarting system. Signed-off-by: Sherry Zong Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd-adi.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-sprd-adi.c b

[PATCH 1/6] spi: sprd: adi: Remove redundant address bits setting

2019-07-26 Thread Baolin Wang
The ADI default transfer address bits is 12bit on Spreadtrum SC9860 platform, thus there is no need to set again, remove it. Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd-adi.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c

[PATCH 0/6] Optimize Spreadtrum ADI driver

2019-07-26 Thread Baolin Wang
This patchset did some optimization to remove some redundant code, add more reboot mode support and change hardware spinlock support to be optional. Baolin Wang (3): spi: sprd: adi: Remove redundant address bits setting spi: sprd: adi: Change hwlock to be optional dt-bindings: spi: sprd

[PATCH 2/2] pinctrl: sprd: Combine the condition of MISC_PIN and COMMON_PIN

2019-07-25 Thread Baolin Wang
-by: Baolin Wang --- drivers/pinctrl/sprd/pinctrl-sprd.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c b/drivers/pinctrl/sprd/pinctrl-sprd.c index a32e809..5d40bab 100644 --- a/drivers/pinctrl/sprd/pinctrl-sprd.c +++ b

[PATCH 1/2] pinctrl: sprd: Change to use devm_platform_ioremap_resource()

2019-07-25 Thread Baolin Wang
The devm_platform_ioremap_resource() function wraps platform_get_resource() and devm_ioremap_resource() in a single helper, thus use it to simplify the code. Signed-off-by: Baolin Wang --- drivers/pinctrl/sprd/pinctrl-sprd.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 3/3] i2c: sprd: Validate the return value of clock initialization

2019-07-25 Thread Baolin Wang
The 'enable' clock of I2C master is required, we should return an error if failed to get the 'enable' clock, to make sure the I2C driver can be defer probe if the clock resource is not ready. Signed-off-by: Baolin Wang --- drivers/i2c/busses/i2c-sprd.c | 11 +++ 1 file changed, 7

[PATCH 1/3] i2c: sprd: Make I2C driver can be built as a module

2019-07-25 Thread Baolin Wang
Now there is no need to keep our I2C driver to be initialized so early, thus changing to module level and let it can be built as a module, meanwhile adding some module information. Signed-off-by: Baolin Wang --- drivers/i2c/busses/Kconfig|2 +- drivers/i2c/busses/i2c-sprd.c | 10

[PATCH 2/3] i2c: sprd: Change to use devm_platform_ioremap_resource()

2019-07-25 Thread Baolin Wang
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Baolin Wang --- drivers/i2c/busses/i2c-sprd.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c

[PATCH] iio: adc: sc27xx: Change to polling mode to read data

2019-07-25 Thread Baolin Wang
with the polling mode, thus we should change to polling mode to improve the efficiency of reading data, which can identify the headphone type successfully. Signed-off-by: Freeman Liu Signed-off-by: Baolin Wang --- drivers/iio/adc/sc27xx_adc.c | 81 ++ 1 file

[PATCH v5] mmc: host: sdhci: Fix the incorrect soft reset operation when runtime resuming

2019-07-24 Thread Baolin Wang
reset for all. To fix this issue, this patch introduces a new parameter of sdhci_runtime_resume_host() to let it decide if a 'reset for all' shall be done or not. Meanwhile changes other host drivers to issue a software reset for all to keep the original logic. Signed-off-by: Baolin Wang --- Changes

Re: [PATCH v4] mmc: host: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming

2019-07-24 Thread Baolin Wang
On Wed, 24 Jul 2019 at 20:56, Adrian Hunter wrote: > > On 24/07/19 5:21 AM, Baolin Wang wrote: > > On Tue, 23 Jul 2019 at 20:39, Ulf Hansson wrote: > >> > >> On Tue, 23 Jul 2019 at 05:05, Baolin Wang wrote: > >>> > >>> Hi Ulf, > &

Re: [PATCH v4] mmc: host: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming

2019-07-23 Thread Baolin Wang
On Tue, 23 Jul 2019 at 20:39, Ulf Hansson wrote: > > On Tue, 23 Jul 2019 at 05:05, Baolin Wang wrote: > > > > Hi Ulf, > > > > On Mon, 22 Jul 2019 at 19:54, Ulf Hansson wrote: > > > > > > On Wed, 17 Jul 2019 at 04:29, Baolin Wang wrote: > &g

Re: [PATCH v4] mmc: host: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming

2019-07-22 Thread Baolin Wang
On Tue, 23 Jul 2019 at 11:21, Chunyan Zhang wrote: > > On Tue, 23 Jul 2019 at 11:05, Baolin Wang wrote: > > > > Hi Ulf, > > > > On Mon, 22 Jul 2019 at 19:54, Ulf Hansson wrote: > > > > > > On Wed, 17 Jul 2019 at 04:29, Baolin Wang wrote: > &g

Re: [PATCH v4] mmc: host: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming

2019-07-22 Thread Baolin Wang
Hi Ulf, On Mon, 22 Jul 2019 at 19:54, Ulf Hansson wrote: > > On Wed, 17 Jul 2019 at 04:29, Baolin Wang wrote: > > > > In sdhci_runtime_resume_host() function, we will always do software reset > > for all, which will cause Spreadtrum host controller work abnormally afte

[PATCH v4] mmc: host: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming

2019-07-16 Thread Baolin Wang
. To fix this issue, adding a specific reset operation that adds one condition to validate the power mode to decide if we can do software reset for all or just reset command and data lines. Signed-off-by: Baolin Wang --- Changess from v3: - Use ios.power_mode to validate if the card is power down

Re: [PATCH v3] mmc: host: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming

2019-07-16 Thread Baolin Wang
On Tue, 16 Jul 2019 at 18:40, Adrian Hunter wrote: > > On 16/07/19 11:39 AM, Baolin Wang wrote: > > In sdhci_runtime_resume_host() function, we will always do software reset > > for all, which will cause Spreadtrum host controller work abnormally after > > resuming. >

[PATCH v3] mmc: host: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming

2019-07-16 Thread Baolin Wang
. To fix this issue, adding a specific reset operation that add one condition to validate the MMC_CAP_AGGRESSIVE_PM to decide if we can do software reset for all or just reset command and data lines. Signed-off-by: Baolin Wang --- Changes from v2: - Simplify the sdhci_sprd_reset() by issuing

Re: [PATCH v2] mmc: host: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming

2019-07-16 Thread Baolin Wang
On Tue, 16 Jul 2019 at 16:24, Adrian Hunter wrote: > > On 16/07/19 10:31 AM, Baolin Wang wrote: > > In sdhci_runtime_resume_host() function, we will always do software reset > > for all, which will cause Spreadtrum host controller work abnormally after > > resuming. >

[PATCH v2] mmc: host: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming

2019-07-16 Thread Baolin Wang
. To fix this issue, adding a specific reset operation that add one condition to validate the MMC_CAP_AGGRESSIVE_PM to decide if we can do software reset for all or just reset command and data lines. Signed-off-by: Baolin Wang --- Changes from v1: - Add a specific reset operation instead of changing

Re: [PATCH] mmc: host: sdhci: Fix the incorrect soft reset operation when runtime resuming

2019-07-15 Thread Baolin Wang
Hi Adrian, On Mon, 15 Jul 2019 at 20:39, Adrian Hunter wrote: > > On 15/07/19 2:37 PM, Baolin Wang wrote: > > Hi Adrian, > > > > On Mon, 15 Jul 2019 at 19:20, Adrian Hunter wrote: > >> > >> On 15/07/19 1:58 PM, Baolin Wang wrote: > >>> In s

Re: [PATCH] mmc: host: sdhci: Fix the incorrect soft reset operation when runtime resuming

2019-07-15 Thread Baolin Wang
Hi Adrian, On Mon, 15 Jul 2019 at 19:20, Adrian Hunter wrote: > > On 15/07/19 1:58 PM, Baolin Wang wrote: > > In sdhci_runtime_resume_host() function, we will always do software reset > > for all, but according to the specification, we should issue reset command > > and

[PATCH] mmc: host: sdhci: Fix the incorrect soft reset operation when runtime resuming

2019-07-15 Thread Baolin Wang
. Signed-off-by: Baolin Wang --- drivers/mmc/host/sdhci.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 9715834..470c5e0 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -,7 +,7 @@ int

[PATCH] mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle()

2019-07-15 Thread Baolin Wang
balance, which can make the SD host device's PM runtime work well. Signed-off-by: Baolin Wang --- drivers/mmc/host/sdhci-sprd.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 6ee340a..603a5d9 100644 --- a/drivers/mmc

Re: [PATCH 03/14] power: supply: sc27xx: Introduce local variable 'struct device *dev'

2019-07-08 Thread Baolin Wang
On Mon, 8 Jul 2019 at 20:33, Fuqian Huang wrote: > > Introduce local variable 'struct device *dev' and use it instead of > dereferencing it repeatly. > > Signed-off-by: Fuqian Huang Looks good to me. Thanks. Reviewed-by: Baolin Wang > --- > drivers/power/supply/sc2

Re: [PATCH 04/14] power: supply: sc27xx: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Baolin Wang
uce source code size (avoid writing the action twice) > and reduce the likelyhood of bugs. > > Signed-off-by: Fuqian Huang Looks good to me. Thanks. Reviewed-by: Baolin Wang > --- > drivers/power/supply/sc27xx_fuel_gauge.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(

[PATCH 1/3] mmc: sdhci-sprd: Add start_signal_voltage_switch ops

2019-06-21 Thread Baolin Wang
instead of using standard SD host registers. Signed-off-by: Baolin Wang --- drivers/mmc/host/sdhci-sprd.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 024c3c5..8b23c88 100644 --- a/drivers/mmc/host

[PATCH 2/3] dt-bindings: mmc: sprd: Add pinctrl support

2019-06-21 Thread Baolin Wang
When changing SD card voltage signal for Spreadtrum SD host controller, it also need to switch related pin's state. Thus add pinctrl properties' description in documentation. Signed-off-by: Baolin Wang --- .../devicetree/bindings/mmc/sdhci-sprd.txt |7 +++ 1 file changed, 7

[PATCH 0/3] Optimize voltage switch for the SD controller

2019-06-21 Thread Baolin Wang
This patch set is used to optimize voltage switch for the Spreadtrum SD host controller. Any comments are welcome. Thanks. Baolin Wang (3): mmc: sdhci-sprd: Add start_signal_voltage_switch ops dt-bindings: mmc: sprd: Add pinctrl support mmc: sdhci-sprd: Add pin control support for voltage

[PATCH 3/3] mmc: sdhci-sprd: Add pin control support for voltage switch

2019-06-21 Thread Baolin Wang
For Spreadtrum SD card voltage switching, besides regulator setting, it also need switch related pin's state to output corresponding voltage. This patch adds pin control operation to support voltage switch. Signed-off-by: Baolin Wang --- drivers/mmc/host/sdhci-sprd.c | 54

Re: [PATCH 3/7] drivers: gpio: eic-sprd: use devm_platform_ioremap_resource()

2019-06-19 Thread Baolin Wang
Hi, On Tue, 18 Jun 2019 at 00:49, Enrico Weigelt, metux IT consult wrote: > > Use the new helper that wraps the calls to platform_get_resource() > and devm_ioremap_resource() together. > > Signed-off-by: Enrico Weigelt, metux IT consult Thanks. Reviewed-by: Baolin Wang -- B

Re: [PATCH v5 07/26] leds: sc27xx-blt: Use generic support for composing LED names

2019-06-09 Thread Baolin Wang
Hi Jacek, On Mon, 10 Jun 2019 at 03:08, Jacek Anaszewski wrote: > > Switch to using generic LED support for composing LED class > device name. > > Signed-off-by: Jacek Anaszewski > Cc: Baolin Wang > Acked-by: Pavel Machek Thanks. Reviewed-by: Baolin Wang -- Baolin Wang Best Regards

[PATCH v2 7/9] dt-bindings: mmc: sprd: Add PHY DLL delay documentation

2019-06-04 Thread Baolin Wang
Introduce some PHY DLL delays properties to help to sample the PHY clock. Signed-off-by: Baolin Wang --- .../devicetree/bindings/mmc/sdhci-sprd.txt | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/sdhci-sprd.txt b

[PATCH v2 5/9] mmc: sdhci-sprd: Add HS400 enhanced strobe mode

2019-06-04 Thread Baolin Wang
Add HS400 enhanced strobe mode support for Spreadtrum SD host controller. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-sprd.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc

[PATCH v2 9/9] arm64: dts: sprd: Add Spreadtrum SD host controller support

2019-06-04 Thread Baolin Wang
Add one Spreadtrum SD host controller to support eMMC card for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/whale2.dtsi | 35 ++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/whale2.dtsi b/arch

[PATCH v2 4/9] mmc: sdhci-sprd: Implement the get_max_timeout_count() interface

2019-06-04 Thread Baolin Wang
Implement the get_max_timeout_count() interface to set the Spredtrum SD host controller actual maximum timeout count. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-sprd.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/sdhci-sprd.c

[PATCH v2 8/9] mmc: sdhci-sprd: Add PHY DLL delay configuration

2019-06-04 Thread Baolin Wang
Set the PHY DLL delay for each timing mode, which is used to sample the clock accurately and make the clock more stable. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-sprd.c | 51 + 1 file changed, 51 insertions(+) diff

[PATCH v2 6/9] mmc: sdhci-sprd: Enable PHY DLL to make clock stable

2019-06-04 Thread Baolin Wang
For the Spreadtrum SD host controller, when we changed the clock to be more than 52M, we should enable the PHY DLL which is used to track the clock frequency to make the clock work more stable. Otherwise deviation may occur of the higher clock. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter

[PATCH v2 3/9] mmc: sdhci-sprd: Add optional gate clock support

2019-06-04 Thread Baolin Wang
For the Spreadtrum SC9860 platform, we should enable another gate clock '2x_enable' to make the SD host controller work well. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-sprd.c | 35 +-- 1 file changed, 29 insertions(+), 6

[PATCH v2 2/9] dt-bindings: mmc: sprd: Add another optional clock documentation

2019-06-04 Thread Baolin Wang
For some Spreadtrum platforms like SC9860 platform, we should enable another gate clock '2x_enable' to make the SD host controller work well. Thus add documentation for this optional clock. Signed-off-by: Baolin Wang --- .../devicetree/bindings/mmc/sdhci-sprd.txt |1 + 1 file

[PATCH v2 0/9] Add SD host controller support for SC9860 platform

2019-06-04 Thread Baolin Wang
MMC_TIMING_MMC_HS to MMC_TIMING_SD_HS in patch 8. Baolin Wang (9): mmc: sdhci-sprd: Check the enable clock's return value correctly dt-bindings: mmc: sprd: Add another optional clock documentation mmc: sdhci-sprd: Add optional gate clock support mmc: sdhci-sprd: Implement the get_max_timeout_count

[PATCH v2 1/9] mmc: sdhci-sprd: Check the enable clock's return value correctly

2019-06-04 Thread Baolin Wang
Missed to check the enable clock's return value, fix it. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-sprd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 9a822e2

Re: [PATCH 4/9] mmc: sdhci-sprd: Implement the get_max_timeout_count() interface

2019-06-04 Thread Baolin Wang
On Mon, 3 Jun 2019 at 20:35, Adrian Hunter wrote: > > On 20/05/19 1:11 PM, Baolin Wang wrote: > > Implement the get_max_timeout_count() interface to set the Spredtrum SD > > host controller actual maximum timeout count. > > > > Signed-off-by: Baolin Wang > &g

Re: [PATCH 0/9] Add SD host controller support for SC9860 platform

2019-06-04 Thread Baolin Wang
On Tue, 4 Jun 2019 at 15:14, Ulf Hansson wrote: > > On Mon, 3 Jun 2019 at 10:42, Baolin Wang wrote: > > > > Hi Adrian & Ulf, > > > > On Mon, 20 May 2019 at 18:12, Baolin Wang wrote: > > > > > > This patch set adds optional clock support, HS40

Re: [PATCH 2/9] dt-bindings: mmc: sprd: Add another optional clock documentation

2019-06-03 Thread Baolin Wang
Hi Ulf, On Mon, 3 Jun 2019 at 21:34, Ulf Hansson wrote: > > On Mon, 20 May 2019 at 12:12, Baolin Wang wrote: > > > > For some Spreadtrum platforms like SC9860 platform, we should enable another > > gate clock '2x_enable' to make the SD host controller work well. Th

Re: [PATCH 8/9] mmc: sdhci-sprd: Add PHY DLL delay configuration

2019-06-03 Thread Baolin Wang
Hi Adrian, On Mon, 3 Jun 2019 at 21:03, Adrian Hunter wrote: > > On 20/05/19 1:12 PM, Baolin Wang wrote: > > Set the PHY DLL delay for each timing mode, which is used to sample the > > clock > > accurately and make the clock more stable. > > > > Signed-

Re: [PATCH 0/9] Add SD host controller support for SC9860 platform

2019-06-03 Thread Baolin Wang
Hi Adrian & Ulf, On Mon, 20 May 2019 at 18:12, Baolin Wang wrote: > > This patch set adds optional clock support, HS400 enhanced strobe mode > support, > PHY DLL configuration and other optimization to make the SD host controller > can work well on the Spreadtrum SC9860 pla

Re: [PATCH v2 2/3] clk: sprd: Check error only for devm_regmap_init_mmio()

2019-05-21 Thread Baolin Wang
On Wed, 22 May 2019 at 09:15, Chunyan Zhang wrote: > > The function devm_regmap_init_mmio() wouldn't return NULL pointer for > now, so only need to ensure the return value is not an error code. > > Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang > --- > drivers/

Re: [PATCH v2 1/3] clk: sprd: Switch from of_iomap() to devm_ioremap_resource()

2019-05-21 Thread Baolin Wang
n Zhang Reviewed-by: Baolin Wang > --- > drivers/clk/sprd/common.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/sprd/common.c b/drivers/clk/sprd/common.c > index e038b0447206..9ce690999eaa 100644 > --- a/drivers/clk/sprd/com

Re: [PATCH 2/2] clk: sprd: Add check for return value of sprd_clk_regmap_init()

2019-05-21 Thread Baolin Wang
On Tue, 21 May 2019 at 14:15, Chunyan Zhang wrote: > > sprd_clk_regmap_init() doesn't always return success, adding check > for its return value should make the code more strong. > > Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang > --- > drivers/clk/sprd/sc986

Re: [PATCH 1/2] clk: sprd: Switch from of_iomap() to devm_ioremap_resource()

2019-05-21 Thread Baolin Wang
's better to move into one separate patch. > pr_err("failed to init regmap\n"); > return PTR_ERR(regmap); > } > -- > 2.17.1 > -- Baolin Wang Best Regards

[PATCH v2 8/8] dmaengine: sh: usb-dmac: Let the core do the device node validation

2019-05-20 Thread Baolin Wang
Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang --- drivers/dma/sh/usb-dmac.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/dma/sh/usb-dmac.c b/drivers/dma/sh/usb-dmac.c index 59403f6..0afabf3 100644

[PATCH v2 7/8] dmaengine: sh: rcar-dmac: Let the core do the device node validation

2019-05-20 Thread Baolin Wang
Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang --- drivers/dma/sh/rcar-dmac.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 33ab1b6..67df54a 100644

[PATCH v2 1/8] dmaengine: Add matching device node validation in __dma_request_channel()

2019-05-20 Thread Baolin Wang
validation in the DMA engine core, to remove all of device node validation in the drivers. Tested-by: Peter Ujfalusi Signed-off-by: Baolin Wang --- drivers/dma/dmaengine.c | 10 -- drivers/dma/of-dma.c |4 ++-- include/linux/dmaengine.h | 12 3 files changed, 18

[PATCH v2 5/8] dmaengine: mmp_tdma: Let the core do the device node validation

2019-05-20 Thread Baolin Wang
Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang --- drivers/dma/mmp_tdma.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 0c56faa0..e76858b 100644

<    1   2   3   4   5   6   7   8   9   10   >