[PATCH 0/3] power: supply: ab8500: Improve code related to iio_read_channel_processed() and fix a bug

Christophe JAILLET posted 3 patches 1 year, 5 months ago
drivers/power/supply/ab8500_charger.c | 52 ++++++++++++++++-----------
1 file changed, 32 insertions(+), 20 deletions(-)
[PATCH 0/3] power: supply: ab8500: Improve code related to iio_read_channel_processed() and fix a bug
Posted by Christophe JAILLET 1 year, 5 months ago
This series is inspired by a patch submitted at [1].

While looking if the same pattern was relevant elsewhere, I ended in
ab8500_charger.c.

Patch 1 fixes what looks to me as a regression introduced by
97ab78bac5d0.

Patch 2 is the initial goal of this series. That is to change some
iio_read_channel_processed() + multiplication by a single, cleaner,
iio_read_channel_processed_scale().

Patch 3 is a cosmetic change spotted while at it.


Honestly, I don't have a strong opinion if patch 2 helps in any way
(explanation or confirmation would be appreciated for my own
knowledge), but at least patch 1 deserves a look and seems value to me.

CJ

[1]: https://lore.kernel.org/all/20240620212005.821805-1-sean.anderson@linux.dev/

Christophe JAILLET (3):
  power: supply: ab8500: Fix error handling when calling
    iio_read_channel_processed()
  power: supply: ab8500: Use iio_read_channel_processed_scale()
  power: supply: ab8500: Clean some error messages

 drivers/power/supply/ab8500_charger.c | 52 ++++++++++++++++-----------
 1 file changed, 32 insertions(+), 20 deletions(-)

-- 
2.45.2
Re: [PATCH 0/3] power: supply: ab8500: Improve code related to iio_read_channel_processed() and fix a bug
Posted by Sebastian Reichel 1 year, 5 months ago
On Sat, 22 Jun 2024 09:04:23 +0200, Christophe JAILLET wrote:
> This series is inspired by a patch submitted at [1].
> 
> While looking if the same pattern was relevant elsewhere, I ended in
> ab8500_charger.c.
> 
> Patch 1 fixes what looks to me as a regression introduced by
> 97ab78bac5d0.
> 
> [...]

Applied, thanks!

[1/3] power: supply: ab8500: Fix error handling when calling iio_read_channel_processed()
      commit: 3288757087cbb93b91019ba6b7de53a1908c9d48
[2/3] power: supply: ab8500: Use iio_read_channel_processed_scale()
      commit: dc6ce568afd3452ac682261ea0db570d28f7d82d
[3/3] power: supply: ab8500: Clean some error messages
      commit: f62b267adcac33c64a26ec55973dad92bc8a8358

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>