Re: [PATCH] hwmon: (aspeed-pwm-tacho) Use 24MHz clock

From: Lei YU
Date: Tue May 08 2018 - 23:50:42 EST


On Wed, May 9, 2018 at 11:43 AM, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
>
> I am not going to accept this change, period. This is not one, it is five
> steps
> backward. If "aspeed_set_clock_source(priv->regmap, 0)" changes the clock
> speed,
> or the clock source, read it later, and attach to the correct clock. If that
> doesn't work, fix the problem in the clock subsystem. Hacking the driver is
> just
> plain wrong.
>
> Also, if the idea in DT is to provide a different clock to the watchdog on
> purpose,
> maybe the call to "aspeed_set_clock_source(priv->regmap, 0)" is wrong.

Exactly!
My first change (not sent to mailing list) is to remove the call of
"aspeed_set_clock_source(priv->regmap, 0)", instead, checking the clock
source, and use either 24M or the memory controller clock.
But that make things a bit more complicated and Aspeed suggests to use 24M
clock. So I sent this simplified change.

It's OK to not accept this change, the fix in DT will fix the issue as well.
Please drop this.
Thanks!