diff mbox series

[v1,1/2] dt-bindings: hwmon: Add lltc ltc4286 driver bindings

Message ID 20230424101352.28117-2-Delphine_CC_Chiu@Wiwynn.com
State Superseded
Headers show
Series LTC4286 and LTC4287 driver support | expand

Commit Message

Delphine CC Chiu April 24, 2023, 10:13 a.m. UTC
Add a device tree bindings for ltc4286 driver.

Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@Wiwynn.com>
---
 .../bindings/hwmon/lltc,ltc4286.yaml          | 47 +++++++++++++++++++
 MAINTAINERS                                   |  9 ++++
 2 files changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml

Comments

Guenter Roeck Aug. 4, 2023, 3:56 p.m. UTC | #1
On 8/1/23 22:31, Delphine_CC_Chiu/WYHQ/Wiwynn wrote:
>> -----Original Message-----
>> From: Guenter Roeck <groeck7@gmail.com> On Behalf Of Guenter Roeck
>> Sent: Monday, July 24, 2023 11:22 AM
>> To: Delphine_CC_Chiu/WYHQ/Wiwynn <Delphine_CC_Chiu@wiwynn.com>
>> Cc: patrick@stwcx.xyz; Jean Delvare <jdelvare@suse.com>; Rob Herring
>> <robh+dt@kernel.org>; Krzysztof Kozlowski
>> <krzysztof.kozlowski+dt@linaro.org>; linux-i2c@vger.kernel.org;
>> linux-hwmon@vger.kernel.org; devicetree@vger.kernel.org;
>> linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v1 1/2] dt-bindings: hwmon: Add lltc ltc4286 driver
>> bindings
>>
>>    Security Reminder: Please be aware that this email is sent by an external
>> sender.
>>
>> On 7/23/23 19:12, Delphine_CC_Chiu/WYHQ/Wiwynn wrote:
>>
>>>>> +properties:
>>>>> +  compatible:
>>>>> +    enum:
>>>>> +      - lltc,ltc4286
>>>>> +      - lltc,ltc4287
>>>>
>>>> There is no LTC4287, at least according to the Analog website.
>>> It has been announced on Analog Devices website.
>>> Please refer to this link:
>>> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
>>>
>> analog.com%2Fen%2Fproducts%2Fltc2487.html%23product-overview&data=0
>> 5%7
>>>
>> C01%7CWayne_SC_Liu%40wiwynn.com%7Cd97a86a696a54f28a26408db8bf52
>> 23d%7Cd
>>>
>> a6e0628fc834caf9dd273061cbab167%7C0%7C0%7C638257657193005539%7C
>> Unknown
>>>
>> %7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW
>> wiLCJ
>>>
>> XVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XrdlzCyq0pcjfv3M6QNX73Ieux0w
>> rfNKzNvv
>>> HgVSH40%3D&reserved=0
>>>
>>
>> No, that is wrong. You are pointing to ltc2487, which is something completely
>> different.
>>
> 
> We have sent e-mail to query about the release date for LTC4287 chip.
> Analog Device reply that they will release this chip in last week of Sep, 2023.
> Please refer to the attachment to review their reply.
> 

At least according to the driver code, LTC4286 and the LTC4287 are functionally
identical. I am kind of puzzled why you insist mentioning the not-yet-existing
LTC4287; instantiating LTC4287 as LTC4286 should work perfectly fine. LTC4287
can always be added as devicetree reference if/when it officially exists.

Care to explain ?

Note: If the chips are _not_ functionally identical, and a follow-up patch will
be needed to add full LTC4287 support to the driver after the chip has been
published, it would be inappropriate to make partial/incomplete changes now.
With that possibility in mind, I am not inclined to accept a driver that is
even mentioning LTC4287 without access to its datasheet because I think it
is important for me to understand the differences and similarities between
the two chips.

Guenter
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml b/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
new file mode 100644
index 000000000000..c1c8e310f9c4
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
@@ -0,0 +1,47 @@ 
+# 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 <Delphine_CC_Chiu@Wiwynn.com>
+
+properties:
+  compatible:
+    enum:
+      - lltc,ltc4286
+      - lltc,ltc4287
+
+  reg:
+    maxItems: 1
+
+  vrange_select_25p6:
+    description:
+      This property is a bool parameter to represent the
+      voltage range is 25.6 or not for this chip.
+
+  rsense-micro-ohms:
+    description:
+      Resistor value in micro-Ohm
+
+required:
+  - compatible
+  - reg
+  - rsense-micro-ohms
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        status = "okay";
+        ltc4286@40 {
+            compatible = "lltc,ltc4286";
+            reg = <0x40>;
+            vrange_select_25p6;
+            rsense-micro-ohms = <300>;
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index c6545eb54104..930bdba0f73c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12183,6 +12183,15 @@  S:	Maintained
 F:	Documentation/hwmon/ltc4261.rst
 F:	drivers/hwmon/ltc4261.c
 
+LTC4286 HARDWARE MONITOR DRIVER
+M:	Delphine CC Chiu <Delphine_CC_Chiu@Wiwynn.com>
+L:	linux-i2c@vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
+F:	drivers/hwmon/pmbus/Kconfig
+F:	drivers/hwmon/pmbus/Makefile
+F:	drivers/hwmon/pmbus/ltc4286.c
+
 LTC4306 I2C MULTIPLEXER DRIVER
 M:	Michael Hennerich <michael.hennerich@analog.com>
 L:	linux-i2c@vger.kernel.org