Re: [PATCH v2 2/2] gpio: sprd: Change to use SoC compatible string

2019-02-18 Thread Baolin Wang
On Tue, 19 Feb 2019 at 04:07, Rob Herring wrote: > > On Fri, Feb 15, 2019 at 12:55:19PM +0800, Baolin Wang wrote: > > Change to use SoC compatible string instead of wildcard string. > > > > Signed-off-by: Baolin Wang > > --- > > Changes from v1: > > -

Re: [PATCH 1/3] dt-bindings: dmaengine: Add one new cell to present hardware slave id

2019-02-18 Thread Baolin Wang
Hi Arnd, On Mon, 18 Feb 2019 at 18:31, Arnd Bergmann wrote: > > On Tue, Feb 12, 2019 at 9:25 AM Baolin Wang wrote: > > On Fri, 1 Feb 2019 at 19:53, Baolin Wang wrote: > > > On Thu, 31 Jan 2019 at 00:52, Arnd Bergmann wrote: > > > > On Tue, Jan 22, 2019 at 2:

[PATCH v2 1/2] dt-bindings: gpio: sprd: Use SoC compatible string instead of wildcard string

2019-02-14 Thread Baolin Wang
Use SoC compatible string instead of wildcard string. Signed-off-by: Baolin Wang --- Changes from v1: - Add 'sprd' to indicate the module in subject line. --- .../devicetree/bindings/gpio/gpio-eic-sprd.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

[PATCH v2 2/2] gpio: sprd: Change to use SoC compatible string

2019-02-14 Thread Baolin Wang
Change to use SoC compatible string instead of wildcard string. Signed-off-by: Baolin Wang --- Changes from v1: - None. --- drivers/gpio/gpio-pmic-eic-sprd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-pmic-eic-sprd.c b/drivers/gpio/gpio-pmic-eic

Re: [PATCH 2/2] gpio: sprd: Change to use SoC compatible string

2019-02-14 Thread Baolin Wang
On Thu, 14 Feb 2019 at 15:56, Linus Walleij wrote: > > On Wed, Feb 13, 2019 at 5:10 PM Bartosz Golaszewski > wrote: > > śr., 13 lut 2019 o 14:15 Baolin Wang napisał(a): > > > > > > On Wed, 13 Feb 2019 at 20:59, Bartosz Golaszewski > > > wrote: >

Re: [PATCH] mfd: sc27xx: Use SoC compatible string for PMIC devices

2019-02-13 Thread Baolin Wang
On Wed, 13 Feb 2019 at 22:28, Arnd Bergmann wrote: > > On Wed, Feb 13, 2019 at 1:57 PM Baolin Wang wrote: > > > > We should use SoC compatible string in stead of wildcard string for > > PMIC child devices. > > > > Signed-off-by: Baolin Wang > > Looks

Re: [PATCH v2 5/5] arm64: dts: sprd: Remove wildcard compatible string

2019-02-13 Thread Baolin Wang
On Wed, 13 Feb 2019 at 22:32, Arnd Bergmann wrote: > > On Wed, Feb 13, 2019 at 1:34 PM Baolin Wang wrote: > > > > Remove wildcard compatible string. > > > > Signed-off-by: Baolin Wang > > > Looks good to me. It does break using the new dtb file on older

Re: [PATCH 2/2] gpio: sprd: Change to use SoC compatible string

2019-02-13 Thread Baolin Wang
On Wed, 13 Feb 2019 at 20:59, Bartosz Golaszewski wrote: > > śr., 13 lut 2019 o 13:49 Baolin Wang napisał(a): > > > > Change to use SoC compatible string instead of wildcard string. > > > > Signed-off-by: Baolin Wang > > --- > > drivers/gpio/gpio-pmi

Re: [PATCH 1/2] dt-bindings: gpio: Use SoC compatible string instead of wildcard string

2019-02-13 Thread Baolin Wang
On Wed, 13 Feb 2019 at 20:57, Bartosz Golaszewski wrote: > > śr., 13 lut 2019 o 13:49 Baolin Wang napisał(a): > > > > Use SoC compatible string instead of wildcard string. > > > > Signed-off-by: Baolin Wang > > --- > > .../devicetree/bindings/gpio/gpi

[PATCH] spi: sprd: Add a prefix for SPI DMA channel macros

2019-02-13 Thread Baolin Wang
Add a prefix for SPI DMA channel macros to avoid namespace conflicts, and no functional changes. Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/spi/spi-sprd.c b

[PATCH] mfd: sc27xx: Use SoC compatible string for PMIC devices

2019-02-13 Thread Baolin Wang
We should use SoC compatible string in stead of wildcard string for PMIC child devices. Signed-off-by: Baolin Wang --- drivers/mfd/sprd-sc27xx-spi.c | 42 - 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/mfd/sprd-sc27xx-spi.c b

[PATCH 2/2] gpio: sprd: Change to use SoC compatible string

2019-02-13 Thread Baolin Wang
Change to use SoC compatible string instead of wildcard string. Signed-off-by: Baolin Wang --- drivers/gpio/gpio-pmic-eic-sprd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-pmic-eic-sprd.c b/drivers/gpio/gpio-pmic-eic-sprd.c index ac573da..24228cf

[PATCH 1/2] dt-bindings: gpio: Use SoC compatible string instead of wildcard string

2019-02-13 Thread Baolin Wang
Use SoC compatible string instead of wildcard string. Signed-off-by: Baolin Wang --- .../devicetree/bindings/gpio/gpio-eic-sprd.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt b/Documentation/devicetree

Re: [PATCH v2 3/3] spi: sprd: spi: sprd: Add DMA mode support

2019-02-13 Thread Baolin Wang
On Wed, 13 Feb 2019 at 20:20, Mark Brown wrote: > > On Wed, Feb 13, 2019 at 03:36:11PM +0800, Baolin Wang wrote: > > > +enum sprd_spi_dma_channel { > > + SPI_RX, > > + SPI_TX, > > + SPI_MAX, > > +}; > > It'd have been better to nam

[PATCH v2 5/5] arm64: dts: sprd: Remove wildcard compatible string

2019-02-13 Thread Baolin Wang
Remove wildcard compatible string. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index 4a79ddf..e15409f 100644

[PATCH v2 0/5] Add new device nodes for Spreadtrum SC9860 platform

2019-02-13 Thread Baolin Wang
wildcard compatible string. Baolin Wang (5): arm64: dts: sprd: Remove PMIC INTC irq trigger type arm64: dts: sprd: Add ADC calibration support arm64: dts: sprd: Add SC2731 charger device arm64: dts: sprd: Add SC27XX fuel gauge device arm64: dts: sprd: Remove wildcard compatible string

[PATCH v2 4/5] arm64: dts: sprd: Add SC27XX fuel gauge device

2019-02-13 Thread Baolin Wang
Add Spreadtrum SC27XX fuel gauge device node to calculate the battery capacity. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731

[PATCH v2 2/5] arm64: dts: sprd: Add ADC calibration support

2019-02-13 Thread Baolin Wang
This patch adds phandles to the calibration cells provided by the Efuse device, which is used to calibrate the ADC channel scales. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/sprd

[PATCH v2 3/5] arm64: dts: sprd: Add SC2731 charger device

2019-02-13 Thread Baolin Wang
Add charger device node and related battery node for SC2731 PMIC. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi |6 ++ arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 16 2 files changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/sprd

[PATCH v2 1/5] arm64: dts: sprd: Remove PMIC INTC irq trigger type

2019-02-13 Thread Baolin Wang
The Spreadtrum PMIC INTC controller has no registers to set trigger type, since it is always high level trigger as default. So remove its child devices' irq trigger type setting and change #interrupt-cells to 1. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi |

[PATCH v2 1/3] spi: sprd: Add the SPI irq function for the SPI DMA mode

2019-02-12 Thread Baolin Wang
in remove function before freeing the SPI irq. Signed-off-by: Lanqing Liu Signed-off-by: Baolin Wang --- Changes from v1: - Return IRQ_NONE if detecting incorrect interrupt status. - Add spi_controller_suspend in remove function. --- drivers/spi/spi-sprd.c | 51

[PATCH v2 3/3] spi: sprd: spi: sprd: Add DMA mode support

2019-02-12 Thread Baolin Wang
From: Lanqing Liu Add DMA mode support for the Spreadtrum SPI controller, and we will enable SPI interrupt to help to complete the SPI transfer work in DMA mode. Signed-off-by: Lanqing Liu Signed-off-by: Baolin Wang --- Changes from v1: - Implement the can_dma() ops. - Remove DMA slave id

[PATCH v2 2/3] dt-bindings: spi: Add the DMA properties for the SPI dma mode

2019-02-12 Thread Baolin Wang
From: Lanqing Liu Add the DMA properties for the SPI dma mode. Signed-off-by: Lanqing Liu Signed-off-by: Baolin Wang --- Changes from v1: - Remove sprd,dma-slave-ids property. --- Documentation/devicetree/bindings/spi/spi-sprd.txt |7 +++ 1 file changed, 7 insertions(+) diff --git

Re: [PATCH 0/4] Add new device nodes for Spreadtrum SC9860 platform

2019-02-12 Thread Baolin Wang
On Tue, 12 Feb 2019 at 20:20, Mark Brown wrote: > > On Tue, Feb 12, 2019 at 04:40:10PM +0800, Baolin Wang wrote: > > On Fri, 1 Feb 2019 at 21:05, Mark Brown wrote: > > > > You can just list all the individual device names in the of_match_table > > > for the M

Re: [PATCH 0/4] Add new device nodes for Spreadtrum SC9860 platform

2019-02-12 Thread Baolin Wang
Hi Mark, Sorry for late reply. On Fri, 1 Feb 2019 at 21:05, Mark Brown wrote: > > On Fri, Feb 01, 2019 at 08:05:30PM +0800, Baolin Wang wrote: > > > On Spreadtrum platform, we use one mfd driver [1] to populate the > > SC27XX series PMICs including SC2731, SC2721, SC2

Re: [PATCH 1/3] dt-bindings: dmaengine: Add one new cell to present hardware slave id

2019-02-12 Thread Baolin Wang
Hi Arnd, On Fri, 1 Feb 2019 at 19:53, Baolin Wang wrote: > > Hi Arnd, > On Thu, 31 Jan 2019 at 00:52, Arnd Bergmann wrote: > > > > On Tue, Jan 22, 2019 at 2:21 PM Baolin Wang wrote: > > > > > > The DMA engine clients can trigger DMA engine automatic

Re: [PATCH] gpio: sprd: Add missing break in switch statement

2019-02-11 Thread Baolin Wang
> [-Wimplicit-fallthrough=] >switch (flow_type) { >^~ > drivers/gpio/gpio-eic-sprd.c:435:2: note: here > default: > ^~~ > > This patch is part of the ongoing efforts to enable > -Wimplicit-fallthrough. > > Signed-off-by: Gustavo A. R. Silva Thanks

Re: [PATCH 0/4] Add new device nodes for Spreadtrum SC9860 platform

2019-02-01 Thread Baolin Wang
Hi Arnd, On Thu, 31 Jan 2019 at 00:46, Arnd Bergmann wrote: > > On Mon, Jan 21, 2019 at 8:39 AM Baolin Wang wrote: > > > > This patch set adds charger and fuel gauge device nodes for Spreadtrum > > SC2731 PMIC, it also removes redundant irq trigger setting for PMIC &g

Re: [PATCH 1/3] dt-bindings: dmaengine: Add one new cell to present hardware slave id

2019-02-01 Thread Baolin Wang
Hi Arnd, On Thu, 31 Jan 2019 at 00:52, Arnd Bergmann wrote: > > On Tue, Jan 22, 2019 at 2:21 PM Baolin Wang wrote: > > > > The DMA engine clients can trigger DMA engine automatically by setting > > the corresponding hardware slave id for the DMA engine. Thus add one

Re: [PATCH v3 1/2] spi: support inter-word delay requirement for devices

2019-01-29 Thread Baolin Wang
On Tue, 29 Jan 2019 at 17:14, Jonas Bonn wrote: > > > > On 29/01/2019 10:04, Baolin Wang wrote: > > Hi Jonas, > > On Tue, 29 Jan 2019 at 05:28, Jonas Bonn wrote: > >> > >> Hi, > >> > >> On 28/01/2019 19:10, Mark Brown wrote: >

Re: [PATCH v3 1/2] spi: support inter-word delay requirement for devices

2019-01-29 Thread Baolin Wang
n the driver? The Spreadtrum SPI controller's word delay unit is clock cycle of the SPI clock, since the SPI source clock can be changed, we can not force user to know the real microseconds. But can we change it to a union structure? not sure if this is a good way. union { int word_delay_us; int word_delay_cycle; } w; -- Baolin Wang Best Regards

[PATCH 1/2] dt-bindings: ASoC: Add Spreadtrum DMA platform documentation

2019-01-29 Thread Baolin Wang
Add documentation for Spreadtrum DMA platform driver. Signed-off-by: Baolin Wang --- .../devicetree/bindings/sound/sprd-pcm.txt | 23 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/sprd-pcm.txt diff --git a

[PATCH 2/2] ASoC: sprd: Add Spreadtrum audio DMA platfrom driver

2019-01-29 Thread Baolin Wang
The Spreadtrum DMA engine uses the link-list mode to support audio playback or capture, thus this patch adds audio DMA platform support for CPU DAI to trigger DMA link-list transfer. Signed-off-by: Baolin Wang --- sound/soc/Kconfig |1 + sound/soc/Makefile|1

Re: [RFC PATCH] ALSA: core: Add DMA share buffer support

2019-01-27 Thread Baolin Wang
; But we've used the DMA buffer file's refcounting to manage the DMA > > buffer. So is this not enough? > > Unless you manage the PCM substream refcount (or block the state > change), the PCM stream itself can be released (or re-setup) freely. > OK. Thanks for your comments. -- Baolin Wang Best Regards

Re: [RFC PATCH] ALSA: core: Add DMA share buffer support

2019-01-27 Thread Baolin Wang
On Fri, 25 Jan 2019 at 21:03, Takashi Iwai wrote: > > On Fri, 25 Jan 2019 12:11:43 +0100, > Baolin Wang wrote: > > > > Hi Takashi, > > On Fri, 25 Jan 2019 at 18:10, Takashi Iwai wrote: > > > > > > On Fri, 25 Jan 2019 10:25:37 +0100, > &g

Re: [PATCH 1/2] spi: support inter-word delay requirement for devices

2019-01-25 Thread Baolin Wang
modalias[SPI_NAME_SIZE]; > const char *driver_override; > int cs_gpio;/* chip select gpio */ > + uint16_tword_delay; /* inter-word delay (us) */ > > /* the statistics */ > struct spi_statistics statistics; > -- > 2.19.1 > -- Baolin Wang Best Regards

Re: [RFC PATCH] ALSA: core: Add DMA share buffer support

2019-01-25 Thread Baolin Wang
On Fri, 25 Jan 2019 at 18:20, Takashi Iwai wrote: > > On Fri, 25 Jan 2019 11:10:25 +0100, > Takashi Iwai wrote: > > > > On Fri, 25 Jan 2019 10:25:37 +0100, > > Baolin Wang wrote: > > > > > > Hi Jaroslav, > > > On Thu, 24 Jan 2019 at 21:43, J

Re: [RFC PATCH] ALSA: core: Add DMA share buffer support

2019-01-25 Thread Baolin Wang
Hi Takashi, On Fri, 25 Jan 2019 at 18:10, Takashi Iwai wrote: > > On Fri, 25 Jan 2019 10:25:37 +0100, > Baolin Wang wrote: > > > > Hi Jaroslav, > > On Thu, 24 Jan 2019 at 21:43, Jaroslav Kysela wrote: > > > > > > Dne 23.1.2019 v 13:46 Leo Yan naps

Re: [RFC PATCH] ALSA: core: Add DMA share buffer support

2019-01-25 Thread Baolin Wang
cation from a different driver? the unexpected > private data will cause crash - there should be a type checking in the > dma-buf interface There is a validation (is_dma_buf_file() ) in dma_buf_get() function before getting the dma buffer. > If I look to the dma_buf_fd() implementation: >

[PATCH 1/3] dt-bindings: dmaengine: Add one new cell to present hardware slave id

2019-01-22 Thread Baolin Wang
The DMA engine clients can trigger DMA engine automatically by setting the corresponding hardware slave id for the DMA engine. Thus add one cell to present the hardware slave id for DMA clients. Signed-off-by: Baolin Wang --- Documentation/devicetree/bindings/dma/sprd-dma.txt | 12

[PATCH 3/3] arm64: dts: sprd: Change 2 cells to provide DMA controller specific information

2019-01-22 Thread Baolin Wang
Change to use 2 cells to provide the channel id and slave id for client. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/whale2.dtsi |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/sprd/whale2.dtsi b/arch/arm64/boot/dts/sprd/whale2.dtsi

[PATCH 2/3] dmaengine: sprd: Add new DMA engine translation function

2019-01-22 Thread Baolin Wang
Add new DMA engine translation function to get the hardware slave id of the corresponding DMA engine channel. Meanwhile we do not need to set default slave id in sprd_dma_alloc_chan_resources(), remove it. Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 49

Re: [PATCH 3/4] dt-bindings: spi: Add the DMA properties for the SPI dma mode

2019-01-22 Thread Baolin Wang
Hi Geert, On Tue, 22 Jan 2019 at 16:11, Geert Uytterhoeven wrote: > > Hi Baolin, > > On Tue, Jan 22, 2019 at 3:23 AM Baolin Wang wrote: > > On Mon, 21 Jan 2019 at 21:53, Rob Herring wrote: > > > On Tue, Jan 15, 2019 at 7:47 AM Baolin Wang > > &

Re: [PATCH 3/4] dt-bindings: spi: Add the DMA properties for the SPI dma mode

2019-01-21 Thread Baolin Wang
On Mon, 21 Jan 2019 at 21:53, Rob Herring wrote: > > On Tue, Jan 15, 2019 at 7:47 AM Baolin Wang wrote: > > > > From: Lanqing Liu > > The email address should be updated with unisoc.com. Sure. > > > Add the DMA properties for the SPI dma mode. > > >

[PATCH] gpio: sprd: Remove unused irq trigger setting

2019-01-21 Thread Baolin Wang
The Spreadtrum PMIC interrupt controller has no registers to set irq trigger type, since it is always high level trigger. That means the PMIC EIC controller as a child device of PMIC INTC does not need to set the trigger type, so remove it. Signed-off-by: Baolin Wang --- drivers/gpio/gpio-pmic

[PATCH 3/4] arm64: dts: sprd: Add SC2731 charger device

2019-01-20 Thread Baolin Wang
Add charger device node and related battery node for SC2731 PMIC. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi |6 ++ arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 16 2 files changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/sprd

[PATCH 1/4] arm64: dts: sprd: Remove PMIC INTC irq trigger type

2019-01-20 Thread Baolin Wang
The Spreadtrum PMIC INTC controller has no registers to set trigger type, since it is always high level trigger as default. So remove its child devices' irq trigger type setting and change #interrupt-cells to 1. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi |

[PATCH 4/4] arm64: dts: sprd: Add SC27XX fuel gauge device

2019-01-20 Thread Baolin Wang
Add Spreadtrum SC27XX fuel gauge device node to calculate the battery capacity. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731

[PATCH 2/4] arm64: dts: sprd: Add ADC calibration support

2019-01-20 Thread Baolin Wang
This patch adds phandles to the calibration cells provided by the Efuse device, which is used to calibrate the ADC channel scales. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/sprd

[PATCH 0/4] Add new device nodes for Spreadtrum SC9860 platform

2019-01-20 Thread Baolin Wang
This patch set adds charger and fuel gauge device nodes for Spreadtrum SC2731 PMIC, it also removes redundant irq trigger setting for PMIC devices and adds nvmem cells for ADC to calibrate the ADC channel scales. Baolin Wang (4): arm64: dts: sprd: Remove PMIC INTC irq trigger type arm64: dts

[RFC PATCH] ALSA: core: Add DMA share buffer support

2019-01-17 Thread Baolin Wang
/pull/126 Welcome any comments. Thanks. Signed-off-by: Baolin Wang --- Hi, Before sending to ALSA mailing list, we had some internal discussion off line, so I posted them to follow up. 1. One issue proposed by Srinivas Kandagatla, he proposed one use case example: DSP1 pre-process(compress-to-pcm

[PATCH v2 1/2] gpio: sprd: Fix the incorrect data register

2019-01-15 Thread Baolin Wang
From: Neo Hou Since differnt type EICs have its own data register to read, thus fix the incorrect data register. Fixes: 25518e024e3a ("gpio: Add Spreadtrum EIC driver support") Cc: Signed-off-by: Neo Hou Signed-off-by: Baolin Wang --- Changes from v1: - Add fix tag and

[PATCH v2 2/2] gpio: sprd: Fix incorrect irq type setting for the async EIC

2019-01-15 Thread Baolin Wang
ou Signed-off-by: Baolin Wang --- Changes from v1: - Add fix tag and CC stable. --- drivers/gpio/gpio-eic-sprd.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c index 257df59..e41223c 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++

Re: [PATCH 4/4] spi: sprd: Add DMA mode support

2019-01-15 Thread Baolin Wang
Hi Mark, On Tue, 15 Jan 2019 at 22:30, Mark Brown wrote: > > On Tue, Jan 15, 2019 at 09:46:53PM +0800, Baolin Wang wrote: > > From: Lanqing Liu > > > > Add DMA mode support for the Spreadtrum SPI controller, and we will enable > > SPI interrupt to help to complet

Re: [PATCH 2/4] spi: sprd: Add the SPI irq function for the SPI DMA mode

2019-01-15 Thread Baolin Wang
Hi Mark, On Tue, 15 Jan 2019 at 22:25, Mark Brown wrote: > > On Tue, Jan 15, 2019 at 09:46:51PM +0800, Baolin Wang wrote: > > This looks good, just one small issue and a thing to check: > > > +static irqreturn_t sprd_spi_handle_irq(int irq, void *data) > > +{ &g

[PATCH 4/4] spi: sprd: Add DMA mode support

2019-01-15 Thread Baolin Wang
From: Lanqing Liu Add DMA mode support for the Spreadtrum SPI controller, and we will enable SPI interrupt to help to complete the SPI transfer work in DMA mode. Signed-off-by: Lanqing Liu Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd.c | 291

[PATCH 1/4] spi: sprd: Fix the error data length in SPI read-only mode

2019-01-15 Thread Baolin Wang
ned-off-by: Lanqing Liu Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c index 8daa24e..fa324ce 100644 --- a/drivers/spi/spi-sprd.c +++ b/drivers/spi/spi-sprd.c

[PATCH 3/4] dt-bindings: spi: Add the DMA properties for the SPI dma mode

2019-01-15 Thread Baolin Wang
From: Lanqing Liu Add the DMA properties for the SPI dma mode. Signed-off-by: Lanqing Liu Signed-off-by: Baolin Wang --- Documentation/devicetree/bindings/spi/spi-sprd.txt |9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/spi-sprd.txt b

[PATCH 2/4] spi: sprd: Add the SPI irq function for the SPI DMA mode

2019-01-15 Thread Baolin Wang
From: Lanqing Liu The SPI irq event will use to complete the SPI work in the SPI DMA mode, so this patch is a preparation for the following DMA mode support. Signed-off-by: Lanqing Liu Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd.c | 46

Re: [PATCH 1/2] gpio: sprd: Fix the incorrect data register

2019-01-15 Thread Baolin Wang
On Tue, 15 Jan 2019 at 18:47, Bartosz Golaszewski wrote: > > wt., 15 sty 2019 o 08:53 Baolin Wang napisał(a): > > > > From: Neo Hou > > > > Since differnt type EICs have its own data register to read, thus fix the > > incorrect data register. > > >

[PATCH 2/4] power: supply: sc27xx: Add one property to read charge voltage

2019-01-15 Thread Baolin Wang
Add POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE property to get charge voltage sampling by ADC controller, which is used to validate if the charge voltage is in normal range or not in charger manager. Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c | 29

[PATCH 1/4] dt-bindings: power: sc27xx: Add one IIO channel to read charge voltage

2019-01-15 Thread Baolin Wang
Add one IIO channel named "charge_vol" to read the charge voltage for the SC27XX fuel gauge controller. Signed-off-by: Baolin Wang --- .../devicetree/bindings/power/supply/sc27xx-fg.txt |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/

[PATCH 3/4] power: supply: sc27xx: Fix the incorrect formula when converting capacity to coulomb counter

2019-01-15 Thread Baolin Wang
We should multiply the calibrated current data (cur_1000ma_adc) when converting current capacity (mAh) to coulomb counter, which can get an accurate coulomb counter from the fuel gauge controller. Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c |2 +- 1 file changed

[PATCH 4/4] power: supply: sc27xx: Fix capacity saving function

2019-01-15 Thread Baolin Wang
USER_AREA_CLEAR register after setting the USER_AREA_SET register, otherwise we can not save the values in the USER_AREA_SET register. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c | 64 +++--- 1 file changed, 59

[PATCH 2/2] gpio: sprd: Fix incorrect irq type setting for the async EIC

2019-01-14 Thread Baolin Wang
From: Neo Hou When setting async EIC as IRQ_TYPE_EDGE_BOTH type, we missed to set the SPRD_EIC_ASYNC_INTMODE register to 0, which means detecting edge signals. Thus this patch fixes the issue. Signed-off-by: Neo Hou Signed-off-by: Baolin Wang --- drivers/gpio/gpio-eic-sprd.c |1 + 1

[PATCH 1/2] gpio: sprd: Fix the incorrect data register

2019-01-14 Thread Baolin Wang
From: Neo Hou Since differnt type EICs have its own data register to read, thus fix the incorrect data register. Signed-off-by: Neo Hou Signed-off-by: Baolin Wang --- drivers/gpio/gpio-eic-sprd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpio

[PATCH] nvmem: sc27xx: Convert nvmem offset to block index

2019-01-14 Thread Baolin Wang
-off-by: Freeman Liu Signed-off-by: Baolin Wang --- drivers/nvmem/sc27xx-efuse.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/nvmem/sc27xx-efuse.c b/drivers/nvmem/sc27xx-efuse.c index 33185d8..c6ee210 100644 --- a/drivers/nvmem/sc27xx-efuse.c +++ b

Re: [PATCH 07/10] i2c: sprd: use core helper to mark adapter suspended

2018-12-21 Thread Baolin Wang
Hi Wolfram, On Thu, 20 Dec 2018 at 00:48, Wolfram Sang wrote: > > Rejecting transfers should be handled by the core. > > Signed-off-by: Wolfram Sang Great to see the I2C core can handle this issue. Reviewed-by: Baolin Wang > --- > drivers/i2c/busses/i2c-sprd.c | 14 ++

Re: [PATCH 06/10] i2c: sprd: don't use pdev as variable name for struct device *

2018-12-21 Thread Baolin Wang
Hi Wolfram, On Thu, 20 Dec 2018 at 00:48, Wolfram Sang wrote: > > The pointer to a device is usually named 'dev'. These 'pdev' here look > much like copy&paste errors. Fix them to avoid confusion. > > Signed-off-by: Wolfram Sang Thanks for fixing the copy

Re: [PATCH] Add linux-unisoc mailing list to Spreadtrum SoC support

2018-12-10 Thread Baolin Wang
hanks. Acked-by: Baolin Wang > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 6682420421c1..d1f768fd4f49 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2108,6 +2108,7 @@ ARM/SPREADTRUM SoC SUPPORT

Re: [PATCH 5/6] power: supply: charger-manager: Remove deprecated extcon APIs

2018-12-05 Thread Baolin Wang
Hi Sebastian, On Thu, 6 Dec 2018 at 04:34, Sebastian Reichel wrote: > > Hi, > > On Wed, Dec 05, 2018 at 10:57:12AM +0800, Baolin Wang wrote: > > Hi Rob, > > On Wed, 5 Dec 2018 at 05:52, Rob Herring wrote: > > > > > > On Fri, Nov 16, 2018 at 07:01:

[PATCH v2] power: supply: sc27xx: Save last battery capacity

2018-12-05 Thread Baolin Wang
. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- Changes from v1: - Simplify the logics for sc27xx_fgu_set_property() and sc27xx_fgu_property_is_writeable(). --- drivers/power/supply/sc27xx_fuel_gauge.c | 135 +- 1 file changed, 134 insertions(+), 1

Re: [PATCH 0/5] Add new features for SC27XX fuel gauge driver

2018-12-05 Thread Baolin Wang
Hi Sebastian, On Thu, 6 Dec 2018 at 08:10, Sebastian Reichel wrote: > > Hi, > > On Wed, Nov 14, 2018 at 05:07:03PM +0800, Baolin Wang wrote: > > This patch set adds some new features for SC27XX fuel gauge driver. > > > > 1. Read calibration data from eFuse device

Re: [PATCH 5/6] power: supply: charger-manager: Remove deprecated extcon APIs

2018-12-04 Thread Baolin Wang
Hi Rob, On Wed, 5 Dec 2018 at 05:52, Rob Herring wrote: > > On Fri, Nov 16, 2018 at 07:01:12PM +0800, Baolin Wang wrote: > > The struct extcon_specific_cable_nb and related APIs are deprecated now, > > so we should use new method to get one extcon device and register e

Re: [RESEND PATCH 0/7] Add some fixes and new feature for SPRD DMA

2018-11-25 Thread Baolin Wang
Hi Vinod, On Tue, 6 Nov 2018 at 13:01, Baolin Wang wrote: > > This patchset removes the direction usage from struct dma_slave_config, > and add one new field to save the direction. It also fixes some issues > for link-list transfer. Moreover this patchset adds new 2-stage transfer &

Re: [PATCH 5/5] power: supply: sc27xx: Save last battery capacity

2018-11-25 Thread Baolin Wang
ery capacity as the initial > > battery capacity, which can make the battery capacity more accurate. > > > > Signed-off-by: Yuanjiang Yu > > Signed-off-by: Baolin Wang > > --- > > drivers/power/supply/sc27xx_fuel_gauge.c | 143 > >

Re: [PATCH 3/5] power: supply: sc27xx: Add fuel gauge low voltage alarm

2018-11-25 Thread Baolin Wang
Hi Pavel, On Mon, 26 Nov 2018 at 05:45, Pavel Machek wrote: > > On Wed 2018-11-14 17:07:06, Baolin Wang wrote: > > From: Yuanjiang Yu > > > > Add low voltage alarm support to make sure the battery capacity > > more accurate in lower voltage stage. > > > &g

[PATCH 5/6] power: supply: charger-manager: Remove deprecated extcon APIs

2018-11-16 Thread Baolin Wang
The struct extcon_specific_cable_nb and related APIs are deprecated now, so we should use new method to get one extcon device and register extcon notifier. Signed-off-by: Baolin Wang --- .../bindings/power/supply/charger-manager.txt |6 +-- drivers/power/supply/charger-manager.c

[PATCH 4/6] power: supply: charger-manager: Make code more readable

2018-11-16 Thread Baolin Wang
Make code more readable. Signed-off-by: Baolin Wang --- drivers/power/supply/charger-manager.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index a52bc77..dc0c9a6 100644

[PATCH 2/6] power: supply: charger-manager: Fix some misspelled words

2018-11-16 Thread Baolin Wang
Fix some misspelled words. Signed-off-by: Baolin Wang --- drivers/power/supply/charger-manager.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index a1b420a..bd6c450 100644 --- a

[PATCH 3/6] power: supply: charger-manager: Fix incorrect return value

2018-11-16 Thread Baolin Wang
Fix incorrect return value. Signed-off-by: Baolin Wang --- drivers/power/supply/charger-manager.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index bd6c450..a52bc77 100644 --- a/drivers

[PATCH 6/6] power: supply: charger-manager: Add new method to start/stop charging

2018-11-16 Thread Baolin Wang
For some chargers (such as Spreadtrum SC2731 charger), they don't use regulators to control charging, instead charging control was implemented in their drivers, so we can add some supports to start or stop charging by POWER_SUPPLY_PROP_STATUS property. Signed-off-by: Baolin Wang --- dr

[PATCH 1/6] power: supply: charger-manager: Remove unused index counting

2018-11-16 Thread Baolin Wang
Remove unused index counting. Signed-off-by: Baolin Wang --- drivers/power/supply/charger-manager.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index faa1a67..a1b420a 100644 --- a/drivers/power/supply

Re: [PATCH 1/2] clocksource: Demote dbx500 PRCMU clocksource

2018-11-15 Thread Baolin Wang
ere, so let's finalize the work. > > Cc: Baolin Wang > Signed-off-by: Linus Walleij > --- Glad to see new driver uses the suspend clocksource. Reviewed-by: Baolin Wang > drivers/clocksource/clksrc-dbx500-prcmu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) &

[PATCH 4/5] power: supply: sc27xx: Add suspend/resume interfaces

2018-11-14 Thread Baolin Wang
From: Yuanjiang Yu Add fuel gauge platform suspend and resume interfaces. In suspend state, we should enable the low voltage and coulomb counter threshold interrupts to wake up system to calibrate the battery capacity in lower voltage stage. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin

[PATCH 5/5] power: supply: sc27xx: Save last battery capacity

2018-11-14 Thread Baolin Wang
. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c | 143 +- 1 file changed, 142 insertions(+), 1 deletion(-) diff --git a/drivers/power/supply/sc27xx_fuel_gauge.c b/drivers/power/supply/sc27xx_fuel_gauge.c index

[PATCH 2/5] power: supply: sc27xx: Add fuel gauge calibration

2018-11-14 Thread Baolin Wang
This patch adds support to read calibration values from the eFuse controller to calibrate the ADC values corresponding to current and voltage, which can make the current and voltage data more accurate. Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c | 62

[PATCH 3/5] power: supply: sc27xx: Add fuel gauge low voltage alarm

2018-11-14 Thread Baolin Wang
From: Yuanjiang Yu Add low voltage alarm support to make sure the battery capacity more accurate in lower voltage stage. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang --- drivers/power/supply/sc27xx_fuel_gauge.c | 171 +- 1 file changed, 170 insertions

[PATCH 0/5] Add new features for SC27XX fuel gauge driver

2018-11-14 Thread Baolin Wang
used as the initial battery capacity if system is not first power-on. Baolin Wang (2): dt-bindings: power: supply: Add nvmem properties to calibrate FGU power: supply: sc27xx: Add fuel gauge calibration Yuanjiang Yu (3): power: supply: sc27xx: Add fuel gauge low voltage alarm power: supply

[PATCH 1/5] dt-bindings: power: supply: Add nvmem properties to calibrate FGU

2018-11-14 Thread Baolin Wang
Add nvmem properties to calibrate FGU from eFuse controller. Signed-off-by: Baolin Wang --- .../devicetree/bindings/power/supply/sc27xx-fg.txt |4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/power/supply/sc27xx-fg.txt b/Documentation/devicetree

Re: [PATCH -next] power/supply: fix sc27xx_fuel_gauge build errors

2018-11-12 Thread Baolin Wang
_channel_get' > > Signed-off-by: Randy Dunlap > Cc: Sebastian Reichel > Cc: linux...@vger.kernel.org > --- Thanks for fixing this issue. Acked-by: Baolin Wang > drivers/power/supply/Kconfig |1 + > 1 file changed, 1 insertion(+) > > --- linux-next-20181112.orig/

[PATCH 4/4] power: supply: sc2731_charger: Free battery information

2018-11-12 Thread Baolin Wang
Free battery information in case of adding battery OCV tables. Signed-off-by: Baolin Wang --- drivers/power/supply/sc2731_charger.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/power/supply/sc2731_charger.c b/drivers/power/supply/sc2731_charger.c index 49b3f0c..335cb85

[PATCH 1/4] power: supply: sc2731_charger: Add one work to charge/discharge

2018-11-12 Thread Baolin Wang
Since the USB notifier context is atomic, we can not start or stop charging in atomic context. Thus this patch adds one work to help to charge or discharge. Signed-off-by: Baolin Wang --- drivers/power/supply/sc2731_charger.c | 30 ++ 1 file changed, 22 insertions

[PATCH 2/4] power: supply: sc2731_charger: Add charger status detection

2018-11-12 Thread Baolin Wang
The USB charger status can be notified before the charger driver registers the USB phy notifier, so we should check the charger status in probe() in case we missed the USB charger notification. Signed-off-by: Baolin Wang --- drivers/power/supply/sc2731_charger.c | 20 1

[PATCH 3/4] power: supply: sc2731_charger: Avoid repeated charge/discharge

2018-11-12 Thread Baolin Wang
Add info->charging validation to avoid repeated charge or discharge operation. Signed-off-by: Baolin Wang --- drivers/power/supply/sc2731_charger.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/sc2731_charger.c b/drivers/power/sup

Re: [PATCH] iio: adc: sc27xx: Add ADC data conversion timeout

2018-11-11 Thread Baolin Wang
Hi Jonathan, On 11 November 2018 at 20:40, Jonathan Cameron wrote: > On Fri, 9 Nov 2018 11:25:31 +0800 > Baolin Wang wrote: > >> From: Freeman Liu >> >> Sometimes the ADC controller met some problems, and it will not complete >> the data conversion, that will

[PATCH] iio: adc: sc27xx: Add ADC data conversion timeout

2018-11-08 Thread Baolin Wang
From: Freeman Liu Sometimes the ADC controller met some problems, and it will not complete the data conversion, that will can not wake up the read process any more to block users. So we should add one maximum conversion time to avoid this issue. Signed-off-by: Freeman Liu Signed-off-by: Baolin

Re: [PATCH 02/24] leds: core: Add support for composing LED class device names

2018-11-08 Thread Baolin Wang
Hi Jacek, On 9 November 2018 at 04:47, Jacek Anaszewski wrote: > Hi Baolin, > > Thanks for the review. > > On 11/07/2018 08:20 AM, Baolin Wang wrote: >> Hi Jacek, >> >> On 7 November 2018 at 06:07, Jacek Anaszewski >> wrote: >>> Add public led_c

Re: [PATCH 06/24] leds: sc27xx-blt: Use led_compose_name()

2018-11-06 Thread Baolin Wang
Hi Jacek, On 7 November 2018 at 06:07, Jacek Anaszewski wrote: > Switch to using generic LED support for composing LED class > device name. > > Signed-off-by: Jacek Anaszewski > Cc: Xiaotong Lu > Cc: Baolin Wang Thanks for simplifying the code, it can work well for SC2

Re: [PATCH 02/24] leds: core: Add support for composing LED class device names

2018-11-06 Thread Baolin Wang
ault_desc argument. > > In case none of the aformentioned properties was found, then, for OF > nodes, the node name is adopted for LED class device name. > > Signed-off-by: Jacek Anaszewski > Cc: Baolin Wang > Cc: Daniel Mack > Cc: Dan Murphy > Cc: Linus Wallei

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