| From: |
| Nuno Sá via B4 Relay <devnull+nuno.sa.analog.com-AT-kernel.org> |
| To: |
| linux-gpio-AT-vger.kernel.org, linux-hwmon-AT-vger.kernel.org, devicetree-AT-vger.kernel.org, linux-doc-AT-vger.kernel.org |
| Subject: |
| [PATCH v10 0/3] hwmon: Add support for the LTC4283 Hot Swap Controller |
| Date: |
| Tue, 28 Apr 2026 17:07:25 +0100 |
| Message-ID: |
| <20260428-ltc4283-support-v10-0-4f26f46491c3@analog.com> |
| Cc: |
| Guenter Roeck <linux-AT-roeck-us.net>, Rob Herring <robh-AT-kernel.org>, Krzysztof Kozlowski <krzk+dt-AT-kernel.org>, Conor Dooley <conor+dt-AT-kernel.org>, Jonathan Corbet <corbet-AT-lwn.net>, Linus Walleij <linusw-AT-kernel.org>, Bartosz Golaszewski <brgl-AT-kernel.org>, Bartosz Golaszewski <brgl-AT-kernel.org> |
| Archive-link: |
| Article |
This is v8 for the LTC4283 how swap controller.
Similar to the LTC4282 device, we're clearing some fault logs in the
reset_history attributes.
Guenter, for my last email worrying about rsense low values, this is
what I got internally:
"10uOhm at the smallest sense voltage of 15mV would be 1500A and 72kW, which
seems a tad excessive. The highest currents I’ve seen are around 200A, and
the -48V market 4283 serves is generally a lot lower than that. Normal values
are around 200uOhm. I’d say the resolution should be around 1uohm and if a
minimum is needed, 50uOhm is probably safe."
For the resolution, I'm pretty sure I got the tenths of micro
resolution for ltc4282 so I just kept it in here. So, if you don't mind
I would prefer to keep it this way to be safer and changing that now would
require me to change some formulas and I would prefer not to do that at
this stage.
---
Changes in v10:
- Patch 2:
* Replace regmap_clear_bits() with direct regmap_write() in
ltc4283_read_alarm();
* Simplify ltc4283_read_energy() overflow handling using
mul_u64_u64_div_u64() for 128-bit intermediate precision;
* Simplify ltc4283_write_power_word() overflow handling using
mul_u64_u64_div_u64();
* Fix clamp-before-multiply overflow in ltc4283_write_minmax() by
clamping against LONG_MAX/MILLI first;
* Drop broken %*ph format from ltc4283_parse_array_prop() error
message;
* Remove unused #include <linux/overflow.h>.
- Link to v9: https://patch.msgid.link/20260406-ltc4283-support-v9-0-b6...
---
Nuno Sá (3):
dt-bindings: hwmon: Document the LTC4283 Swap Controller
hwmon: ltc4283: Add support for the LTC4283 Swap Controller
gpio: gpio-ltc4283: Add support for the LTC4283 Swap Controller
.../devicetree/bindings/hwmon/adi,ltc4283.yaml | 272 +++
Documentation/hwmon/index.rst | 1 +
Documentation/hwmon/ltc4283.rst | 266 +++
MAINTAINERS | 9 +
drivers/gpio/Kconfig | 15 +
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-ltc4283.c | 218 +++
drivers/hwmon/Kconfig | 12 +
drivers/hwmon/Makefile | 1 +
drivers/hwmon/ltc4283.c | 1795 ++++++++++++++++++++
10 files changed, 2590 insertions(+)
---
base-commit: 30a90fa04af6937493fbba20e3e923b5b5a162b4
change-id: 20260303-ltc4283-support-063f78acc5a4
--
Thanks!
- Nuno Sá