Commit 500a711d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull hwmon updates from Guenter Roeck:
 "Obsolete driver removals:

   - Removed obsolete adm1021 and max6642 drivers

  New drivers:

   - MPS MP2891, MP2993, MP9941, and MP5920

   - SPD5118 (Temperature Sensor and EEPROM)

  Added device support to existing drivers:

   - g762: G761

   - dell-smm: Dell OptiPlex 7060

   - asus-ec-sensors: ProArt X670E-CREATOR WIFI

   - corsair-psu: HX1200i Series 2023 psu

   - nzxt-smart2: Additional USB IS for NZXT RGB & Fan Controller

  Notable enhancements and fixes:

   - Removed use of i2c_match_id()

   - Constified struct regmap_config where feasible

   - Cleaned up amc6821 driver, and converted to use regmap and
     with_info API

   - Converted max6639 driver to use with_info API; added support for
     additional sysfs attributes

   - Fixed various sysfs attribute underflows

   - Added PEC support to hwmon core, and use in lm90 and max31827
     drivers

  And various other minor fixes and improvements"

* tag 'hwmon-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (103 commits)
  hwmon: (max6697) Fix swapped temp{1,8} critical alarms
  hwmon: (max6697) Fix underflow when writing limit attributes
  hwmon: Remove obsolete adm1021 and max6642 drivers
  hwmon: (pmbus/ltc4286) Drop unused i2c device ids
  hwmon: (g762) Initialize fans after configuring clock
  hwmon: (amc6821) Add support for pwm1_mode attribute
  hwmon: (amc6821) Convert to with_info API
  hwmon: (amc6821) Convert to use regmap
  hwmon: (amc6821) Drop unnecessary enum chips
  hwmon: (amc6821) Use BIT() and GENMASK()
  hwmon: (amc6821) Use tabs for column alignment in defines
  hwmon: (amc6821) Reorder include files, drop unnecessary ones
  hwmon: (amc6821) Add support for fan1_target and pwm1_enable mode 4
  hwmon: (amc6821) Rename fan1_div to fan1_pulses
  hwmon: (amc6821) Make reading and writing fan speed limits consistent
  hwmon: (amc6821) Stop accepting invalid pwm values
  hwmon: (w83627ehf) Fix underflows seen when writing limit attributes
  hwmon: (nct6775-core) Fix underflows seen when writing limit attributes
  hwmon: (lm95234) Fix underflows seen when writing limit attributes
  hwmon: (adc128d818) Fix underflows seen when writing limit attributes
  ...
parents e763c9ec 1ea3fd1e
Loading
Loading
Loading
Loading
+0 −47
Original line number Diff line number Diff line
GMT G762/G763 PWM Fan controller

Required node properties:

 - "compatible": must be either "gmt,g762" or "gmt,g763"
 - "reg": I2C bus address of the device
 - "clocks": a fixed clock providing input clock frequency
	     on CLK pin of the chip.

Optional properties:

 - "fan_startv": fan startup voltage. Accepted values are 0, 1, 2 and 3.
	       The higher the more.

 - "pwm_polarity": pwm polarity. Accepted values are 0 (positive duty)
	       and 1 (negative duty).

 - "fan_gear_mode": fan gear mode. Supported values are 0, 1 and 2.

If an optional property is not set in .dts file, then current value is kept
unmodified (e.g. u-boot installed value).

Additional information on operational parameters for the device is available
in Documentation/hwmon/g762.rst. A detailed datasheet for the device is available
at http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf.

Example g762 node:

   clocks {
	#address-cells = <1>;
	#size-cells = <0>;

	g762_clk: fixedclk {
		 compatible = "fixed-clock";
		 #clock-cells = <0>;
		 clock-frequency = <8192>;
	}
   }

   g762: g762@3e {
	compatible = "gmt,g762";
	reg = <0x3e>;
	clocks = <&g762_clk>
	fan_gear_mode = <0>; /* chip default */
	fan_startv = <1>;    /* chip default */
	pwm_polarity = <0>;  /* chip default */
   };
+95 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/gmt,g762.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: GMT G761/G762/G763 PWM Fan controller

maintainers:
  - Christian Marangi <ansuelsmth@gmail.com>

description: |
  GMT G761/G762/G763 PWM Fan controller.

  G761 supports an internal-clock hence the clocks property is optional.
  If not defined, internal-clock will be used. (31KHz is the clock of
  the internal crystal oscillator)

  If an optional property is not set in DT, then current value is kept
  unmodified (e.g. bootloader installed value).

  Additional information on operational parameters for the device is available
  in Documentation/hwmon/g762.rst. A detailed datasheet for the device is available
  at http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf.

properties:
  compatible:
    enum:
      - gmt,g761
      - gmt,g762
      - gmt,g763

  reg:
    maxItems: 1

  clocks:
    description: a fixed clock providing input clock frequency on CLK
      pin of the chip.
    maxItems: 1

  fan_startv:
    description: Fan startup voltage step
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3]

  pwm_polarity:
    description: PWM polarity (positive or negative duty)
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  fan_gear_mode:
    description: FAN gear mode. Configure High speed fan setting factor
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2]

required:
  - compatible
  - reg

if:
  properties:
    compatible:
      contains:
        enum:
          - gmt,g762
          - gmt,g763
then:
  required:
    - clocks

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        g762@3e {
            compatible = "gmt,g762";
            reg = <0x3e>;
            clocks = <&g762_clk>;
            fan_gear_mode = <0>;
            fan_startv = <1>;
            pwm_polarity = <0>;
        };

        g761@1e {
            compatible = "gmt,g761";
            reg = <0x1e>;
            fan_gear_mode = <0>;
            fan_startv = <1>;
            pwm_polarity = <0>;
        };
    };
+92 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---

$id: http://devicetree.org/schemas/hwmon/maxim,max6639.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim max6639

maintainers:
  - Naresh Solanki <naresh.solanki@9elements.com>

description: |
  The MAX6639 is a 2-channel temperature monitor with dual, automatic, PWM
  fan-speed controller.  It monitors its own temperature and one external
  diode-connected transistor or the temperatures of two external diode-connected
  transistors, typically available in CPUs, FPGAs, or GPUs.

  Datasheets:
    https://datasheets.maximintegrated.com/en/ds/MAX6639-MAX6639F.pdf

properties:
  compatible:
    enum:
      - maxim,max6639

  reg:
    maxItems: 1

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

  '#pwm-cells':
    const: 3

required:
  - compatible
  - reg

patternProperties:
  "^fan@[0-1]$":
    type: object
    description:
      Represents the two fans and their specific configuration.

    $ref: fan-common.yaml#

    unevaluatedProperties: false

    properties:
      reg:
        description:
          The fan number.

    required:
      - reg

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        fan1: fan-controller@10 {
            compatible = "maxim,max6639";
            reg = <0x10>;
            #address-cells = <1>;
            #size-cells = <0>;
            #pwm-cells = <3>;

            fan@0 {
                reg = <0x0>;
                pulses-per-revolution = <2>;
                max-rpm = <4000>;
                target-rpm = <1000>;
                pwms = <&fan1 0 25000 0>;
            };

            fan@1 {
                reg = <0x1>;
                pulses-per-revolution = <2>;
                max-rpm = <8000>;
                pwms = <&fan1 1 25000 0>;
            };
        };
    };
...
+9 −0
Original line number Diff line number Diff line
@@ -66,6 +66,14 @@ properties:
    description: phandle to the regulator that provides the VS supply typically
      in range from 2.7 V to 5.5 V.

  ti,alert-polarity-active-high:
    description: Alert pin is asserted based on the value of Alert polarity Bit
      of Mask/Enable register. Default value is Normal (0 which maps to
      active-low open collector). The other value is Inverted
      (1 which maps to active-high open collector). Specify this property to set
      the alert polarity to active-high.
    $ref: /schemas/types.yaml#/definitions/flag

required:
  - compatible
  - reg
@@ -88,5 +96,6 @@ examples:
            label = "vdd_3v0";
            shunt-resistor = <1000>;
            vs-supply = <&vdd_3v0>;
            ti,alert-polarity-active-high;
        };
    };
+12 −0
Original line number Diff line number Diff line
@@ -9,6 +9,14 @@ title: TMP108 temperature sensor
maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>

description: |
  The TMP108 is a digital-output temperature sensor with a
  dynamically-programmable limit window, and under- and overtemperature
  alert functions.

  Datasheets:
    https://www.ti.com/product/TMP108

properties:
  compatible:
    enum:
@@ -24,6 +32,9 @@ properties:
  "#thermal-sensor-cells":
    const: 0

  vcc-supply:
    description: phandle to the regulator that provides the V+ supply

required:
  - compatible
  - reg
@@ -45,6 +56,7 @@ examples:
            interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
            pinctrl-names = "default";
            pinctrl-0 = <&tmp_alrt>;
            vcc-supply = <&supply>;
            #thermal-sensor-cells = <0>;
        };
    };
Loading