Linux Power Management development
 help / color / mirror / Atom feed
From: Waqar Hameed <waqar.hameed@axis.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: <kernel@axis.com>, <linux-kernel@vger.kernel.org>,
	<linux-pm@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] power: supply: Add driver for TI BQ25630 charger
Date: Mon, 22 Jun 2026 11:35:56 +0200	[thread overview]
Message-ID: <pndcxxi9atf.a.out@axis.com> (raw)
In-Reply-To: <b89846e3c581d90d1b9ac967d1b744e76244dc83.1781789320.git.waqarh@axis.com> (Waqar Hameed's message of "Thu, 18 Jun 2026 15:37:59 +0200")

On Thu, Jun 18, 2026 at 15:37 +0200 Waqar Hameed <waqar.hameed@axis.com> 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@axis.com>

[...]


  reply	other threads:[~2026-06-22  9:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 13:37 [PATCH v2 0/2] Add driver for TI BQ25630 charger Waqar Hameed
2026-06-18 13:37 ` [PATCH v2 2/2] power: supply: " Waqar Hameed
2026-06-22  9:35   ` Waqar Hameed [this message]
2026-06-18 13:37 ` [PATCH v2 1/2] dt-bindings: power: supply: Add " Waqar Hameed
2026-06-22 11:06   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pndcxxi9atf.a.out@axis.com \
    --to=waqar.hameed@axis.com \
    --cc=kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox