linux-stable/drivers/power
Sebastian Reichel 05e0430971 power: supply: sbs-battery: use i2c_smbus_read_block_data()
The SBS battery implements SMBus block reads. Currently the
driver "emulates" this by doing an I2C byte read for the
length followed by an I2C block read. The I2C subsystem
actually provides a proper API for doing SMBus block reads,
which can and should be used instead. The current implementation
does not properly handle packet error checking (PEC).

Not all upstream systems using sbs-battery have I2C bus drivers
supporting I2C_M_RECV_LEN, so old implementation is kept as
fallback to keep things working. But this prints a warning,
which hopefully results in people implementing support for it.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-06-19 18:38:39 +02:00
..
avs power: avs: qcom-cpr: Avoid clang -Wsometimes-uninitialized in cpr_scale 2020-01-31 11:07:43 +01:00
reset power supply and reset changes for the v5.8 series 2020-06-10 11:28:35 -07:00
supply power: supply: sbs-battery: use i2c_smbus_read_block_data() 2020-06-19 18:38:39 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00