Re: [RCFÂPATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

From: VokÃÄ Michal
Date: Tue Nov 20 2018 - 08:14:42 EST


Hi,
sorry for the delay, I was out of office last week.
My comments below are just to clarify my attitude to the topic as my
name was mentioned few times while I was offline.

On 16.11.2018 10:51, Thierry Reding wrote:
> On Thu, Nov 15, 2018 at 09:37:33PM +0100, Uwe Kleine-KÃnig wrote:
>> On Thu, Nov 15, 2018 at 04:25:45PM +0100, Thierry Reding wrote:
>>> On Wed, Nov 14, 2018 at 10:51:20PM +0100, Uwe Kleine-KÃnig wrote:
>>>> On Wed, Nov 14, 2018 at 12:34:49PM +0100, Thierry Reding wrote:

>> Maybe it was a bad idea to broaden the discussion to talk about gpios
>> and ethernet stuff here. I'd still consider it a valid construct to put
>> the pwm pin into the backlight's pinctrl unless Linux W. disagrees.
>
> But why? The backlight doesn't care about the specific pinmuxing of the
> PWM pin. All it cares about is the PWM signal. That's the level of
> abstraction that the PWM consumer expects, anything lower level belongs
> in the PWM driver.

I also do not like the idea of putting the pinmuxing of the PWM pin into
the PWM consumer. That is why it never came to my mind to do it when
I tested what Uwe was suggesting.

>>>> Other than that my approach looks more elegant to me (which obviously is
>>>> subjective). It works in all cases apart from sysfs (which is special
>>>> because it's not integrated into the device model) and there is no need
>>>> to teach the pwm framework about pinmuxing and invent new pinctrl modes
>>>> for it.
>>>
>>> Elegance is useless if what you have doesn't work consistently and
>>> reliably.
>>>
>>> I don't understand your resistance to the pinctrl work. It's not rocket
>>> science. Michal already posted patches showing how it can be done and
>>> they're not very complicated. Also we're not doing anything out of the
>>> ordinary here. This is exactly the purpose of the pinctrl framework, so
>>> let's use the best tool at hand.
>>
>> In my last exchange with Michal I had the impression that he liked
>> my approach, too.
>
> My impression was that he was trying to find concensus. But the way I
> read it he was still arguing that the pinctrl solution was still the
> most complete, and would therefore still prefer it.

It is like you said Thierry. I am only trying to remain open to test
Uwe's ideas. After what I have tested so far I still prefer a imx-specific
pinctrl solution.

Michal