Skip to content

Commit

Permalink
hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach
Browse files Browse the repository at this point in the history
The driver support two functions: PWM and Tachometer. The PWM feature can
handle up to 16 output ports, while the Tachometer can monitor to up to 16
input ports as well. This driver implements them by exposing two kernel
subsystems: PWM and HWMON. The PWM subsystem can be utilized alongside
existing drivers for controlling elements such as fans (pwm-fan.c),
beepers (pwm-beeper.c) and so on. Through the HWMON subsystem, the driver
provides sysfs interfaces for fan.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Link: https://lore.kernel.org/r/20240221104025.1306227-4-billy_tsai@aspeedtech.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Billy Tsai authored and Guenter Roeck committed Mar 7, 2024
1 parent df9d235 commit 7e1449c
Show file tree
Hide file tree
Showing 5 changed files with 588 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Documentation/hwmon/aspeed-g6-pwm-tach.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. SPDX-License-Identifier: GPL-2.0-or-later
Kernel driver aspeed-g6-pwm-tach
=================================

Supported chips:
ASPEED AST2600

Authors:
<billy_tsai@aspeedtech.com>

Description:
------------
This driver implements support for ASPEED AST2600 Fan Tacho controller.
The controller supports up to 16 tachometer inputs.

The driver provides the following sensor accesses in sysfs:

=============== ======= ======================================================
fanX_input ro provide current fan rotation value in RPM as reported
by the fan to the device.
fanX_div rw Fan divisor: Supported value are power of 4 (1, 4, 16
64, ... 4194304)
The larger divisor, the less rpm accuracy and the less
affected by fan signal glitch.
=============== ======= ======================================================
1 change: 1 addition & 0 deletions Documentation/hwmon/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Hardware Monitoring Kernel Drivers
aquacomputer_d5next
asb100
asc7621
aspeed-g6-pwm-tach
aspeed-pwm-tacho
asus_ec_sensors
asus_rog_ryujin
Expand Down
11 changes: 11 additions & 0 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,17 @@ config SENSORS_ASPEED
This driver can also be built as a module. If so, the module
will be called aspeed_pwm_tacho.

config SENSORS_ASPEED_G6
tristate "ASPEED g6 PWM and Fan tach driver"
depends on ARCH_ASPEED || COMPILE_TEST
depends on PWM
help
This driver provides support for ASPEED G6 PWM and Fan Tach
controllers.

This driver can also be built as a module. If so, the module
will be called aspeed_pwm_tacho.

config SENSORS_ATXP1
tristate "Attansic ATXP1 VID controller"
depends on I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ obj-$(CONFIG_SENSORS_ARM_SCPI) += scpi-hwmon.o
obj-$(CONFIG_SENSORS_AS370) += as370-hwmon.o
obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o
obj-$(CONFIG_SENSORS_ASPEED) += aspeed-pwm-tacho.o
obj-$(CONFIG_SENSORS_ASPEED_G6) += aspeed-g6-pwm-tach.o
obj-$(CONFIG_SENSORS_ASUS_ROG_RYUJIN) += asus_rog_ryujin.o
obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o
obj-$(CONFIG_SENSORS_AXI_FAN_CONTROL) += axi-fan-control.o
Expand Down
Loading

0 comments on commit 7e1449c

Please sign in to comment.