Add support for sq24905c Hot-Swap Controller and Digital Power Monitor.
Signed-off-by: ChiShih Tsai <tomtsai764@gmail.com>
---
.../bindings/hwmon/adi,adm1275.yaml | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml b/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml
index ddb72857c846..6aa300086c84 100644
--- a/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml
+++ b/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml
@@ -30,6 +30,7 @@ properties:
- adi,adm1281
- adi,adm1293
- adi,adm1294
+ - silergy,sq24905c
reg:
maxItems: 1
@@ -46,6 +47,18 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 2, 4, 8, 16, 32, 64, 128]
+ silergy,volt-curr-sample-average:
+ description: |
+ Number of samples to be used to report voltage and current values.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [1, 2, 4, 8, 16, 32, 64, 128]
+
+ silergy,power-sample-average:
+ description: |
+ Number of samples to be used to report power values.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [1, 2, 4, 8, 16, 32, 64, 128]
+
allOf:
- $ref: hwmon-common.yaml#
- if:
@@ -96,12 +109,17 @@ allOf:
- adi,adm1281
- adi,adm1293
- adi,adm1294
+ - silergy,sq24905c
then:
properties:
adi,volt-curr-sample-average:
default: 128
adi,power-sample-average:
default: 1
+ silergy,volt-curr-sample-average:
+ default: 128
+ silergy,power-sample-average:
+ default: 1
required:
- compatible
@@ -121,5 +139,7 @@ examples:
shunt-resistor-micro-ohms = <500>;
adi,volt-curr-sample-average = <128>;
adi,power-sample-average = <128>;
+ silergy,volt-curr-sample-average = <128>;
+ silergy,power-sample-average = <1>;
};
};
--
2.43.0
On 8/4/25 05:48, ChiShih Tsai wrote: > Add support for sq24905c Hot-Swap Controller and Digital Power Monitor. > > Signed-off-by: ChiShih Tsai <tomtsai764@gmail.com> > --- > .../bindings/hwmon/adi,adm1275.yaml | 20 +++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml b/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml > index ddb72857c846..6aa300086c84 100644 > --- a/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml > +++ b/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml > @@ -30,6 +30,7 @@ properties: > - adi,adm1281 > - adi,adm1293 > - adi,adm1294 > + - silergy,sq24905c > > reg: > maxItems: 1 > @@ -46,6 +47,18 @@ properties: > $ref: /schemas/types.yaml#/definitions/uint32 > enum: [1, 2, 4, 8, 16, 32, 64, 128] > > + silergy,volt-curr-sample-average: > + description: | > + Number of samples to be used to report voltage and current values. > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [1, 2, 4, 8, 16, 32, 64, 128] > + > + silergy,power-sample-average: > + description: | > + Number of samples to be used to report power values. > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [1, 2, 4, 8, 16, 32, 64, 128] > + > allOf: > - $ref: hwmon-common.yaml# > - if: > @@ -96,12 +109,17 @@ allOf: > - adi,adm1281 > - adi,adm1293 > - adi,adm1294 > + - silergy,sq24905c > then: > properties: > adi,volt-curr-sample-average: > default: 128 > adi,power-sample-average: > default: 1 > + silergy,volt-curr-sample-average: > + default: 128 > + silergy,power-sample-average: > + default: 1 > I personally don't think this warrants new properties. However, if warranted, this needs to be qualified to only apply for the Silergy parts. Guenter > required: > - compatible > @@ -121,5 +139,7 @@ examples: > shunt-resistor-micro-ohms = <500>; > adi,volt-curr-sample-average = <128>; > adi,power-sample-average = <128>; > + silergy,volt-curr-sample-average = <128>; > + silergy,power-sample-average = <1>; > }; > };
On Mon, Aug 04, 2025 at 08:59:09AM -0700, Guenter Roeck wrote: > > allOf: > > - $ref: hwmon-common.yaml# > > - if: > > @@ -96,12 +109,17 @@ allOf: > > - adi,adm1281 > > - adi,adm1293 > > - adi,adm1294 > > + - silergy,sq24905c > > then: > > properties: > > adi,volt-curr-sample-average: > > default: 128 > > adi,power-sample-average: > > default: 1 > > + silergy,volt-curr-sample-average: > > + default: 128 > > + silergy,power-sample-average: > > + default: 1 > > I personally don't think this warrants new properties. However, if warranted, These are the same properties as adi ones, right? Then I agree, re-use existing ones. Best regards, Krzysztof
© 2016 - 2025 Red Hat, Inc.