RE: [PATCH] hwmon: max31790: support to config PWM as TACH

From: Delphine_CC_Chiu/WYHQ/Wiwynn
Date: Fri Sep 15 2023 - 04:18:58 EST




> -----Original Message-----
> From: Guenter Roeck <groeck7@xxxxxxxxx> On Behalf Of Guenter Roeck
> Sent: Wednesday, September 13, 2023 9:37 PM
> To: Delphine_CC_Chiu/WYHQ/Wiwynn <Delphine_CC_Chiu@xxxxxxxxxx>;
> patrick@xxxxxxxxx; Jean Delvare <jdelvare@xxxxxxxx>
> Cc: linux-hwmon@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] hwmon: max31790: support to config PWM as TACH
>
> Security Reminder: Please be aware that this email is sent by an external
> sender.
>
> On 9/13/23 01:51, Delphine_CC_Chiu/WYHQ/Wiwynn wrote:
>
> [ ... ]
>
> >>
> >> This assumes that the channel is configured as pwm.
> >> What if the BIOS / ROMMON configured another channel which you want
> >> as pwm channel as fan input channel ?
> >>
> > This will config the channel as TACH.
> > Could you provide more information about the scenario you mentioned?
> > In our system, there is only BMC that will set the config of fan device.
>
> Please keep in mind that upstream code is not intended to only support your
> specific use case, but the use case of others as well. Your system (the one you
> have today) may only use the chip for fan speed measurement. Others may
> use it use it to control fans, or your hardware might tomorrow build another
> system where the chip us used to control the fans as well. Those use cases
> should be covered by your patch as well.
>
> Guenter
Hi Guenter,
After our internal discussion, we thought that the PWM output channel of
max31790 should either be PWM output or TACH input in hardware design.
And the property "pwm-as-tach" is optional, if users don't want to config
any PWM output channel as TACH input, then they don't need to add this
property in DTS.
Would like to know is this meet your expectations?