LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to change pinmux changes in kernel driver at run time (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-change-pinmux-changes-in-kernel-driver-at-run-time-4175586146/)

bkpawar_linux 08-03-2016 12:57 AM

How to change pinmux changes in kernel driver at run time
 
I know using dts files can modify the pin muxing statically, but want to do it at run time as below:

1. configure eSPI1 in spi mode zero as below in board dtsi file

MISO - pulled high
CLOCK - pulled down
MOSI - pulled down
CS - pulled high

2. When SPI is not in used by any application or processor goes to standby pull down the CS and MISO lines

I tried to implement the logic provided in but no luck.
https://www.kernel.org/doc/Documentation/pinctrl.txt

How one can achieve this in Linux kernel driver?
Any example would be good enough.


Thanks in advance for your kind help.

Rinndalir 08-03-2016 03:04 PM

I have a vague memory of some additions to the kernel to allow for dynamic device tree stuff. I just don't recall much more than that. I think that's what you want to look into. Might have been a guy named Guenther on LKML.

bkpawar_linux 08-05-2016 03:47 AM

So it means there is no framework provided by Linux kernel currently to change pin mux run time.


All times are GMT -5. The time now is 11:48 PM.