diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-08-01 15:31:00 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2021-08-05 18:54:52 +0200 |
commit | f17bda7f655fa5ede982a487b8f6d732bbe1959a (patch) | |
tree | 19fc35ec602391eb6b5c70798d0461d4ae8c3c1a /drivers/dca | |
parent | caa534c3ba40c6e8352b42cbbbca9ba481814ac8 (diff) | |
download | linux-next-f17bda7f655fa5ede982a487b8f6d732bbe1959a.tar.gz |
power: supply: axp288_fuel_gauge: Drop retry logic from fuel_gauge_reg_readb()
The I2C-bus to the XPower AXP288 is shared between the Linux kernel and
the SoCs P-Unit. The P-Unit has a semaphore which the kernel must "lock"
before it may use the bus. This semaphore is automatically taken by the
I2C-bus-driver.
The retry on -EBUSY logic in fuel_gauge_reg_readb() likely was added to
deal with the I2C-bus-drive returning -EBUSY when it failed to take the
semaphore, but this really should never happen. The semaphore code even
has a WARN_ON(ret) to log a kernel backtrace if this does somehow happen,
when this happens something is seriously wrong and the system typically
freezes soon afterwards.
TL;DR: the regmap_read() should never fail with -EBUSY so the retries
are unnecessary.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/dca')
0 files changed, 0 insertions, 0 deletions