Re: [PATCH] pinctrl: qcom: Print high/low status of gpios in debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 8, 2018 at 2:15 AM, Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote:

> I was debugging some gpio issues and I thought that the output of gpio
> debugfs was telling me the high or low level of the gpios with a '1' or
> a '0'. We saw a line like this though:
>
>  gpio93  : in 4 2mA pull down
>
> and I started to think that there may be a gas leak in the building
> because '4' doesn't mean high or low, and other pins said '0' or '1'. It
> turns out, '4' is the function selection for the pinmux of the gpio and
> not the value on the pin. Reading code helps decipher what debugfs is
> actually saying.
>
> Add support to read the input or output pin depending on how the pin is
> configured so we can easily see the high or low value of the pin in
> debugfs. Now the output looks like
>
>  gpio93  : in   low  func4 2mA pull down
>
> which clearly shows that the pin is an input, low, with function 4 and a
> 2mA drive strength plus a pull down.
>
> Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
> Cc: Alexandru M Stan <amstan@xxxxxxxxxxxx>
> Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>

Patch applied with some fuzzing. Please check the result!

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux