[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181119083230.re3dtq4alnrojbnd@pengutronix.de>
Date: Mon, 19 Nov 2018 09:32:30 +0100
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: "thierry.reding@...il.com" <thierry.reding@...il.com>,
Michal.Vokac@...ft.com, Mark Rutland <mark.rutland@....com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, linux-pwm@...r.kernel.org,
l.majewski@...ess.pl,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rob Herring <robh+dt@...nel.org>,
Sascha Hauer <kernel@...gutronix.de>,
Fabio Estevam <fabio.estevam@....com>,
Lothar Waßmann <LW@...o-electronics.de>
Subject: Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in
disabled state
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/ |
Powered by blists - more mailing lists