Re: [PATCH v2 2/2] power: supply: Add driver for TI BQ25630 charger

From: Waqar Hameed

Date: Mon Jun 22 2026 - 05:36:10 EST


On Thu, Jun 18, 2026 at 15:37 +0200 Waqar Hameed <waqar.hameed@xxxxxxxx> wrote:

> TI BQ25630 is a battery charger that is I2C controlled. Despite its
> model name, it is rather different from the other devices in the BQ256xx
> family; it has a completely different register layout and some other
> additional functionality (see the datasheet for more details [1]).
>
> The most "annoying" thing is that it has two different register lengths:
> 8-bit and 16-bit. Moreover, the 16-bit registers are further partitioned
> into either being little- or big-endian... Luckily, `regmap` has support
> for multiple `regmap_config`s (by setting unique names). Therefore, use
> three different `regmap_config`s for the corresponding registers. ADC
> functionality has been left out, due to it not having any real-world
> use-cases.
>
> The `enum power_supply_property` values are straightforward to map. Some
> properties are clamped (e.g. voltage/current ranges). Common
> `bq25630_read/write_limit()` functions for this are therefore suitable.
>
> Interrupts are sent whenever a state change is detected. Save the state
> status registers in `bq25630_data` and `memcmp()` this in order to
> decide if `power_supply_changed()` should be called or not. The actual
> state values are in (and fetched from) the other
> `power_supply_property`-mapped registers.
>
> [1] https://www.ti.com/lit/gpn/bq25630
>
> Change-Id: I286c7a2f279cc28375a0c611a490fe7c8f77c08a

Please strip this unnecessary footer...

> Signed-off-by: Waqar Hameed <waqar.hameed@xxxxxxxx>

[...]