public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/11] hwmon: (amc6821) Various improvements
@ 2024-07-01 21:23 Guenter Roeck
  2024-07-01 21:23 ` [PATCH v2 01/11] hwmon: (amc6821) Stop accepting invalid pwm values Guenter Roeck
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Guenter Roeck @ 2024-07-01 21:23 UTC (permalink / raw)
  To: linux-hwmon; +Cc: linux-kernel, Farouk Bouabid, Quentin Schulz, Guenter Roeck

Cleanup and modernize the amc2821 driver.

Summary of changes:

- Stop accepting invalid pwm values.
- Improve consistency of reading vs. writing fan speed limits
- Rename fan1_div to fan1_pulses
- Add support for fan1_target and pwm1_enable mode 4
- Reorder include files, drop unnecessary ones
- Use tabs for column alignment in defines
- Use BIT() and GENMASK()
- Drop unnecessary enum chips
- Convert to use regmap
- Convert to with_info API
- Add support for pwm1_mode attribute

v2:
- Use kstrtou8() instead of kstrtol() where possible
- Limit range of pwm1_auto_point_pwm to 0..254 in patch 1
  instead of limiting it later, and do not accept invalid
  values for the attribute
- Do not accept negative fan speed values
- Display fan speed and speed limit as 0 if register value is 0
  (instead of 6000000), as in original code
- Only permit writing 0 (unlimited) for the maximum fan speed
- Add Reviewed-by: tags where given
- Fix definition of AMC6821_CONF1_FDRC1 in patch 7/10
- Use sign_extend32() instead of odd type cast
- Drop remaining spurious debug message in patch 9 instead of patch 10
- Add missing "select REGMAP_I2C" to Kconfig
- Change misleading variable name from 'mask' to 'mode'
- Use sysfs_emit instead of sprintf everywhere
- Add support for pwm1_mode attribute

----------------------------------------------------------------
Guenter Roeck (11):
      hwmon: (amc6821) Stop accepting invalid pwm values
      hwmon: (amc6821) Make reading and writing fan speed limits consistent
      hwmon: (amc6821) Rename fan1_div to fan1_pulses
      hwmon: (amc6821) Add support for fan1_target and pwm1_enable mode 4
      hwmon: (amc2821) Reorder include files, drop unnecessary ones
      hwmon: (amc6821) Use tabs for column alignment in defines
      hwmon: (amc2821) Use BIT() and GENMASK()
      hwmon: (amc6821) Drop unnecessary enum chips
      hwmon: (amc6821) Convert to use regmap
      hwmon: (amc6821) Convert to with_info API
      hwmon: (amc6821) Add support for pwm1_mode attribute

 Documentation/hwmon/amc6821.rst |    7 +-
 drivers/hwmon/Kconfig           |    1 +
 drivers/hwmon/amc6821.c         | 1299 ++++++++++++++++++++-------------------
 3 files changed, 660 insertions(+), 647 deletions(-)

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2024-07-04 17:50 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-01 21:23 [PATCH v2 00/11] hwmon: (amc6821) Various improvements Guenter Roeck
2024-07-01 21:23 ` [PATCH v2 01/11] hwmon: (amc6821) Stop accepting invalid pwm values Guenter Roeck
2024-07-03 14:29   ` Quentin Schulz
2024-07-03 20:17     ` Guenter Roeck
2024-07-01 21:23 ` [PATCH v2 02/11] hwmon: (amc6821) Make reading and writing fan speed limits consistent Guenter Roeck
2024-07-03 14:35   ` Quentin Schulz
2024-07-03 21:48     ` Guenter Roeck
2024-07-04  7:52       ` Quentin Schulz
2024-07-04 17:50         ` Guenter Roeck
2024-07-01 21:23 ` [PATCH v2 03/11] hwmon: (amc6821) Rename fan1_div to fan1_pulses Guenter Roeck
2024-07-01 21:23 ` [PATCH v2 04/11] hwmon: (amc6821) Add support for fan1_target and pwm1_enable mode 4 Guenter Roeck
2024-07-03 14:43   ` Quentin Schulz
2024-07-01 21:23 ` [PATCH v2 05/11] hwmon: (amc2821) Reorder include files, drop unnecessary ones Guenter Roeck
2024-07-01 21:23 ` [PATCH v2 06/11] hwmon: (amc6821) Use tabs for column alignment in defines Guenter Roeck
2024-07-01 21:23 ` [PATCH v2 07/11] hwmon: (amc2821) Use BIT() and GENMASK() Guenter Roeck
2024-07-03 14:45   ` Quentin Schulz
2024-07-01 21:23 ` [PATCH v2 08/11] hwmon: (amc6821) Drop unnecessary enum chips Guenter Roeck
2024-07-01 21:23 ` [PATCH v2 09/11] hwmon: (amc6821) Convert to use regmap Guenter Roeck
2024-07-03 16:19   ` Quentin Schulz
2024-07-03 20:55     ` Guenter Roeck
2024-07-01 21:23 ` [PATCH v2 10/11] hwmon: (amc6821) Convert to with_info API Guenter Roeck
2024-07-03 15:34   ` Quentin Schulz
2024-07-01 21:23 ` [PATCH v2 11/11] hwmon: (amc6821) Add support for pwm1_mode attribute Guenter Roeck
2024-07-03 15:28   ` Quentin Schulz
2024-07-03 21:29     ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox