Thread (16 messages) 16 messages, 3 authors, 2026-02-21

Re: [PATCH v5 0/3] hwmon: Add support for the LTC4283 Hot Swap Controller

From: Guenter Roeck <linux@roeck-us.net>
Date: 2026-02-21 01:17:26
Also in: linux-doc, linux-gpio, linux-hwmon

On 2/17/26 05:39, Nuno Sá wrote:
On Sat, 2026-01-17 at 16:27 -0800, Guenter Roeck wrote:
quoted
Hi Nuno,

On 12/23/25 04:21, Nuno Sá via B4 Relay wrote:
quoted
This is v3 for the LTC4283 how swap controller. Main change is that I'm
now using the auxiliary bus for adding the GPIO device (done depending
on FW properties).

Similar to the LTC4282 device, we're clearing some fault logs in the
reset_history attributes.

Guenter, in [1] you can find some replies for some questions you had in
v2 that likely you don't remember anymore. Regarding the regmap story I
ended up adding a secong regmap for the 16 bit wide registers which
seems like a clean solution (if I'm not missing nothing).
Sorry for the long delay.

Actually I prefer the solution used in the lm75 driver: Map all registers
to 16-bit registers using a regmap bus. Would that be possible ?
Hi Guenter,

I intend to send the next iteration by the end of the week (finally!) but there's something
I wanted to know if you have any strong opinion on.

So, the above is a bit annoying because of the energy reading which is 6 bytes long (so, 6 regmap
reads). Given that our custom bus will now have val_bits = 16 that won't work out of the box. So:

1. Either I directly use the i2c block API to get the 6 bytes.
2. Or I use regmap_bulk_read() with val_count of 3.

I don't like much of mixing regmap with "plain" bus calls but given it's only in one place, might
not be that bad. OTOH, to use regmap I do need to account for it (and yet another corner case) in
the read callback (so I do not use the i2c swapped version for the energy reading).

I do not have any strong opinion but I'm more tempted in going with 1.
Sorry, this got lost. I think 1 is the better choice here. This is really a messy chip :-(.

Guenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help