Thread (156 messages) 156 messages, 11 authors, 2017-07-31

Re: [PATCH 00/13] Ingenic JZ4740 / JZ4780 pinctrl driver

From: Paul Cercueil <paul@crapouillou.net>
Date: 2017-01-20 10:17:52
Also in: linux-fbdev, linux-gpio, linux-mips, linux-mmc, linux-pwm, lkml

Le 2017-01-20 09:40, Linus Walleij a écrit :
On Thu, Jan 19, 2017 at 12:19 PM, Paul Cercueil [off-list ref] 
wrote:
quoted
The problem with pinctrl and PWM, is that the pinctrl API works by 
"states". A default state, sleep state, and basically any custom state 
that the devicetree provides. This works well until you need to 
control individually each pin; with 8 pins, you would need 2^8 states, 
each one corresponding to a given configuration.
I do not really understand, do you really use all 2^8 states in a given
system?

The pin control states are to be used for practical situations, not
for all theoretical situations.

You should define in your device tree the states that your
particular system will use. Not all possible states on all possible
systems.
Well, that was if I wanted to dynamically set/unset the pin mux and
configuration when requesting/freeing a PWM. Then I'd need 2^x states
for X PWM pins.

Anyway, a static configuration works for me too. If at some point I
want dynamic configuration of the pins then I'll make the PWM driver
handle only one PWM pin and create one driver instance for each pin.

Regards,
-Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help