[lkml]   [2019]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Re: [PATCH] pinctrl: intel: Implements gpio free function
On Thu, Mar 21, 2019 at 09:35:26PM +0800, wrote:
> --> I know your meaning, even though I've did following actions
> instead of unexport,
> # echo 0 > /sys/class/gpio/gpioXX/value
> # echo in > /sys/class/gpio/gpioXX/direction
> the padcfg0 value still can not roll back,because after export the
> gpio,the following
> action as padcfg0 settings was done.
> Exactly TX and RX register have been set as below in GPIO request:
> /* Disable TX buffer and enable RX (this will be input) */
> value &= ~PADCFG0_GPIORXDIS;
> this will infruence next reboot gpio signal.
> And could you pls see my ->free function implementation?

I checked it and you do this:

+ value &= ~PADCFG0_GPIOTXDIS;

which pretty much turns the pin GPIO output unconditionally. I don't
really think it is good idea. May work in your case but may cause
problems with others.

If you want to keep it as output and leave the value 1 (high) before you
issue reboot, I don't think you need to do anything via sysfs (as the
pin is already in that state and issuing reboot command should not
change anything because the driver does not have ->shutdown callback.

In other words, your peripheral expects reset GPIO to be asserted (high)
during reboot so unless the boot firmware resets the pin I don't see why
leaving it as is does not work for you.

 \ /
  Last update: 2019-03-21 14:58    [W:0.149 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site