linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] hwmon: ltc2945: Add binding and shunt resistor support
@ 2023-01-26 22:32 Jonathan Cormier
  2023-01-26 22:32 ` [PATCH v4 1/5] dt-bindings: hwmon: adi,ltc2945: Add binding Jonathan Cormier
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Jonathan Cormier @ 2023-01-26 22:32 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski
  Cc: linux-hwmon, devicetree, linux-kernel, Bob Duke, John Pruitt,
	Jonathan Cormier, Krzysztof Kozlowski

Added the ability to specify the value of the shunt resistor in the
device tree instead of assuming it is 1 milliOhm.

Would be good to backport as well

Changes since v3:
- Remove shunt-resistor-micro-ohms in binding commit message
- Simplify ltc2945_value_store fix
- Validate overflow
- ltc2945_value_store accept only 32-bit uint from user to avoid overflow
- Link to v3: https://lore.kernel.org/r/20230109233534.1932370-1-jcormier@criticallink.com
Changes since v2:
- Remove newline
- Combined overflow fix with "Allow setting shunt resistor" commit
- Add description to "Add devicetree match table"
- Add fix for unhandled error case in ltc2945_value_store
- Use imperative in descriptions
- Remove unneeded overflow check from ltc2945_reg_to_val
- Fix up DIV_ROUND_CLOSEST_ULL calls, per docs divisor should be 32-bit
- Split one DIV_ROUND_CLOSEST_ULL change into separate commit per
 Guenter Roeck's comment
Changes since v1:
- Add devicetree match table
- Add kerneldoc for the ltc2945_data struct
- Cleanup excesive comments about the shunt resistor
- Switch to device_property_read_u32()

Signed-off-by: Jonathan Cormier <jcormier@criticallink.com>
---
John Pruitt (1):
      hwmon: ltc2945: Allow setting shunt resistor

Jonathan Cormier (4):
      dt-bindings: hwmon: adi,ltc2945: Add binding
      hwmon: ltc2945: Add devicetree match table
      hwmon: ltc2945: Handle error case in ltc2945_value_store
      hwmon: ltc2945: Convert division to DIV_ROUND_CLOSEST_ULL

 .../devicetree/bindings/hwmon/adi,ltc2945.yaml     |  49 ++++++++
 drivers/hwmon/ltc2945.c                            | 132 ++++++++++++++-------
 2 files changed, 136 insertions(+), 45 deletions(-)
---
base-commit: 93f875a8526a291005e7f38478079526c843cbec
change-id: 20230126-b4-ltc2945_shunt_resistor-f64955044365

Best regards,
-- 
Jonathan Cormier <jcormier@criticallink.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-30 15:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26 22:32 [PATCH v4 0/5] hwmon: ltc2945: Add binding and shunt resistor support Jonathan Cormier
2023-01-26 22:32 ` [PATCH v4 1/5] dt-bindings: hwmon: adi,ltc2945: Add binding Jonathan Cormier
2023-01-29 20:16   ` Guenter Roeck
2023-01-30 15:19     ` Jon Cormier
2023-01-30 15:25       ` Jon Cormier
2023-01-26 22:32 ` [PATCH v4 2/5] hwmon: ltc2945: Add devicetree match table Jonathan Cormier
2023-01-26 22:32 ` [PATCH v4 3/5] hwmon: ltc2945: Handle error case in ltc2945_value_store Jonathan Cormier
2023-01-26 22:32 ` [PATCH v4 4/5] hwmon: ltc2945: Allow setting shunt resistor Jonathan Cormier
2023-01-26 22:32 ` [PATCH v4 5/5] hwmon: ltc2945: Convert division to DIV_ROUND_CLOSEST_ULL Jonathan Cormier
2023-01-29 19:55   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).