[PATCH v2 0/2] Add JHB100 Fan-Tach support

Changhuang Liang <[email protected]>
Newsgroups org.kernel.vger.linux-hwmon,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
StarFive Fan-Tach controller can support up to 16 fan tach input.
The series has been tested on the EVB1 board.

Change since v1:
PATCH 1:
- Add explicit minItems/maxItems and range constraints for tach-ch.
- Switch fan node regex to support hex addresses.
- Add pulses-per-revolution demo.
- Rename example node to fan-controller for consistency.
- Limit the reg property to a maximum value of 15
- Fix tach-ch example by changing /bits/ 8 <0x0>, <0x8> to
  /bits/ 8 <0x0 0x8> so both values are parsed as 8-bit cells.

PATCH 2:
- Added hwmon documentation (starfive-fan-tach.rst)
- Added HAS_IOMEM dependency in Kconfig
- Added per-channel pulses-per-revolution DT property (default 2, range 1-4)
- Added mutex and spinlock for proper concurrency protection
- Added armed_stall/armed_slow mechanism to prevent spurious interrupts
- Added retry logic for zero sampling value in rpm read
- Improved probe sequence: clock enable before reset deassert
- Added devm action for remove path cleanup
- Added input validation for write operations
- Added MODULE_DEVICE_TABLE
- Added linux-hwmon mailing list to MAINTAINERS

v1: https://lore.kernel.org/all/[email protected]/

Changhuang Liang (2):
  dt-bindings: hwmon: Add starfive,jhb100-fan-tach
  hwmon: (starfive-fan-tach) Add fan tach driver for StarFive JHB100

 .../hwmon/starfive,jhb100-fan-tach.yaml       |  93 +++
 Documentation/hwmon/index.rst                 |   1 +
 Documentation/hwmon/starfive-fan-tach.rst     |  34 ++
 MAINTAINERS                                   |   8 +
 drivers/hwmon/Kconfig                         |  14 +
 drivers/hwmon/Makefile                        |   1 +
 drivers/hwmon/starfive-fan-tach.c             | 561 ++++++++++++++++++
 7 files changed, 712 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/starfive,jhb100-fan-tach.yaml
 create mode 100644 Documentation/hwmon/starfive-fan-tach.rst
 create mode 100644 drivers/hwmon/starfive-fan-tach.c

--
2.25.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.