use the
ktime_get_seconds() to get the monotonic time without a lock,
moreover we can remove the 'struct timespec', which is not y2038
safe.
Signed-off-by: Baolin Wang
---
kernel/debug/kdb/kdb_main.c |4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel
If we convert one large time values to rtc_time, in the original formula
'days * 86400' can be overflowed in 'unsigned int' type to make the formula
get one incorrect remain seconds value. Thus we can use div_s64_rem()
function to avoid this situation.
Signed-off-by: Baolin Wa
Hi Arnd,
On 2 January 2018 at 23:36, Lee Jones wrote:
> Arnd,
>
>> Some system control registers need hardware spinlock to synchronize
>> between the multiple subsystems, so we should add hardware spinlock
>> support for syscon.
>>
>> Signed-off-by: B
The Spreadtrum SC9860 platform GPIO controller contains 16 groups and
each group contains 16 GPIOs. Each GPIO can set input/output and has
the interrupt capability.
Signed-off-by: Baolin Wang
---
drivers/gpio/Kconfig |7 ++
drivers/gpio/Makefile|1 +
drivers/gpio/gpio-sprd.c
This patch adds the device tree bindings for the Spreadtrum
GPIO controller. The gpios will be supported by the GPIO
generic library.
Signed-off-by: Baolin Wang
---
.../devicetree/bindings/gpio/gpio-sprd.txt | 28
1 file changed, 28 insertions(+)
create mode
Hi Andy,
On 31 January 2018 at 00:48, Andy Shevchenko wrote:
> On Tue, Jan 30, 2018 at 2:07 PM, Baolin Wang wrote:
>> The Spreadtrum SC9860 platform GPIO controller contains 16 groups and
>> each group contains 16 GPIOs. Each GPIO can set input/output and has
>> the
The Spreadtrum SC9860 platform GPIO controller contains 16 groups and
each group contains 16 GPIOs. Each GPIO can set input/output and has
the interrupt capability.
Signed-off-by: Baolin Wang
Reviewed-by: Andy Shevchenko
---
Changes since v1:
- Change 'bool' to 'tristate'.
This patch adds the device tree bindings for the Spreadtrum
GPIO controller. The gpios will be supported by the GPIO
generic library.
Signed-off-by: Baolin Wang
---
Changes since v1:
- No updates.
---
.../devicetree/bindings/gpio/gpio-sprd.txt | 28
1 file
On 31 January 2018 at 22:23, Andy Shevchenko wrote:
> On Wed, Jan 31, 2018 at 4:01 AM, Baolin Wang wrote:
>> On 31 January 2018 at 00:48, Andy Shevchenko
>> wrote:
>>> On Tue, Jan 30, 2018 at 2:07 PM, Baolin Wang wrote:
>>>> The Spreadtrum SC9860 platfor
Hi Markus,
On 1 February 2018 at 20:17, Marcus Folkesson
wrote:
> Hi Baolin,
>
> On Tue, Jan 30, 2018 at 08:07:43PM +0800, Baolin Wang wrote:
>> The Spreadtrum SC9860 platform GPIO controller contains 16 groups and
>> each group contains 16 GPIOs. Each GPIO can set input/
On 1 February 2018 at 20:22, Marcus Folkesson
wrote:
> On Thu, Feb 01, 2018 at 11:08:46AM +0800, Baolin Wang wrote:
>> On 31 January 2018 at 22:23, Andy Shevchenko
>> wrote:
>> > On Wed, Jan 31, 2018 at 4:01 AM, Baolin Wang
>> > wrote:
>> >>
Hi Lee,
On 22 January 2018 at 21:43, Lee Jones wrote:
> On Thu, 11 Jan 2018, Lee Jones wrote:
>> On Mon, 25 Dec 2017, Baolin Wang wrote:
>>
>> > Some system control registers need hardware spinlock to synchronize
>> > between the multiple subsystems, s
Hi Alexandre,
On 25 December 2017 at 19:10, Baolin Wang wrote:
> If we convert one large time values to rtc_time, in the original formula
> 'days * 86400' can be overflowed in 'unsigned int' type to make the formula
> get one incorrect remain seconds value
We need use rtc->range_max to valid if the time values are valid,
and the time values are saved by time64_t type. So change the
rtc->range_max to time64_t type for comparison correctly.
Signed-off-by: Baolin Wang
---
include/linux/rtc.h |2 +-
1 file changed, 1 insertion(+), 1 de
RTC hardware could get interpreted
as times from 2070 to 2099, but the interpretation of dates between 2000 and
2069 would not change.
Signed-off-by: Baolin Wang
---
drivers/rtc/class.c | 70 +++
drivers/rtc/interface.c |
The RTC range validation code can be factored into rtc_valid_range()
function to avoid duplicate code.
Signed-off-by: Baolin Wang
---
drivers/rtc/interface.c | 30 ++
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/rtc/interface.c b/drivers
On 26 January 2018 at 22:00, Daniel Thompson wrote:
> On Fri, Jan 26, 2018 at 10:21:58AM +0100, Arnd Bergmann wrote:
>> On Fri, Jan 26, 2018 at 4:03 AM, Baolin Wang wrote:
>> > The kdb code will print the monotonic time by ktime_get_ts(), but
>> > the ktime_get_
On 27 January 2018 at 00:01, Arnd Bergmann wrote:
> On Fri, Jan 26, 2018 at 3:20 PM, Baolin Wang wrote:
>> On 26 January 2018 at 22:00, Daniel Thompson
>> wrote:
>>> On Fri, Jan 26, 2018 at 10:21:58AM +0100, Arnd Bergmann wrote:
>>>> On Fri, Jan 26, 2018
monotonic
time, which is NMI safe access to clock monotonic. Moreover we can
remove the 'struct timespec', which is not y2038 safe.
Signed-off-by: Baolin Wang
---
Changes since v1:
- Use ktime_get_mono_fast_ns() instead of ktime_get_seconds().
---
kernel/debug/kdb/kdb_main.c |6
Hi Sebastian,
On 15 January 2018 at 15:58, Baolin Wang wrote:
> On Spreadtrum platform, we need power off system through external SC27xx
> series PMICs including the SC2720, SC2721, SC2723, SC2730 and SC2731 chips.
> Thus this patch adds SC27xx series PMICs power-off support.
>
>
Some platforms will not set the override clocksource name to select, so we
can skip to check the override clocksource when selecting one clocksource.
Signed-off-by: Baolin Wang
---
kernel/time/clocksource.c |4
1 file changed, 4 insertions(+)
diff --git a/kernel/time/clocksource.c b
Convert DEVICE_ATTR to DEVICE_ATTR_RW/RO/WO to make attributes'
definition more clear.
Signed-off-by: Baolin Wang
---
kernel/time/clocksource.c | 43 +--
1 file changed, 17 insertions(+), 26 deletions(-)
diff --git a/kernel/time/clocksource.c b/k
Convert to use ATTRIBUTE_GROUPS to define one attribute group pointed by
'groups' of the device, which can avoid issuing device_create_file() many
times.
Signed-off-by: Baolin Wang
---
kernel/time/clocksource.c | 21 ++---
1 file changed, 10 insertions(+), 11
On Spreadtrum SC9860 platform, we need one persistent timer to calculate
the suspend time to compensate the OS time.
This patch registers one Spreadtrum AON timer as persistent timer, which
runs at 32bit and periodic mode.
Signed-off-by: Baolin Wang
---
drivers/clocksource/Kconfig |1
for timer drivers to register one persistent timer and implements the
read_persistent_clock64() to compensate the OS time.
Signed-off-by: Baolin Wang
---
drivers/clocksource/Kconfig|3 +
drivers/clocksource/Makefile |1 +
drivers/clocksource/persistent-timer.c | 142
On 9 January 2018 at 19:16, Arnd Bergmann wrote:
> On Tue, Jan 9, 2018 at 10:09 AM, Baolin Wang wrote:
>> On some platforms (such as Spreadtrum sc9860 platform), they need one
>> persistent timer to calculate the suspended time and compensate it
>> for the OS time.
>&
On Spreadtrum platform, we need power off system through external SC27xx
series PMICs including the SC2720, SC2721, SC2723, SC2730 and SC2731 chips.
Thus this patch adds SC27xx series PMICs power-off support.
Signed-off-by: Baolin Wang
---
drivers/power/reset/Kconfig |9
On 5 March 2018 at 23:46, Andy Shevchenko wrote:
> On Mon, Mar 5, 2018 at 4:56 AM, Baolin Wang wrote:
>> The Spreadtrum PMIC EIC controller contains only one bank of debounce EIC,
>> and this bank contains 16 EICs. Each EIC can only be used as input mode,
>> as well as su
We have different hwspinlock modes to select, thus it will be more
readable to handle different modes with using 'switch' statement
instead of 'if' statement.
Signed-off-by: Baolin Wang
---
drivers/hwspinlock/hwspinlock_core.c | 33 -
should force user to protect the hardware lock with mutex or spinlock to
avoid dead-lock.
Signed-off-by: Baolin Wang
---
drivers/hwspinlock/hwspinlock_core.c | 34
include/linux/hwspinlock.h | 58 ++
2 files changed, 85 insertions
Hi Vinod,
On 11 April 2018 at 17:24, Vinod Koul wrote:
> On Tue, Apr 10, 2018 at 03:46:03PM +0800, Baolin Wang wrote:
>> From: Eric Long
>>
>> Define the DMA transfer step type to make code more readable.
>>
>> Signed-off-by: Eric Long
>> Signed-off-by: B
Hi Vinod,
On 11 April 2018 at 17:40, Vinod Koul wrote:
> On Tue, Apr 10, 2018 at 03:46:07PM +0800, Baolin Wang wrote:
>> This patch adds the 'device_config' and 'device_prep_slave_sg' interfaces
>> for users to configure DMA.
>>
>> Signed-off-by:
Hi Vinod,
On 11 April 2018 at 17:36, Vinod Koul wrote:
> On Tue, Apr 10, 2018 at 03:46:06PM +0800, Baolin Wang wrote:
>
>> +/*
>> + * struct sprd_dma_config - DMA configuration structure
>> + * @config: dma slave channel config
>> + * @fragment_len: specif
Hi Vinod,
On 12 April 2018 at 17:37, Vinod Koul wrote:
> On Wed, Apr 11, 2018 at 08:13:28PM +0800, Baolin Wang wrote:
>> Hi Vinod,
>>
>> On 11 April 2018 at 17:36, Vinod Koul wrote:
>> > On Tue, Apr 10, 2018 at 03:46:06PM +0800, Baolin Wang wrote:
>> >
>
On 12 April 2018 at 19:30, Baolin Wang wrote:
> Hi Vinod,
>
> On 12 April 2018 at 17:37, Vinod Koul wrote:
>> On Wed, Apr 11, 2018 at 08:13:28PM +0800, Baolin Wang wrote:
>>> Hi Vinod,
>>>
>>> On 11 April 2018 at 17:36, Vinod Koul wrote:
>>>
s obsolete interface.
Signed-off-by: Baolin Wang
---
include/linux/timekeeping32.h |3 ---
kernel/time/timekeeping.c |7 ---
2 files changed, 10 deletions(-)
diff --git a/include/linux/timekeeping32.h b/include/linux/timekeeping32.h
index af4114d..3616b4b 100644
--- a/include/l
On 13 April 2018 at 11:39, Vinod Koul wrote:
> On Thu, Apr 12, 2018 at 07:30:01PM +0800, Baolin Wang wrote:
>
>> >> > what does block and transaction len refer to here
>> >>
>> >> Our DMA has 3 transfer mode: transaction transfer, block transfer
On 13 April 2018 at 11:43, Vinod Koul wrote:
> On Thu, Apr 12, 2018 at 07:36:34PM +0800, Baolin Wang wrote:
>> >>> >> +/*
>> >>> >> + * struct sprd_dma_config - DMA configuration structure
>> >>> >> + * @config: dma slave channel
On 13 April 2018 at 14:36, Vinod Koul wrote:
> On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote:
>
>> > Agreed, users only care about grabbing a channel, setting a descriptor and
>> > submitting that.
>> >
>> > I think you need to go back and
On 13 April 2018 at 18:11, Vinod Koul wrote:
> On Fri, Apr 13, 2018 at 02:41:48PM +0800, Baolin Wang wrote:
>> On 13 April 2018 at 14:36, Vinod Koul wrote:
>> > On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote:
>> >
>> >> > Agreed, users onl
.
Signed-off-by: Baolin Wang
---
drivers/spi/spi-sprd-adi.c | 112
1 file changed, 112 insertions(+)
diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c
index b89b09d..6fc50cf 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi
We can move the hardware spinlock protection into the ADI read/write
functions to simplify the sprd_adi_transfer_one() function. Moreover
this optimization can also help to access PMIC without considering
the hardware spinlock using sprd_adi_read/write() functions.
Signed-off-by: Baolin Wang
We can register one notifier through register_reboot_notifier() function to
prepare to power off the system, then we can remove the 'pm_power_off_prepare'
hook in following patch.
Signed-off-by: Baolin Wang
---
Note: Please help to review carefully, since I have no platform to
There are no users will prepare to power off system by 'pm_power_off_prepare'
hook, thus we can remove it now.
Signed-off-by: Baolin Wang
---
include/linux/pm.h |1 -
kernel/reboot.c|8
2 files changed, 9 deletions(-)
diff --git a/include/linux/pm.h b/include/
Hi Pavel,
On 21 March 2018 at 22:04, Pavel Machek wrote:
> On Wed 2018-03-21 19:30:16, Baolin Wang wrote:
>> We can register one notifier through register_reboot_notifier() function to
>> prepare to power off the system, then we can remove the
>> 'pm_power_off_pre
There are some global registers in Spreadtrum sc27xx PMICs, which will
be accessed by other drivers. So this patch adds one syscon cell to
help to access the PMIC's global registers.
Signed-off-by: Baolin Wang
---
drivers/mfd/sprd-sc27xx-spi.c |3 +++
1 file changed, 3 insertions(+)
We found the I2C controller count register is unreliable sometimes,
that will cause I2C to lose data. Thus we can read the data count
from 'i2c_dev->count' instead of the I2C controller count register.
Signed-off-by: Baolin Wang
---
drivers/i2c/busses/i2c-sprd.c |6 ++
1 fi
Add one flag to indicate if the i2c controller has been in suspend state,
which can prevent i2c accesses after i2c controller is suspended following
system suspend.
Signed-off-by: Baolin Wang
---
drivers/i2c/busses/i2c-sprd.c | 16
1 file changed, 16 insertions(+)
diff --git
This patch adds the 'device_config' and 'device_prep_slave_sg' interfaces
for users to configure DMA.
Signed-off-by: Baolin Wang
---
drivers/dma/sprd-dma.c | 48
1 file changed, 48 insertions(+)
diff --git a/drivers/dma/
From: Eric Long
Define the DMA transfer step type to make code more readable.
Signed-off-by: Eric Long
Signed-off-by: Baolin Wang
---
drivers/dma/sprd-dma.c | 28 ++--
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/sprd-dma.c b/drivers
s.
Signed-off-by: Eric Long
Signed-off-by: Baolin Wang
---
drivers/dma/sprd-dma.c | 262 ++
include/linux/dma/sprd-dma.h | 25
2 files changed, 238 insertions(+), 49 deletions(-)
diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
ind
Define the DMA data width type to make code more readable.
Signed-off-by: Baolin Wang
---
drivers/dma/sprd-dma.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index af9c156..9f44d6f 100644
--- a/drivers/dma
From: Eric Long
This patch will move the Spreadtrum DMA request mode and interrupt type
into one head file for user to configure. And other special SPRD DMA
configurations will be added in the following patches.
Signed-off-by: Eric Long
Signed-off-by: Baolin Wang
---
drivers/dma/sprd-dma.c
Hi Grygorii,
On 10 April 2018 at 04:56, Grygorii Strashko wrote:
>
>
> On 04/09/2018 01:40 AM, Baolin Wang wrote:
>> Add one flag to indicate if the i2c controller has been in suspend state,
>> which can prevent i2c accesses after i2c controller is suspended following
>&g
Hi Alexandre,
On 8 March 2018 at 06:54, Alexandre Belloni
wrote:
> Hi,
>
> On 26/02/2018 at 16:33:56 +0800, Baolin Wang wrote:
>> We need use rtc->range_max to valid if the time values are valid,
>> and the time values are saved by time64_t type. So change the
>> r
; referenced in section `.data' of drivers/spi/spi-sprd.o:
> defined in discarded section `.exit.text' of drivers/spi/spi-sprd.o
>
> Fixes: e7d973a31c24 ("spi: sprd: Add SPI driver for Spreadtrum SC9860")
> Signed-off-by: Arnd Bergmann
Thanks Arnd.
Acked-by:
On 26 September 2018 at 20:45, Sebastian Reichel wrote:
> Hi,
>
> On Wed, Sep 26, 2018 at 04:30:39PM +0800, Baolin Wang wrote:
>> Hi Linus,
>>
>> On 26 September 2018 at 16:00, Linus Walleij
>> wrote:
>> > On Wed, Sep 26, 2018 at 4:59 AM Baolin Wang w
On 26 September 2018 at 21:51, Sebastian Reichel wrote:
> Hi,
>
> On Wed, Sep 26, 2018 at 10:59:12AM +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
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 v12:
- None.
Changes from v11:
- None.
Changes from v10:
- Add duration alignment functio
can write '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 v12:
- Add gradual dimming
On 26 September 2018 at 23:30, Sebastian Reichel wrote:
> Hi,
>
> On Wed, Sep 26, 2018 at 10:59:14AM +0800, Baolin Wang wrote:
>> This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support,
>> which is used to calculate the battery capacity.
>>
>> Ori
factory internal resistance for battery information.
Signed-off-by: Baolin Wang
---
Changes from v2:
- Rename the property.
- Improve the commit message.
Changes from v1:
- New patch in v2.
---
.../devicetree/bindings/power/supply/battery.txt |2 ++
drivers/power/supply
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 v2:
- Use core helper functions to look up OCV capacity table.
- Use
some
helper functions to use the OCV capacity table for users.
Suggested-by: Sebastian Reichel
Signed-off-by: Baolin Wang
Reviewed-by: Linus Walleij
---
Changes from v2:
- Use type __be32 to calculate the table length.
- Update error messages.
- Add some helper functions.
Changes from v1
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
---
Changes from v2:
- Add reviewed tag from Linus.
Changes from v1:
- Renamed GPIO
evice.
Signed-off-by: Baolin Wang
---
drivers/pinctrl/sprd/pinctrl-sprd.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c
b/drivers/pinctrl/sprd/pinctrl-sprd.c
index 78c2f54..4537b54 100644
--- a/drivers/pinctrl/sprd/pi
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
-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
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
nel 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
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
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
--- a
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
ransaction 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(-)
di
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
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
> >
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
&
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(-)
&
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
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
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
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
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
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
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
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
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
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
_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/
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
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
.
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
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
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
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
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
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
.
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
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:
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
201 - 300 of 2198 matches
Mail list logo