diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-04-25 17:43:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-04-25 17:43:44 -0700 |
commit | 4173cf6fb6b7d1b4569cca08af318c4561356fb5 (patch) | |
tree | 54d34e0eab0b8cb372e85ab2bad1d6b1612bb89d /drivers/hwmon/pwm-fan.c | |
parent | 3361e9a4ea957b09c5d6242613360c415194dbb5 (diff) | |
parent | 1c19ac768b8eeb0304c4ed7db66c2bb89c6ad226 (diff) |
Merge tag 'hwmon-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
"New drivers
- Driver for Acbel FSB032 power supply
- Driver for StarFive JH71x0 temperature sensor
Added support to existing drivers:
- aquacomputer_d5next: Support for Aquacomputer Aquastream XT
- nct6775: Added various ASUS boards to list of boards supporting WMI
- asus-ec-sensors: ROG STRIX Z390-F GAMING, ProArt B550-Creator,
Notable improvements:
- Regulator event and sysfs notification support for PMBus drivers
Notable cleanup:
- Constified pointers to hwmon_channel_info
.. and various other minor bug fixes and improvements"
* tag 'hwmon-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (131 commits)
hwmon: lochnagar: Remove the unneeded include <linux/i2c.h>
hwmon: (pmbus/fsp-3y) Fix functionality bitmask in FSP-3Y YM-2151E
hwmon: (adt7475) Use device_property APIs when configuring polarity
hwmon: (aquacomputer_d5next) Add support for Aquacomputer Aquastream XT
hwmon: (it87) Disable/enable SMBus access for IT8622E chipset
hwmon: (it87) Add calls to smbus_enable/smbus_disable as required
hwmon: (it87) Test for error in it87_update_device
hwmon: (it87) Disable SMBus access for environmental controller registers.
docs: hwmon: Add documentaion for acbel-fsg032 PSU
hwmon: (pmbus/acbel-fsg032) Add Acbel power supply
dt-bindings: trivial-devices: Add acbel,fsg032
dt-bindings: vendor-prefixes: Add prefix for acbel
hwmon: (sfctemp) Simplify error message
hwmon: (pmbus/ibm-cffps) Use default debugfs attributes and lock function
hwmon: (pmbus/core) Add lock and unlock functions
hwmon: (pmbus/core) Request threaded interrupt with IRQF_ONESHOT
hwmon: (nct6775) update ASUS WMI monitoring list A620/B760/W790
hwmon: ina2xx: add optional regulator support
dt-bindings: hwmon: ina2xx: add supply property
dt-bindings: hwmon: pwm-fan: Convert to DT schema
...
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
-rw-r--r-- | drivers/hwmon/pwm-fan.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 83a347ca35da..6e4516c2ab89 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -427,7 +427,7 @@ static int pwm_fan_of_get_cooling_data(struct device *dev, struct device_node *np = dev->of_node; int num, i, ret; - if (!of_find_property(np, "cooling-levels", NULL)) + if (!of_property_present(np, "cooling-levels")) return 0; ret = of_property_count_u32_elems(np, "cooling-levels"); @@ -508,6 +508,14 @@ static int pwm_fan_probe(struct platform_device *pdev) pwm_init_state(ctx->pwm, &ctx->pwm_state); /* + * PWM fans are controlled solely by the duty cycle of the PWM signal, + * they do not care about the exact timing. Thus set usage_power to true + * to allow less flexible hardware to work as a PWM source for fan + * control. + */ + ctx->pwm_state.usage_power = true; + + /* * set_pwm assumes that MAX_PWM * (period - 1) fits into an unsigned * long. Check this here to prevent the fan running at a too low * frequency. |