2020-06-05 23:10:40

by Sebastian Reichel

[permalink] [raw]
Subject: [PATCHv2 0/2] SBS battery PEC support

Hi,

Second try to enable PEC for SBS battery. Mainline currently
has 3 different platforms using sbs-battery with an I2C driver
not implementing I2C_M_RECV_LEN:

* i2c-exynos5
* i2c-rk3x
* i2c-tegra

On those platforms PEC will be temporarly disabled for SBS
functions requesting strings. I considered moving the emulation
to I2C core, but it's specific to the SBS battery. The hack
only works because the strings are constant.

Changes since PATCHv1:
* dropped all applied changes
* rebased on top of power-supply's for-next branch
* keep existing string reading method as fallback

-- Sebastian

Sebastian Reichel (2):
power: supply: sbs-battery: use i2c_smbus_read_block_data()
power: supply: sbs-battery: add PEC support"

drivers/power/supply/sbs-battery.c | 89 +++++++++++++++++++++++++++++-
1 file changed, 87 insertions(+), 2 deletions(-)

--
2.26.2


2020-06-08 06:25:19

by Marek Szyprowski

[permalink] [raw]
Subject: Re: [PATCHv2 0/2] SBS battery PEC support

Hi Sebastian,

On 06.06.2020 01:06, Sebastian Reichel wrote:
> Second try to enable PEC for SBS battery. Mainline currently
> has 3 different platforms using sbs-battery with an I2C driver
> not implementing I2C_M_RECV_LEN:
>
> * i2c-exynos5
> * i2c-rk3x
> * i2c-tegra
>
> On those platforms PEC will be temporarly disabled for SBS
> functions requesting strings. I considered moving the emulation
> to I2C core, but it's specific to the SBS battery. The hack
> only works because the strings are constant.

Thanks for the update. Works fine on Samsung Exynos-based Chromebooks:
Snow, Peach-Pit and Peach-Pi.

Tested-by: Marek Szyprowski <[email protected]>

> Changes since PATCHv1:
> * dropped all applied changes
> * rebased on top of power-supply's for-next branch
> * keep existing string reading method as fallback
>
> -- Sebastian
>
> Sebastian Reichel (2):
> power: supply: sbs-battery: use i2c_smbus_read_block_data()
> power: supply: sbs-battery: add PEC support"
>
> drivers/power/supply/sbs-battery.c | 89 +++++++++++++++++++++++++++++-
> 1 file changed, 87 insertions(+), 2 deletions(-)
>
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland

2020-06-19 16:45:55

by Sebastian Reichel

[permalink] [raw]
Subject: Re: [PATCHv2 0/2] SBS battery PEC support

Hi,

On Mon, Jun 08, 2020 at 08:23:05AM +0200, Marek Szyprowski wrote:
> Hi Sebastian,
>
> On 06.06.2020 01:06, Sebastian Reichel wrote:
> > Second try to enable PEC for SBS battery. Mainline currently
> > has 3 different platforms using sbs-battery with an I2C driver
> > not implementing I2C_M_RECV_LEN:
> >
> > * i2c-exynos5
> > * i2c-rk3x
> > * i2c-tegra
> >
> > On those platforms PEC will be temporarly disabled for SBS
> > functions requesting strings. I considered moving the emulation
> > to I2C core, but it's specific to the SBS battery. The hack
> > only works because the strings are constant.
>
> Thanks for the update. Works fine on Samsung Exynos-based Chromebooks:
> Snow, Peach-Pit and Peach-Pi.
>
> Tested-by: Marek Szyprowski <[email protected]>

Thanks, queued.

-- Sebastian

> > Changes since PATCHv1:
> > * dropped all applied changes
> > * rebased on top of power-supply's for-next branch
> > * keep existing string reading method as fallback
> >
> > -- Sebastian
> >
> > Sebastian Reichel (2):
> > power: supply: sbs-battery: use i2c_smbus_read_block_data()
> > power: supply: sbs-battery: add PEC support"
> >
> > drivers/power/supply/sbs-battery.c | 89 +++++++++++++++++++++++++++++-
> > 1 file changed, 87 insertions(+), 2 deletions(-)


Attachments:
(No filename) (1.31 kB)
signature.asc (849.00 B)
Download all attachments