[RFC 0/2] spi: aspeed: SPI1 mode control driver enabling sysfs control

Andrew Jeffery andrew at aj.id.au
Tue Oct 25 10:26:54 AEDT 2016


On Mon, 2016-10-24 at 14:22 -0700, Kun Yi wrote:
> Hi Andrew,
> 
> One question I have though: I think pinmux/pinctrl driver is supposed
> to be a boot time static pin configure module and parses DT and
> configures accordingly. Is it possible to use pinmux to dynamically
> modify the pin states? 

Yes, see "Runtime pinmuxing" here (at the bottom of the document):

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/pinctrl.txt

So you'd need to patch the FMC driver that Milton and Cedric have been
working on to (de)activate pin states, likely at probe() and remove()
(this implies you'll need to somehow orchestrate a remove/switch,
switch/probe dance). Alternatively, provide a way to suspend operations
on the MTD and switch the pins between master and passthru in the FMC
driver. Some complications are that this functionality is only
available for SPI1, and you might need to do a bit of work to guarantee
sensible outcomes for operations that might span the mode switch.

Cheers,

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20161025/acd2405c/attachment.sig>


More information about the openbmc mailing list