aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/pwm-fan.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-17hwmon: pwm-fan: Use pwm_get_args() where appropriateBoris Brezillon1-6/+20
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Kamil Debski <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2015-09-20hwmon: (pwm-fan) Fix module autoload for OF platform driverLuis de Bethencourt1-0/+1
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2015-04-12hwmon: (pwm-fan) Update the duty cycle inorder to control the pwm-fanAnand Moon1-6/+3
pwm_config() must be called with a duty cycle of 0 prior to calling pwm_disable() to ensure that the pwm signal is set to low. Reported-by: Markus Reichl <[email protected]> Tested-by: Markus Reichl <[email protected]> Reviewed-by: Lukasz Majewski <[email protected]> Reviewed-by: Sjoerd Simons <[email protected]> Signed-off-by: Anand Moon <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2015-03-16hwmon: (pwm-fan, vexpress) Constify of_device_id arrayFabian Frederick1-1/+1
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2015-03-09hwmon: (pwm-fan) Declare pwm_fan_of_get_cooling_data staticGuenter Roeck1-1/+2
Address the following sparse warnings. drivers/hwmon/pwm-fan.c:176:5: warning: symbol 'pwm_fan_of_get_cooling_data' was not declared. Should it be static? drivers/hwmon/pwm-fan.c:176:5: warning: no previous prototype for 'pwm_fan_of_get_cooling_data' pwm_fan_of_get_cooling_data is only used in the pwm-fan driver and thus should be declared static. Cc: Lukasz Majewski <[email protected]> Acked-by: Lukasz Majewski <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2015-03-09hwmon: (pwm-fan) Add support for using PWM FAN as a cooling deviceLukasz Majewski1-1/+88
The PWM FAN device can now be used as a thermal cooling device. Signed-off-by: Lukasz Majewski <[email protected]> Acked-by: Eduardo Valentin <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2015-03-09hwmon: (pwm-fan) Read PWM FAN configuration from device treeLukasz Majewski1-1/+49
This patch provides code for reading PWM FAN configuration data via device tree. The pwm-fan can work with full speed when configuration is not provided. However, errors are propagated when wrong DT bindings are found. Additionally the struct pwm_fan_ctx has been extended. Signed-off-by: Lukasz Majewski <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2015-03-09hwmon: (pwm-fan) Extract __set_pwm() function to only modify PWM duty cycleLukasz Majewski1-12/+21
It was necessary to decouple code handling writing to sysfs from the one responsible for setting PWM of the fan. Due to that, new __set_pwm() method was extracted, which is responsible for only setting new PWM duty cycle. Signed-off-by: Lukasz Majewski <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2014-11-11hwmon: (pwm-fan) Fix suspend/resume behaviorKamil Debski1-3/+10
The state of a PWM output is not clearly defined after resume. Some PWM drivers do not restore the duty cycle upon resume, thus it is necessary to manually restore the correct value. Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2014-08-04hwmon: (pwm-fan) Remove duplicate dev_set_drvdata callAxel Lin1-1/+0
The dev_set_drvdata() call is equivalent to the platform_set_drvdata() call in next line. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2014-08-04hwmon: Add pwm-fan driverKamil Debski1-0/+194
The pwm-fan driver enables control of fans connected to PWM lines. This driver uses the PWM framework, so it is compatible with all PWM devices that provide drivers through the PWM framework. Signed-off-by: Kamil Debski <[email protected]> Reviewed-by: Varka Bhadram <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> [Guenter Roeck: Last argument to devm_of_pwm_get is pointer, use NULL] Signed-off-by: Guenter Roeck <[email protected]>