Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state
From: Uwe Kleine-König
Date: Mon Nov 19 2018 - 03:32:45 EST
Hello Linus,
On Mon, Nov 19, 2018 at 08:44:38AM +0100, Linus Walleij wrote:
> There is quite a discussion you folks have going on here. I tried to
> grasp it but I can't. I can try to answer the above question specifically.
To sumarize: When the pwm driver probes it is not yet clear if the idle
state of the output pin is high or low. Even when the pinctrl device has
an "init" and a "default" pinctrl, it is not yet fixed when its
"default" is configured.
The way Thierry wants to fix that is by disabling the output driver
until the pwm is in use und rely on a pull-up or pull-down in hardware.
The way I want to fix this is to only configure the pwm pin as part of
the consumer. This is late enough that the consumer already requested
and configured the pwm such that the idle level is known.
Thierry's and Lothar's claim was that putting the pin setup of the pwm
pin into the pwm consumer's pinctrl was forbidden. That's why I asked
you as pinctrl maintainer if there is a requirement that I don't know
of.
> So compared to things like that (that we still have to support
> forever) whatever you are doing here you're doing great as long
> as it is consumer controlled.
>
> Whether that consumer is the previous driver thingie in the
> daisy-chain of consumers or the final end user consumer of
> the pin doesn't really matter to pin control, as long as it is a
> consumer. I would tend to say it is up to the subsystem,
> and the old IETF motto "rough consensus and running code".
So I understand that from the pinctrl side there is no hard requirement
that the PWM pin must be muxed as part of the pwm device. And if things
work better when the pin is only configured as part of its consumer this
is legitimate.
Thanks for your feedback.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |