lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230126-b4-ltc2945_shunt_resistor-v4-0-bb913470d8da@criticallink.com>
Date:   Thu, 26 Jan 2023 17:32:22 -0500
From:   Jonathan Cormier <jcormier@...ticallink.com>
To:     Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Cc:     linux-hwmon@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, Bob Duke <bduke@...ticallink.com>,
        John Pruitt <jpruitt@...ticallink.com>,
        Jonathan Cormier <jcormier@...ticallink.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: [PATCH v4 0/5] hwmon: ltc2945: Add binding and shunt resistor
 support

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@...ticallink.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@...ticallink.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ