Skip to contentSkip to conversation

LTC4286 and LTC4287 driver support

PATCH Superseded Delphine CC Chiu 3 participants 8 messages Nov 8, 2023 – Dec 12, 2023

Subsystems (4)

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH v4 1/2 dt-bindings: hwmon: Add lltc ltc4286 driver bindings

In reply to Delphine CC Chiu

Add a device tree bindings for ltc4286 device.

Changelog:
v4 - Revise some inappropriate writing in yaml file v3 - Revise adi,vrange-select-25p6 to adi,vrange-low-enable v2 - Revise vrange_select_25p6 to adi,vrange-select-25p6
- Add type for adi,vrange-select-25p6
- Revise rsense-micro-ohms to shunt-resistor-micro-ohms

---
 .../bindings/hwmon/lltc,ltc4286.yaml          | 51 +++++++++++++++++++
 MAINTAINERS                                   | 10 ++++
 2 files changed, 61 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml new file +51 -0
new file mode 100644
index 000000000000..d26f34fb7ea7
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/lltc,ltc4286.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LTC4286 power monitors
+
+maintainers:
+  - Delphine CC Chiu <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - lltc,ltc4286
+      - lltc,ltc4287
+
+  reg:
+    maxItems: 1
+
+  adi,vrange-low-enable:
+    description:
+      This property is a bool parameter to represent the
+      voltage range is 25.6 volts or 102.4 volts for this chip.
+      The default is 102.4 volts.
+    type: boolean
+
+  shunt-resistor-micro-ohms:
+    description:
+      Resistor value micro-ohms.
+
+required:
+  - compatible
+  - reg
+  - shunt-resistor-micro-ohms
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        power-monitor@40 {
+            compatible = "lltc,ltc4286";
+            reg = <0x40>;
+            adi,vrange-low-enable;
+            shunt-resistor-micro-ohms = <300>;
+        };
+    };
MAINTAINERS +10 -0
index d9ba580fd4ba..e46a6e43ff64 100644
@@ -12363,6 +12363,16 @@ S:	Maintained
 F:	Documentation/hwmon/ltc4261.rst
 F:	drivers/hwmon/ltc4261.c
 
+LTC4286 HARDWARE MONITOR DRIVER
+M:	Delphine CC Chiu <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
+F:	Documentation/devicetree/bindings/hwmon/ltc4286.rst
+F:	drivers/hwmon/pmbus/Kconfig
+F:	drivers/hwmon/pmbus/Makefile
+F:	drivers/hwmon/pmbus/ltc4286.c
+
 LTC4306 I2C MULTIPLEXER DRIVER
 M:	Michael Hennerich <[email protected]>
 L:	[email protected]
Signature · 1 line
2.25.1

Delphine CC Chiu

author maintainer
#0 lore raw

v4 cover LTC4286 and LTC4287 driver support

v4 - Add LTC4286 and LTC4287 binding document
- Add LTC4286 and LTC4287 driver

Delphine CC Chiu (2):
dt-bindings: hwmon: Add lltc ltc4286 driver bindings
hwmon: pmbus: Add ltc4286 driver

 .../bindings/hwmon/lltc,ltc4286.yaml          |  51 +++++
 Documentation/hwmon/index.rst                 |   1 +
 Documentation/hwmon/ltc4286.rst               |  95 ++++++++++
 MAINTAINERS                                   |  10 +
 drivers/hwmon/pmbus/Kconfig                   |  10 +
 drivers/hwmon/pmbus/Makefile                  |   1 +
 drivers/hwmon/pmbus/ltc4286.c                 | 177 ++++++++++++++++++
 7 files changed, 345 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
 create mode 100644 Documentation/hwmon/ltc4286.rst
 create mode 100644 drivers/hwmon/pmbus/ltc4286.c
Signature · 1 line
2.25.1
author maintainer
#2 lore raw

PATCH v4 2/2 hwmon: pmbus: Add ltc4286 driver

Add a driver to support ltc4286 chip

Changelog:
v4 - Add empty line before "config SENSORS_LTC4286" in Kconfig
- Add ltc4286 to Documentation/hwmon/index.rst
- Revise comment typo
- Use devm_kmemdup instead of memcpy
- Check MBR value before writting into
v3 - Use dev_err_probe() instead of dev_err()
- The VRANGE_SELECT bit only be written if it actually changed
- Avoid the info pointer being overwritten
- Check the MBR value range to avoid overflow
- Revise ltc4286.rst to corrcet description
v2 - Revise Linear Technologies LTC4286 to
Analog Devices LTC4286 in Kconfig
- Add more description for this driver in Kconfig
- Add some comments for MBR setting in ltc4286.c
- Add ltc4286.rst

---
 Documentation/hwmon/index.rst   |   1 +
 Documentation/hwmon/ltc4286.rst |  95 +++++++++++++++++
 drivers/hwmon/pmbus/Kconfig     |  10 ++
 drivers/hwmon/pmbus/Makefile    |   1 +
 drivers/hwmon/pmbus/ltc4286.c   | 177 ++++++++++++++++++++++++++++++++
 5 files changed, 284 insertions(+)
 create mode 100644 Documentation/hwmon/ltc4286.rst
 create mode 100644 drivers/hwmon/pmbus/ltc4286.c
Documentation/hwmon/index.rst +1 -0
index 75b869ff6c53..40d817f7c215 100644
@@ -127,6 +127,7 @@ Hardware Monitoring Kernel Drivers
    ltc4245
    ltc4260
    ltc4261
+   ltc4286
    max127
    max15301
    max16064
Documentation/hwmon/ltc4286.rst new file +95 -0

95 lines not on this page · raw message

drivers/hwmon/pmbus/Kconfig +10 -0
index 4e3776702d7f..6036603f5fba 100644
@@ -227,6 +227,16 @@ config SENSORS_LTC3815
 	  This driver can also be built as a module. If so, the module will
 	  be called ltc3815.
 
+config SENSORS_LTC4286
+	bool "Analog Devices LTC4286"
+	help
+	  LTC4286 is an integrated solution for hot swap applications that
+	  allows a board to be safely inserted and removed from a live
+	  backplane.
+	  This chip could be used to monitor voltage, current, ...etc.
+	  If you say yes here you get hardware monitoring support for Analog
+	  Devices LTC4286.
+
 config SENSORS_MAX15301
 	tristate "Maxim MAX15301"
 	help
drivers/hwmon/pmbus/Makefile +1 -0
index 51d54f444cec..c9d83be099fe 100644
@@ -24,6 +24,7 @@ obj-$(CONFIG_SENSORS_LM25066)	+= lm25066.o
 obj-$(CONFIG_SENSORS_LT7182S)	+= lt7182s.o
 obj-$(CONFIG_SENSORS_LTC2978)	+= ltc2978.o
 obj-$(CONFIG_SENSORS_LTC3815)	+= ltc3815.o
+obj-$(CONFIG_SENSORS_LTC4286)	+= ltc4286.o
 obj-$(CONFIG_SENSORS_MAX15301)	+= max15301.o
 obj-$(CONFIG_SENSORS_MAX16064)	+= max16064.o
 obj-$(CONFIG_SENSORS_MAX16601)	+= max16601.o
drivers/hwmon/pmbus/ltc4286.c new file +177 -0

177 lines not on this page · raw message

Signature · 1 line
2.25.1
#3 lore raw
In reply to Delphine CC Chiu
Quoted 3 lines · Delphine CC Chiu

v4 - Add LTC4286 and LTC4287 binding document
- Add LTC4286 and LTC4287 driver

This is v4, but the first version you've sent to the openbmc list. I can't see an upstream v4, and v3 has changes requested.

It would be best if you finished getting review from Guneter, and then sent that version to the openbmc list for merging. Include a link to the upstream submission in your cover letter so we know what is going on.

Quoted 20 lines

Delphine CC Chiu (2):
dt-bindings: hwmon: Add lltc ltc4286 driver bindings
hwmon: pmbus: Add ltc4286 driver

 .../bindings/hwmon/lltc,ltc4286.yaml          |  51 +++++
 Documentation/hwmon/index.rst                 |   1 +
 Documentation/hwmon/ltc4286.rst               |  95 ++++++++++
 MAINTAINERS                                   |  10 +
 drivers/hwmon/pmbus/Kconfig                   |  10 +
 drivers/hwmon/pmbus/Makefile                  |   1 +
 drivers/hwmon/pmbus/ltc4286.c                 | 177 ++++++++++++++++++
 7 files changed, 345 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
 create mode 100644 Documentation/hwmon/ltc4286.rst
 create mode 100644 drivers/hwmon/pmbus/ltc4286.c

--
2.25.1

#4 lore raw
Quoted 7 lines · Joel Stanley
Quoted 3 lines · Delphine CC Chiu

v4 - Add LTC4286 and LTC4287 binding document
- Add LTC4286 and LTC4287 driver

Quoted 7 lines

This is v4, but the first version you've sent to the openbmc list. I can't see an upstream v4, and v3 has changes requested.

It would be best if you finished getting review from Guneter, and then sent that version to the openbmc list for merging. Include a link to the upstream submission in your cover letter so we know what is going on.

I didn't get a response from you.

I did see you posted some more patches, both to the upstream list and to openbmc. It's not helpful, please get your patches reviewed upstream and once you've got them applied there, then send them to the openbmc list.

Can you please respond to my mail if this makes sense and you agree.

Cheers,

Joel

#5 lore raw
Quoted 27 lines

-----Original Message-----
From: Joel Stanley <[email protected]>
Sent: Friday, November 10, 2023 10:35 AM
To: Delphine_CC_Chiu/WYHQ/Wiwynn <[email protected]>; Andrew Jeffery <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH linux dev-6.5 v4 0/2] LTC4286 and LTC4287 driver support

Security Reminder: Please be aware that this email is sent by an external
sender.

Quoted 7 lines · Joel Stanley
Quoted 3 lines · Delphine CC Chiu

v4 - Add LTC4286 and LTC4287 binding document
- Add LTC4286 and LTC4287 driver

Quoted 7 lines

This is v4, but the first version you've sent to the openbmc list. I can't see an upstream v4, and v3 has changes requested.

It would be best if you finished getting review from Guneter, and then sent that version to the openbmc list for merging. Include a link to the upstream submission in your cover letter so we know what is going on.

Quoted 7 lines

I didn't get a response from you.

I did see you posted some more patches, both to the upstream list and to openbmc. It's not helpful, please get your patches reviewed upstream and once you've got them applied there, then send them to the openbmc list.

Can you please respond to my mail if this makes sense and you agree.

Sorry for not responding you.
We agree with your suggestion.
However, we have discussed with upstream back and forth.
We almost complete this driver.
Moreover, other projects in OpenBmc want to use this driver.
But we are not sure about when this driver could be merged.
So, we are wondering if there is any chance you can merge this driver first for OpenBmc use. Thanks.

Quoted 4 lines

Cheers,

Joel

#6 lore raw
Quoted 36 lines · Delphine_CC_Chiu/WYHQ/Wiwynn
Quoted 28 lines

-----Original Message-----
From: Joel Stanley <[email protected]>
Sent: Friday, November 10, 2023 10:35 AM
To: Delphine_CC_Chiu/WYHQ/Wiwynn <[email protected]>; Andrew Jeffery <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH linux dev-6.5 v4 0/2] LTC4286 and LTC4287 driver support

Security Reminder: Please be aware that this email is sent by an external
sender.

Quoted 7 lines · Joel Stanley
Quoted 3 lines · Delphine CC Chiu

v4 - Add LTC4286 and LTC4287 binding document
- Add LTC4286 and LTC4287 driver

Quoted 7 lines

This is v4, but the first version you've sent to the openbmc list. I can't see an upstream v4, and v3 has changes requested.

It would be best if you finished getting review from Guneter, and then sent that version to the openbmc list for merging. Include a link to the upstream submission in your cover letter so we know what is going on.

Quoted 7 lines

I didn't get a response from you.

I did see you posted some more patches, both to the upstream list and to openbmc. It's not helpful, please get your patches reviewed upstream and once you've got them applied there, then send them to the openbmc list.

Can you please respond to my mail if this makes sense and you agree.

Quoted 7 lines

Sorry for not responding you.
We agree with your suggestion.
However, we have discussed with upstream back and forth.
We almost complete this driver.
Moreover, other projects in OpenBmc want to use this driver.
But we are not sure about when this driver could be merged.
So, we are wondering if there is any chance you can merge this driver first for OpenBmc use.

You need to make this case when sending the backport. Please include that information in the cover letter, and make your case as to why we should spend the extra development effort carrying the patch that is still under review.

Currently you seem to send the patches to both the upstream list and to openbmc at the same time, which does not work for me. I have some new rules for getting the patches merged into openbmc:

1. Do not send them for backporting to the dev-6.6 branch until they have been reviewed upstream. This means you have Reviewed-by or Acked-by tags on at least a majority of the patches in a series before you send them to the openbmc list.
2. Find reviewers for your upstream patches. Get other Facebook employees, get other openbmc contributors to review your patches. A good way to encourage others to review your patches is to first review thiers.
3. When you do send the patches for backporting, include a justification in the cover letter for why they should be backported. For example: "These patches are merged upstream" or "the changes under active review, but we wish to have them in the openbmc tree because it has been ongoing for more than two weeks".

Your latest upstream patchset produces a large number of warnings when I applied it to the 6.7-rc1 tree. This shows you are not compiling your changes before submitting.

Please engage with me and the other developers on this issue so we can help each other get the changes up to scratch and merged.

Cheers,

Joel

#7 lore raw

Hello Joel,

Quoted 2 lines · Joel Stanley

I have some
new rules for getting the patches merged into openbmc:

Can you please update this wiki with what your current expectations are then because these are not obviously reflected:

https://github.com/openbmc/linux/wiki/DevelopmentProcess

Quoted 9 lines

1. Do not send them for backporting to the dev-6.6 branch until they have been reviewed upstream. This means you have Reviewed-by or Acked-by tags on at least a majority of the patches in a series before you send them to the openbmc list.

2. Find reviewers for your upstream patches. Get other Facebook employees, get other openbmc contributors to review your patches. A good way to encourage others to review your patches is to first review thiers.

The submitters here are not Facebook employees (nit: there is also no such thing as the company changed names 2 years ago now), but they are doing work partially on behalf of Meta as their company is partnering with us to develop new systems.

In this case, I don't think review has been an issue since Guenter applied v7 to his tree.

Quoted 5 lines

3. When you do send the patches for backporting, include a justification in the cover letter for why they should be backported. For example: "These patches are merged upstream" or "the changes under active review, but we wish to have them in the openbmc tree because it has been ongoing for more than two weeks".

It would be nice for the wiki to give clear unbiased criteria here. Currently it says:

Patches for pre-upstream inclusion ... should be at least of a level approximately ready to submit upstream.

This implies, by my reading, that any commit sent upstream can in parallel be sent to our 'dev-*' branches, since that is a stronger criteria than you've listed.

Anyone can carry patches in their own downstream trees, so it isn't obvious to me when it is deemed beneficial and not a burden to also request a backport to the openbmc/linux branches. I get the impression that our backports requests are more on the burden end of the spectrum.

Quoted 10 lines

Your latest upstream patchset produces a large number of warnings when I applied it to the 6.7-rc1 tree. This shows you are not compiling your changes before submitting.

Please engage with me and the other developers on this issue so we can help each other get the changes up to scratch and merged.

Cheers,

Joel

Signature · 1 line
Patrick Williams