hwmon: Add max31760 fan speed controller
Subsystems (3)
v9 cover hwmon: Add max31760 fan speed controller
changes in v9:
- return -EINVAL when writing fan_enable and pwm_enable
- fix dt-bindings errors
changes in v8:
- use sizeof(*)
- use DEFINE_SIMPLE_DEV_PM_OPS
- remove __maybe_unused
- remove of_match_ptr
- dt-bindings: style fixes
changes in v7:
- make max31760_read_string static
changes in v6:
- update description of hwmon documentation
- add hwmon documentation to index.rst
changes in v5:
- add dt-bindings documentation
- add maintainer
changes in v4:
- use sysfs_emit instead of sprintf
- use kstrtou8 for pwm
- use closest match for pwm1_auto_point_temp_hyst
changes in v3:
- add regmap cache
- remove pwm1_auto_point[1-48]_{temp,temp_hyst} attributes
- add pwm1_auto_point_temp_hyst attribute
changes in v2:
- remove pulse_per_rev variable in tach_to_rpm
- remove temperature max_hyst and crit_hyst
- strict value checking for fan_enable and pwm_enable
- do not clamp pwm value for Look-up table
- add sysfs_attr_init call
- add documentation
Ibrahim Tilki (4):
drivers: hwmon: Add max31760 fan speed controller driver
docs: hwmon: add max31760 documentation
dt-bindings: hwmon: Add bindings for max31760
MAINTAINERS: Add maintainer for hwmon/max31760
.../bindings/hwmon/adi,max31760.yaml | 42 ++ Documentation/hwmon/index.rst | 1 + Documentation/hwmon/max31760.rst | 77 +++ MAINTAINERS | 9 + drivers/hwmon/Kconfig | 12 + drivers/hwmon/Makefile | 1 + drivers/hwmon/max31760.c | 596 ++++++++++++++++++ 7 files changed, 738 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/adi,max31760.yaml create mode 100644 Documentation/hwmon/max31760.rst create mode 100644 drivers/hwmon/max31760.c
Signature · 1 line
2.36.1
PATCH v9 1/4 drivers: hwmon: Add max31760 fan speed controller driver
MAX31760 is a precision fan speed controller with nonvolatile lookup table. Device has one internal and one external temperature sensor support. Controls two fans and measures their speeds. Generates hardware alerts when programmable max and critical temperatures are exceeded.
--- drivers/hwmon/Kconfig | 12 + drivers/hwmon/Makefile | 1 + drivers/hwmon/max31760.c | 596 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 609 insertions(+) create mode 100644 drivers/hwmon/max31760.c
drivers/hwmon/Kconfig +12 -0
@@ -1066,6 +1066,18 @@ config SENSORS_MAX31730 This driver can also be built as a module. If so, the module will be called max31730. +config SENSORS_MAX31760 + tristate "MAX31760 fan speed controller" + depends on I2C + select REGMAP_I2C + help + Support for the Analog Devices MAX31760 Precision Fan-Speed + Controller. MAX31760 integrates temperature sensing along with + precision PWM fan control. + + This driver can also be built as a module. If so, the module + will be called max31760. + config SENSORS_MAX6620 tristate "Maxim MAX6620 fan controller" depends on I2C
drivers/hwmon/Makefile +1 -0
@@ -140,6 +140,7 @@ obj-$(CONFIG_SENSORS_MAX1668) += max1668.o obj-$(CONFIG_SENSORS_MAX197) += max197.o obj-$(CONFIG_SENSORS_MAX31722) += max31722.o obj-$(CONFIG_SENSORS_MAX31730) += max31730.o +obj-$(CONFIG_SENSORS_MAX31760) += max31760.o obj-$(CONFIG_SENSORS_MAX6620) += max6620.o obj-$(CONFIG_SENSORS_MAX6621) += max6621.o obj-$(CONFIG_SENSORS_MAX6639) += max6639.o
drivers/hwmon/max31760.c new file +596 -0
596 lines not on this page · raw message
Signature · 1 line
2.36.1
PATCH v9 2/4 docs: hwmon: add max31760 documentation
In reply to Ibrahim TilkiAdding documentation for max31760 fan speed controller
--- Documentation/hwmon/index.rst | 1 + Documentation/hwmon/max31760.rst | 77 ++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 Documentation/hwmon/max31760.rst
Documentation/hwmon/index.rst +1 -0
@@ -133,6 +133,7 @@ Hardware Monitoring Kernel Drivers max20751 max31722 max31730 + max31760 max31785 max31790 max34440
Documentation/hwmon/max31760.rst new file +77 -0
77 lines not on this page · raw message
Signature · 1 line
2.36.1
PATCH v9 3/4 dt-bindings: hwmon: Add bindings for max31760
In reply to Ibrahim TilkiAdding bindings for Analog Devices MAX31760 Fan-Speed Controller
--- .../bindings/hwmon/adi,max31760.yaml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/adi,max31760.yaml
Documentation/devicetree/bindings/hwmon/adi,max31760.yaml new file +42 -0
@@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/adi,max31760.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices MAX31760 Fan-Speed Controller + +maintainers: + - Ibrahim Tilki <[email protected]> + +description: | + Analog Devices MAX31760 Fan-Speed Controller + https://datasheets.maximintegrated.com/en/ds/MAX31760.pdf + +properties: + compatible: + enum: + - adi,max31760 + + reg: + description: I2C address of slave device. + minimum: 0x50 + maximum: 0x57 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + fan-controller@50 { + reg = <0x50>; + compatible = "adi,max31760"; + }; + };
Signature · 1 line
2.36.1
Re: [PATCH v9 3/4] dt-bindings: hwmon: Add bindings for max31760
Quoted 5 lines · Ibrahim Tilki
Adding bindings for Analog Devices MAX31760 Fan-Speed Controller
Signed-off-by Ibrahim Tilki <[email protected]>--- .../bindings/hwmon/adi,max31760.yaml | 42 +++++++++++++++++++
Best regards,
Krzysztof
Re: [PATCH v9 3/4] dt-bindings: hwmon: Add bindings for max31760
In reply to Ibrahim TilkiQuoted 5 lines · Ibrahim Tilki
Adding bindings for Analog Devices MAX31760 Fan-Speed Controller
Signed-off-by Ibrahim Tilki <[email protected]>--- .../bindings/hwmon/adi,max31760.yaml | 42 +++++++++++++++++++
Please add Acked-by/Reviewed-by tags when posting new versions. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply.
https://elixir.bootlin.com/linux/v5.17/source/Documentation/process/submitting-patches.rst#L540
If a tag was not added on purpose, please state why and what changed.
Best regards,
Krzysztof
PATCH v9 4/4 MAINTAINERS: Add maintainer for hwmon/max31760
In reply to Ibrahim TilkiAdd maintainer for hwmon/max31760 driver
--- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+)
MAINTAINERS +9 -0
@@ -1334,6 +1334,15 @@ F: drivers/iio/amplifiers/hmc425a.c F: drivers/staging/iio/*/ad* X: drivers/iio/*/adjd* +ANALOG DEVICES INC MAX31760 DRIVER +M: Ibrahim Tilki <[email protected]> +S: Maintained +W: http://wiki.analog.com/ +W: https://ez.analog.com/linux-software-drivers +F: Documentation/devicetree/bindings/hwmon/adi,max31760.yaml +F: Documentation/hwmon/max31760.rst +F: drivers/hwmon/max31760.c + ANALOGBITS PLL LIBRARIES M: Paul Walmsley <[email protected]> S: Supported
Signature · 1 line
2.36.1
Guenter Roeck
maintainerQuoted 55 lines · Ibrahim Tilki
changes in v9:
- return-EINVALwhen writingfan_enableandpwm_enable
- fix dt-bindings errorschanges in v8:
- usesizeof(*)
- useDEFINE_SIMPLE_DEV_PM_OPS
- remove__maybe_unused
- removeof_match_ptr
- dt-bindings: style fixeschanges in v7:
- makemax31760_read_stringstaticchanges in v6:
- update description of hwmon documentation
- add hwmon documentation toindex.rstchanges in v5:
- add dt-bindings documentation
- add maintainerchanges in v4:
- usesysfs_emitinstead of sprintf
- use kstrtou8 for pwm
- use closest match forpwm1_auto_point_temp_hystchanges in v3:
- add regmap cache
- remove pwm1_auto_point[1-48]_{temp,temp_hyst} attributes
- addpwm1_auto_point_temp_hystattributechanges in v2:
- removepulse_per_revvariable intach_to_rpm
- remove temperaturemax_hystandcrit_hyst
- strict value checking forfan_enableandpwm_enable
- do not clamp pwm value for Look-up table
- addsysfs_attr_initcall
- add documentationIbrahim Tilki (4):
drivers: hwmon: Add max31760 fan speed controller driver
docs: hwmon: add max31760 documentation
dt-bindings: hwmon: Add bindings for max31760
MAINTAINERS: Add maintainer for hwmon/max31760.../bindings/hwmon/adi,max31760.yaml | 42 ++ Documentation/hwmon/index.rst | 1 + Documentation/hwmon/max31760.rst | 77 +++ MAINTAINERS | 9 + drivers/hwmon/Kconfig | 12 + drivers/hwmon/Makefile | 1 + drivers/hwmon/max31760.c | 596 ++++++++++++++++++ 7 files changed, 738 insertions(+)
Quoted 4 lines
create mode 100644
Documentation/devicetree/bindings/hwmon/adi,max31760.yamlcreate mode 100644Documentation/hwmon/max31760.rst
create mode 100644drivers/hwmon/max31760.c
Series applied to hwmon-next.
Thanks,
Guenter