mbox series

[v4,0/5] Support pwm/tach driver for aspeed ast26xx

Message ID 20221123061635.32025-1-billy_tsai@aspeedtech.com
Headers show
Series Support pwm/tach driver for aspeed ast26xx | expand

Message

Billy Tsai Nov. 23, 2022, 6:16 a.m. UTC
Unlike the old design that the register setting of the TACH should based
on the configure of the PWM. In ast26xx, the dependency between pwm and
tach controller is eliminated and becomes a separate hardware block. One
is used to provide pwm output and another is used to monitor the frequency
of the input. Therefore, this patch serials implements them by writing the
two driver "pwm-aspeed-ast2600.c" and "tach-aspeed-ast2600.c". The former
is following the pwm subsystem which can apply the existed driver to
controller the fan(pwm-fan.c), beeper(pwm-beeper.c) and so on. The latter
is following the sysfs interface of hwmon to creat the node for fan
monitor.

Changes since v3:
- pwm
  - Remove unnecessary include header
  - Fix warning Prefer "GPL" over "GPL v2"
- tach:
  - Remove the paremeter min_rpm and max_rpm and return the tach value 
  directly without any polling or delay.
  - Fix warning Prefer "GPL" over "GPL v2"
- dt-binding:
  - Replace underscore in node names with dashes
  - Split per subsystem

Changes since v2:
- pwm:
  - Use devm_* api to simplify the error cleanup
  - Fix the multi-line alignment problem
- tach:
  - Add tach-aspeed-ast2600 to index.rst
  - Fix the multi-line alignment problem
  - Remove the tach enable/disable when read the rpm
  - Fix some coding format issue

Changes since v1:
- tach:
  - Add the document tach-aspeed-ast2600.rst
  - Use devm_* api to simplify the error cleanup.
  - Change hwmon register api to devm_hwmon_device_register_with_info

Billy Tsai (5):
  dt-bindings: mfd: Add aspeed pwm-tach binding
  dt-bindings: pwm: Add bindings for aspeed pwm controller
  dt-bindings: hwmon: Add bindings for aspeed tach controller
  pwm: Add Aspeed ast2600 PWM support
  hwmon: Add Aspeed ast2600 TACH support

 .../bindings/hwmon/aspeed,ast2600-tach.yaml   |  36 ++
 .../bindings/mfd/aspeed,ast2600-pwm-tach.yaml |  73 ++++
 .../bindings/pwm/aspeed,ast2600-pwm.yaml      |  54 +++
 Documentation/hwmon/index.rst                 |   1 +
 Documentation/hwmon/tach-aspeed-ast2600.rst   |  24 ++
 drivers/hwmon/Kconfig                         |   9 +
 drivers/hwmon/Makefile                        |   1 +
 drivers/hwmon/tach-aspeed-ast2600.c           | 399 ++++++++++++++++++
 drivers/pwm/Kconfig                           |  10 +
 drivers/pwm/Makefile                          |   1 +
 drivers/pwm/pwm-aspeed-ast2600.c              | 318 ++++++++++++++
 11 files changed, 926 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed,ast2600-tach.yaml
 create mode 100644 Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml
 create mode 100644 Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml
 create mode 100644 Documentation/hwmon/tach-aspeed-ast2600.rst
 create mode 100644 drivers/hwmon/tach-aspeed-ast2600.c
 create mode 100644 drivers/pwm/pwm-aspeed-ast2600.c

Comments

Uwe Kleine-König Jan. 17, 2023, 9:48 p.m. UTC | #1
Hello Billy,

I wonder if you address the feedback you got for this series. I think
there are no big issues left, are there?

There is only one patch left open in the PWM patchwork (i.e. the patch
implementing the driver that already has my Reviewed-by tag). I'll
discard that one, too, as "changes requested" and hope you will send a
v5.

Best regards
Uwe
Billy Tsai Jan. 18, 2023, 1:48 a.m. UTC | #2
Hi Uwe,

  On 2023/1/18, 5:48 AM, "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de <mailto:u.kleine-koenig@pengutronix.de>> wrote:


  > Hello Billy,


  > I wonder if you address the feedback you got for this series. I think
  > there are no big issues left, are there?

Thanks for your help. Yes, there is no issue with the PWM driver at the
moment. The remaining task of this series is dt-binding and I am waiting
the feedback from reviewer.

  > There is only one patch left open in the PWM patchwork (i.e. the patch
  > implementing the driver that already has my Reviewed-by tag). I'll
  > discard that one, too, as "changes requested" and hope you will send a
  > v5.

I will send a v5 when the issue about the dt-binding is resloved.
Thanks again for your help!

Best Regards, 
Billy Tsai