Skip to content

Commit 7e1449c

Browse files
billy-tsaigroeck
authored andcommitted
hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach
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>
1 parent df9d235 commit 7e1449c

File tree

5 files changed

+588
-0
lines changed

5 files changed

+588
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.. SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
Kernel driver aspeed-g6-pwm-tach
4+
=================================
5+
6+
Supported chips:
7+
ASPEED AST2600
8+
9+
Authors:
10+
<billy_tsai@aspeedtech.com>
11+
12+
Description:
13+
------------
14+
This driver implements support for ASPEED AST2600 Fan Tacho controller.
15+
The controller supports up to 16 tachometer inputs.
16+
17+
The driver provides the following sensor accesses in sysfs:
18+
19+
=============== ======= ======================================================
20+
fanX_input ro provide current fan rotation value in RPM as reported
21+
by the fan to the device.
22+
fanX_div rw Fan divisor: Supported value are power of 4 (1, 4, 16
23+
64, ... 4194304)
24+
The larger divisor, the less rpm accuracy and the less
25+
affected by fan signal glitch.
26+
=============== ======= ======================================================

Documentation/hwmon/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Hardware Monitoring Kernel Drivers
4444
aquacomputer_d5next
4545
asb100
4646
asc7621
47+
aspeed-g6-pwm-tach
4748
aspeed-pwm-tacho
4849
asus_ec_sensors
4950
asus_rog_ryujin

drivers/hwmon/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,17 @@ config SENSORS_ASPEED
422422
This driver can also be built as a module. If so, the module
423423
will be called aspeed_pwm_tacho.
424424

425+
config SENSORS_ASPEED_G6
426+
tristate "ASPEED g6 PWM and Fan tach driver"
427+
depends on ARCH_ASPEED || COMPILE_TEST
428+
depends on PWM
429+
help
430+
This driver provides support for ASPEED G6 PWM and Fan Tach
431+
controllers.
432+
433+
This driver can also be built as a module. If so, the module
434+
will be called aspeed_pwm_tacho.
435+
425436
config SENSORS_ATXP1
426437
tristate "Attansic ATXP1 VID controller"
427438
depends on I2C

drivers/hwmon/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ obj-$(CONFIG_SENSORS_ARM_SCPI) += scpi-hwmon.o
5555
obj-$(CONFIG_SENSORS_AS370) += as370-hwmon.o
5656
obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o
5757
obj-$(CONFIG_SENSORS_ASPEED) += aspeed-pwm-tacho.o
58+
obj-$(CONFIG_SENSORS_ASPEED_G6) += aspeed-g6-pwm-tach.o
5859
obj-$(CONFIG_SENSORS_ASUS_ROG_RYUJIN) += asus_rog_ryujin.o
5960
obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o
6061
obj-$(CONFIG_SENSORS_AXI_FAN_CONTROL) += axi-fan-control.o

0 commit comments

Comments
 (0)