From: Jonathan Cormier <jcormier@criticallink.com>
To: Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Bob Duke <bduke@criticallink.com>,
John Pruitt <jpruitt@criticallink.com>,
Jonathan Cormier <jcormier@criticallink.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v4 0/5] hwmon: ltc2945: Add binding and shunt resistor support
Date: Thu, 26 Jan 2023 17:32:22 -0500 [thread overview]
Message-ID: <20230126-b4-ltc2945_shunt_resistor-v4-0-bb913470d8da@criticallink.com> (raw)
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>
next reply other threads:[~2023-01-26 22:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 22:32 Jonathan Cormier [this message]
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
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=20230126-b4-ltc2945_shunt_resistor-v4-0-bb913470d8da@criticallink.com \
--to=jcormier@criticallink.com \
--cc=bduke@criticallink.com \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=jpruitt@criticallink.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.