Skip to content

Commit

Permalink
drivers: hwmon: Support for ASPEED PWM/Fan tach
Browse files Browse the repository at this point in the history
The ASPEED AST2400/2500 PWM controller supports 8 PWM output ports.
The ASPEED AST2400/2500 Fan tach controller supports 16 tachometer
inputs.
The device driver matches on the device tree node. The configuration
values are read from the device tree and written to the respective
registers.
The driver provides a sysfs entries through which the user can
configure the duty-cycle value (ranging from 0 to 100 percent) and read
the fan tach rpm value.

Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Jaghathiswari Rankappagounder Natarajan authored and Guenter Roeck committed Apr 10, 2017
1 parent d702b35 commit 2d7a548
Show file tree
Hide file tree
Showing 4 changed files with 867 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Documentation/hwmon/aspeed-pwm-tacho
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Kernel driver aspeed-pwm-tacho
==============================

Supported chips:
ASPEED AST2400/2500

Authors:
<jaghu@google.com>

Description:
------------
This driver implements support for ASPEED AST2400/2500 PWM and Fan Tacho
controller. The PWM controller supports upto 8 PWM outputs. The Fan tacho
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.

pwmX rw get or set PWM fan control value. This is an integer
value between 0(off) and 255(full speed).
9 changes: 9 additions & 0 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,15 @@ config SENSORS_ASB100
This driver can also be built as a module. If so, the module
will be called asb100.

config SENSORS_ASPEED
tristate "ASPEED AST2400/AST2500 PWM and Fan tach driver"
help
This driver provides support for ASPEED AST2400/AST2500 PWM
and Fan Tacho 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 @@ -46,6 +46,7 @@ obj-$(CONFIG_SENSORS_ADT7475) += adt7475.o
obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o
obj-$(CONFIG_SENSORS_ARM_SCPI) += scpi-hwmon.o
obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o
obj-$(CONFIG_SENSORS_ASPEED) += aspeed-pwm-tacho.o
obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o
obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o
obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o
Expand Down
Loading

0 comments on commit 2d7a548

Please sign in to comment.