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

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

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

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

[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
to be 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
gt; > 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/drivers/power/supply

[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

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

Re: [PATCH 01/24] leds: class: Improve LED and LED flash class registration API

2018-11-06 Thread Baolin Wang
quot; property. > > Two existing users of devm_of_led_classdev_registers() are modified > to use devm_led_classdev_register(), which will not impact their > operation since they in fact didn't need to pass struct device_node on > registration from the beginning. > > Signed-off-by: Jacek

[PATCH] leds: trigger: Fix sleeping function called from invalid context

2018-11-06 Thread Baolin Wang
LED pattern trigger") Reported-by: Geert Uytterhoeven Signed-off-by: Baolin Wang --- drivers/leds/trigger/ledtrig-pattern.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/drivers/leds/trigger/ledtrig-pattern.c b/drivers/leds/trigger/ledtrig

Re: [PATCH v14 1/2] leds: core: Introduce LED pattern trigger

2018-11-06 Thread Baolin Wang
Hi Geert, On 6 November 2018 at 23:57, Geert Uytterhoeven wrote: > Hi Baolin, > > On Tue, Oct 2, 2018 at 6:39 PM Baolin Wang wrote: >> This patch adds one new led trigger that LED device can configure >> the software or hardware pattern and trigger it. >> >> C

[RESEND PATCH 1/7] dmaengine: sprd: Remove direction usage from struct dma_slave_config

2018-11-05 Thread Baolin Wang
The direction field of struct dma_slave_config was marked deprecated, thus remove the usage. Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 38d4e4f..c226dc93 100644

[RESEND PATCH 3/7] dmaengine: sprd: Fix the last link-list configuration

2018-11-05 Thread Baolin Wang
-by: Baolin Wang --- drivers/dma/sprd-dma.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 4f3587b..e6a74dc 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -697,7 +697,8 @@ static int

[RESEND PATCH 2/7] dmaengine: sprd: Get transfer residue depending on the transfer direction

2018-11-05 Thread Baolin Wang
From: Eric Long Add one field to save the transfer direction for struct sprd_dma_desc, which is used to get correct transfer residue depending on the transfer direction. [Baolin Wang adds one field to present the transfer direction] Signed-off-by: Eric Long Signed-off-by: Baolin Wang

[RESEND PATCH 6/7] dmaengine: sprd: Support DMA 2-stage transfer mode

2018-11-05 Thread Baolin Wang
automatically by hardware signal. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 98 +- include/linux/dma/sprd-dma.h | 62 -- 2 files changed, 156 insertions(+), 4 deletions(-) diff --git

[RESEND PATCH 7/7] dmaengine: sprd: Add me as one of the module authors

2018-11-05 Thread Baolin Wang
From: Eric Long Add me as one of the module authors. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 50d6569..e2f0167 100644 --- a/drivers/dma/sprd

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

2018-11-05 Thread Baolin Wang
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 support for our DMA. Baolin Wang (1): dmaengine: sprd: Remove direction usage

[RESEND PATCH 4/7] dmaengine: sprd: Set cur_desc as NULL when free or terminate one dma channel

2018-11-05 Thread Baolin Wang
hannel to avoid this issue. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index e6a74dc..1b39661 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd

[RESEND PATCH 5/7] dmaengine: sprd: Support DMA link-list cyclic callback

2018-11-05 Thread Baolin Wang
From: Eric Long The Spreadtrum DMA link-list mode is always one cyclic transfer, so we should clear the SPRD_DMA_LLIST_END flag for the link-list configuration. Moreover add cyclic callback support for the cyclic transfer. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma

[PATCH v7 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-11-04 Thread Baolin Wang
This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, which is used to calculate the battery capacity. Original-by: Yuanjiang Yu Signed-off-by: Baolin Wang Acked-by: Linus Walleij --- Changes from v6: - Use DIV_ROUND_CLOSEST macro to simplify code. Changes from v5: - Save

[PATCH v7 2/6] power: supply: core: Add one field to present the battery internal resistance

2018-11-04 Thread Baolin Wang
Add one field for 'struct power_supply_battery_info' to present the battery factory internal resistance. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v6: - None. Changes from v5: - None. Changes from v4: - None. Changes from v3: - New patch in v3, which splits

[PATCH v7 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-11-04 Thread Baolin Wang
factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v6: - None. Changes from v5: - None. Changes from v4: - None. Changes from v3: - Split binding into one separate patch. - Add LinusW reviewed tag. Changes from v2

[PATCH v7 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-11-04 Thread Baolin Wang
We have introduced some battery properties to present the OCV table temperatures and OCV capacity table values. Thus this patch add OCV temperature and OCV table for battery information, as well as providing some helper functions to use the OCV capacity table for users. Signed-off-by: Baolin Wang

[PATCH v7 5/6] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-11-04 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC27XX series PMICs fuel gauge unit device, which is used to calculate the battery capacity. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v6: - None. Changes from v5: - None. Changes

[PATCH v7 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-11-04 Thread Baolin Wang
Reichel Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v6: - Add reviewed tag from Rob. Changes from v5: - None. Changes from v4: - Improve the description of ocv-capacity-table-n to make the order clear. Changes from v3: - Split binding

Re: [PATCH v6 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-11-01 Thread Baolin Wang
Hi Quentin, On 1 November 2018 at 21:50, Quentin Schulz wrote: > Hi Baolin, > > On Thu, Nov 01, 2018 at 03:22:18PM +0800, Baolin Wang wrote: >> Hi Quentin, >> >> On 29 October 2018 at 22:48, Quentin Schulz >> wrote: > [...] >> > >> >

Re: [PATCH v6 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-11-01 Thread Baolin Wang
mperatures and OCV capacity table values. Thus this patch add OCV >> temperature and OCV table for battery information, as well as providing >> some helper functions to use the OCV capacity table for users. >> >> Signed-off-by: Baolin Wang >> Reviewed-by: Linus Wallei

Re: [PATCH v6 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-11-01 Thread Baolin Wang
On 31 October 2018 at 16:56, Linus Walleij wrote: > On Mon, Oct 22, 2018 at 9:44 AM Baolin Wang wrote: > >> This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, >> which is used to calculate the battery capacity. >> >> Original-by: Yuanjiang Yu

Re: [PATCH] pinctrl: sprd: Use define directive for sprd_pinconf_params values

2018-10-31 Thread Baolin Wang
ink: https://github.com/ClangBuiltLinux/linux/issues/138 > Signed-off-by: Nathan Chancellor > --- Looks reasonable to me. Thanks. Reviewed-by: Baolin Wang -- Baolin Wang Best Regards

Re: More checks for patterns? was: Fix pattern handling optimalization

2018-10-26 Thread Baolin Wang
if (ccount != 2) { > data->npatterns = 0; > err = -EINVAL; > > > > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) > http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- Baolin Wang Best Regards

Re: [PATCH v6 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-25 Thread Baolin Wang
On 26 October 2018 at 04:13, Sebastian Reichel wrote: > Hi Baolin, > > On Thu, Oct 25, 2018 at 10:01:55AM +0800, Baolin Wang wrote: >> Hi Sebastian, >> >> On 22 October 2018 at 15:43, Baolin Wang wrote: >> > The internal resistance of a battery

Re: [PATCH v6 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-24 Thread Baolin Wang
Hi Sebastian, On 22 October 2018 at 15:43, Baolin Wang wrote: > The internal resistance of a battery is not a constant in its life cycle, > this varies over the age of the battery or temperature and so on. But we > just want use one constant battery internal resistance to estimate the

Re: [PATCH 5/5] rtc: sc27xx: Always read normal alarm when registering RTC device

2018-10-24 Thread Baolin Wang
Hi Alexandre, On 25 October 2018 at 08:34, Alexandre Belloni wrote: > Hello, > > On 18/10/2018 16:52:30+0800, Baolin Wang wrote: >> When registering one RTC device, it will check to see if there is an >> alarm already set in RTC hardware by reading RTC alarm, at this tim

Re: [PATCH v5 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-22 Thread Baolin Wang
On 22 October 2018 at 18:43, Sebastian Reichel wrote: > Hi, > > On Mon, Oct 22, 2018 at 01:54:50PM +0800, Baolin Wang wrote: >> Hi Sebastian, >> >> On 22 October 2018 at 00:52, Sebastian Reichel wrote: >> > Hi, >> > >> > On Fr

[PATCH v6 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-10-22 Thread Baolin Wang
Reichel Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v5: - None. Changes from v4: - Improve the description of ocv-capacity-table-n to make the order clear. Changes from v3: - Split binding into one separate patch. - Rename ocv-capacity-table-temperatures to ocv

[PATCH v6 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-22 Thread Baolin Wang
factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v5: - None. Changes from v4: - None. Changes from v3: - Split binding into one separate patch. - Add LinusW reviewed tag. Changes from v2: - Rename the property

[PATCH v6 5/6] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-10-22 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC27XX series PMICs fuel gauge unit device, which is used to calculate the battery capacity. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v5: - None. Changes from v4: - None. Changes

[PATCH v6 2/6] power: supply: core: Add one field to present the battery internal resistance

2018-10-22 Thread Baolin Wang
Add one field for 'struct power_supply_battery_info' to present the battery factory internal resistance. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v5: - None. Changes from v4: - None. Changes from v3: - New patch in v3, which splits code into one separate patch

[PATCH v6 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-22 Thread Baolin Wang
This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, which is used to calculate the battery capacity. Original-by: Yuanjiang Yu Signed-off-by: Baolin Wang Acked-by: Linus Walleij --- Changes from v5: - Save the OCV values in micro volts for OCV capacity table. - Use

[PATCH v6 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-10-22 Thread Baolin Wang
We have introduced some battery properties to present the OCV table temperatures and OCV capacity table values. Thus this patch add OCV temperature and OCV table for battery information, as well as providing some helper functions to use the OCV capacity table for users. Signed-off-by: Baolin Wang

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

2018-10-22 Thread Baolin Wang
On 21 October 2018 at 00:30, Vinod wrote: > On 18-10-18, 17:29, Baolin Wang wrote: >> Hi Vinod, >> >> On 29 September 2018 at 13:48, Baolin Wang wrote: >> > This patchset removes the direction usage from struct dma_slave_config, >> > and add one new fie

Re: [PATCH v5 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-21 Thread Baolin Wang
Hi Sebastian, On 22 October 2018 at 00:52, Sebastian Reichel wrote: > Hi, > > On Fri, Oct 19, 2018 at 06:53:15PM +0800, Baolin Wang wrote: >> This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, >> which is used to calculate the battery capacity. >> &

[PATCH v5 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-10-19 Thread Baolin Wang
We have introduced some battery properties to present the OCV table temperatures and OCV capacity table values. Thus this patch add OCV temperature and OCV table for battery information, as well as providing some helper functions to use the OCV capacity table for users. Signed-off-by: Baolin Wang

[PATCH v5 2/6] power: supply: core: Add one field to present the battery internal resistance

2018-10-19 Thread Baolin Wang
Add one field for 'struct power_supply_battery_info' to present the battery factory internal resistance. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v4: - None. Changes from v3: - New patch in v3, which splits code into one separate patch. - Add Linusw reviewed

[PATCH v5 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-19 Thread Baolin Wang
This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, which is used to calculate the battery capacity. Original-by: Yuanjiang Yu Signed-off-by: Baolin Wang Acked-by: Linus Walleij --- Changes from v4: - None. Changes from v3: - None. Changes from v2: - Use core helper

[PATCH v5 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-10-19 Thread Baolin Wang
Reichel Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v4: - Improve the description of ocv-capacity-table-n to make the order clear. Changes from v3: - Split binding into one separate patch. - Rename ocv-capacity-table-temperatures to ocv-capacity-celsius. - Add some

[PATCH v5 5/6] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-10-19 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC27XX series PMICs fuel gauge unit device, which is used to calculate the battery capacity. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v4: - None. Changes from v3: - Add reviewed

[PATCH v5 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-19 Thread Baolin Wang
factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v4: - None. Changes from v3: - Split binding into one separate patch. - Add LinusW reviewed tag. Changes from v2: - Rename the property. - Improve the commit message

Re: [PATCH v4 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-10-18 Thread Baolin Wang
On 19 October 2018 at 00:51, Rob Herring wrote: > On Mon, Oct 15, 2018 at 04:09:22PM +0800, Baolin Wang wrote: >> Some battery driver will use the open circuit voltage (OCV) value to look >> up the corresponding battery capacity percent in one certain degree Celsius. >> Thu

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

2018-10-18 Thread Baolin Wang
Hi Vinod, On 29 September 2018 at 13:48, 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

[PATCH 3/5] rtc: sc27xx: Remove interrupts disable and clear in probe()

2018-10-18 Thread Baolin Wang
When registering one rtc device, it will check to see if there is an alarm already set in rtc hardware by issuing __rtc_read_alarm(). So we should not disable the RTC interrupts and clear the interrupts status in probe() function. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c | 20

[PATCH 2/5] rtc: sc27xx: Clear SPG value update interrupt status

2018-10-18 Thread Baolin Wang
We should clear the SPG value update interrupt status once the SPG value is updated successfully, in case incorrect status validation for next time. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc

[PATCH 5/5] rtc: sc27xx: Always read normal alarm when registering RTC device

2018-10-18 Thread Baolin Wang
When registering one RTC device, it will check to see if there is an alarm already set in RTC hardware by reading RTC alarm, at this time we should always read the normal alarm put in always-on region by checking the rtc->registered flag. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27x

[PATCH 1/5] rtc: sc27xx: Set wakeup capability before registering rtc device

2018-10-18 Thread Baolin Wang
Set wakeup capability before registering rtc device, in case the alarmtimer can find one available rtc device. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c

[PATCH 4/5] rtc: sc27xx: Add check to see if need to enable the alarm interrupt

2018-10-18 Thread Baolin Wang
The RTC interrupt enable register is not put in always-power-on region supplied by VDDRTC, so we should check if we need enable the alarm interrupt when system booting. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c | 33 + 1 file changed, 33

[PATCH 0/5] Fix some issues for RTC alarm function

2018-10-18 Thread Baolin Wang
This patch set fixes some issues when setting one RTC alarm. Baolin Wang (5): rtc: sc27xx: Set wakeup capability before registering rtc device rtc: sc27xx: Clear SPG value update interrupt status rtc: sc27xx: Remove interrupts disable and clear in probe() rtc: sc27xx: Add check to see

[PATCH v4 2/6] power: supply: core: Add one field to present the battery internal resistance

2018-10-15 Thread Baolin Wang
Add one field for 'struct power_supply_battery_info' to present the battery factory internal resistance. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v3: - New patch in v3, which splits code into one separate patch. - Add Linusw reviewed tag. --- drivers/power

[PATCH v4 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-15 Thread Baolin Wang
factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v3: - Split binding into one separate patch. - Add LinusW reviewed tag. Changes from v2: - Rename the property. - Improve the commit message. Changes from v1: - New

[PATCH v4 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-10-15 Thread Baolin Wang
We have introduced some battery properties to present the OCV table temperatures and OCV capacity table values. Thus this patch add OCV temperature and OCV table for battery information, as well as providing some helper functions to use the OCV capacity table for users. Signed-off-by: Baolin Wang

[PATCH v4 5/6] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-10-15 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC27XX series PMICs fuel gauge unit device, which is used to calculate the battery capacity. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v3: Add reviewed tag from Rob. Changes from v2

[PATCH v4 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-15 Thread Baolin Wang
This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, which is used to calculate the battery capacity. Original-by: Yuanjiang Yu Signed-off-by: Baolin Wang Acked-by: Linus Walleij --- Changes from v3: - None. Changes from v2: - Use core helper functions to look up OCV

[PATCH v4 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-10-15 Thread Baolin Wang
Reichel Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v3: - Split binding into one separate patch. - Rename ocv-capacity-table-temperatures to ocv-capacity-celsius. - Add some words to specify the OCV's unit. Changes from v2: - Use type __be32 to calculate the table

Re: [PATCH v3 2/4] power: supply: core: Introduce properties to present the battery OCV capacity table

2018-10-14 Thread Baolin Wang
Hi Rob, On 12 October 2018 at 22:35, Rob Herring wrote: > On Thu, Sep 27, 2018 at 03:26:55PM +0800, Baolin Wang wrote: >> Some battery driver will use the open circuit voltage (OCV) value to look >> up the corresponding battery capacity percent in one certain degree Celsius. >

Re: [PATCH v15 1/2] leds: core: Introduce LED pattern trigger

2018-10-11 Thread Baolin Wang
Hi, On 12 October 2018 at 04:07, Jacek Anaszewski wrote: > Hi Baolin, > > On 10/11/2018 06:07 AM, Baolin Wang wrote: >> This patch adds a new led trigger that LED device can employ >> software or hardware pattern engine. >> >> Consumers can write 'pattern' fi

[PATCH v15 1/2] leds: core: Introduce LED pattern trigger

2018-10-10 Thread Baolin Wang
to enable the hardware pattern for some LED controllers which can autonomously control brightness over time, according to some preprogrammed hardware patterns. Signed-off-by: Raphael Teysseyre Signed-off-by: Baolin Wang --- Changes from v14: - Improve the commit message and ABI documentation. - Fix

[PATCH v15 2/2] leds: sc27xx: Add pattern_set/clear interfaces for LED controller

2018-10-10 Thread Baolin Wang
This patch implements the 'pattern_set'and 'pattern_clear' interfaces to support SC27XX LED breathing mode. Signed-off-by: Baolin Wang Acked-by: Pavel Machek --- Chnages from v14: - None. Changes from v13: - None. Changes from v12: - None. Changes from v11: - None. Changes from v10

Re: [PATCH v14 1/2] leds: core: Introduce LED pattern trigger

2018-10-10 Thread Baolin Wang
i.e. the subsequent brightness will be > applied without adding intervening dimming intervals" For gradual dimming, we also do not need to limit the duration larger than 50 ms. So below patterns are all valid now: echo "10 1 10 0 20 1 20 0 30 1 30 0" > pattern ec

Re: [PATCH v14 1/2] leds: core: Introduce LED pattern trigger

2018-10-10 Thread Baolin Wang
ming_interval" knob, but I'd suggest waiting until > such need arises. > > [Now, I don't have strong feelings here, and patch would probably be > okay with me even if it has dimming_interval, but I'd prefer to keep > it simple. We are at v14 of the patch...] Make sense. I will leave this feature until someone has the dimming_interval adjustment. Thanks. -- Baolin Wang Best Regards

Re: [PATCH v14 1/2] leds: core: Introduce LED pattern trigger

2018-10-09 Thread Baolin Wang
Hi Jacek, On 10 October 2018 at 02:37, Jacek Anaszewski wrote: > Hi Baolin, > > On 10/09/2018 02:01 PM, Baolin Wang wrote: >> Hi Jacek and Pavel, >> >> On 5 October 2018 at 04:00, Jacek Anaszewski >> wrote: >>> Hi Baolin, >>> >>&

Re: [PATCH v14 1/2] leds: core: Introduce LED pattern trigger

2018-10-09 Thread Baolin Wang
Hi Jacek and Pavel, On 5 October 2018 at 04:00, Jacek Anaszewski wrote: > Hi Baolin, > > On 10/03/2018 03:21 AM, Baolin Wang wrote: >> Hi Jacek, >> >> On 3 October 2018 at 04:25, Jacek Anaszewski >> wrote: >>> Hi Baolin, >>> >>

Re: [PATCH v14 1/2] leds: core: Introduce LED pattern trigger

2018-10-02 Thread Baolin Wang
Hi Jacek, On 3 October 2018 at 04:25, Jacek Anaszewski wrote: > Hi Baolin, > > Thank you for the v14. We'll probably need v15, though :-) > > I added the comments in the code below. > > On 10/02/2018 05:43 PM, Baolin Wang wrote: >> This patch adds one new led

[PATCH v14 2/2] leds: sc27xx: Add pattern_set/clear interfaces for LED controller

2018-10-02 Thread Baolin Wang
This patch implements the 'pattern_set'and 'pattern_clear' interfaces to support SC27XX LED breathing mode. Signed-off-by: Baolin Wang Acked-by: Pavel Machek --- Changes from v13: - None. Changes from v12: - None. Changes from v11: - None. Changes from v10: - Add duration alignment

[PATCH v14 1/2] leds: core: Introduce LED pattern trigger

2018-10-02 Thread Baolin Wang
'hw_pattern' file to enable the hardware pattern for some LED controllers which can autonomously control brightness over time, according to some preprogrammed hardware patterns. Signed-off-by: Raphael Teysseyre Signed-off-by: Baolin Wang --- Changes from v13: - Add duration validation for gradual

Re: [PATCH v13 1/2] leds: core: Introduce LED pattern trigger

2018-10-01 Thread Baolin Wang
11] secondary_startup_64+0xa4/0xb0 > > Probably the best solution would be to avoid the dimming if > delta_t is lower than UPDATE_INTERVAL. Thanks for your testing. Yes, I will valid the delta_t value when user use the gradual dimming, and add some comments in ABI to make it clear, th

[PATCH 6/7] dmaengine: sprd: Support DMA 2-stage transfer mode

2018-09-28 Thread Baolin Wang
automatically by hardware signal. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 98 +- include/linux/dma/sprd-dma.h | 62 -- 2 files changed, 156 insertions(+), 4 deletions(-) diff --git

[PATCH 4/7] dmaengine: sprd: Set cur_desc as NULL when free or terminate one dma channel

2018-09-28 Thread Baolin Wang
hannel to avoid this issue. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index e6a74dc..1b39661 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd

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

2018-09-28 Thread Baolin Wang
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 support for our DMA. Baolin Wang (1): dmaengine: sprd: Remove direction usage

[PATCH 1/7] dmaengine: sprd: Remove direction usage from struct dma_slave_config

2018-09-28 Thread Baolin Wang
The direction field of struct dma_slave_config was marked deprecated, thus remove the usage. Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 38d4e4f..c226dc93 100644

  1   2   3   4   5   6   7   8   9   10   >