lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200902082153.30479.david-b@pacbell.net>
Date:	Sun, 8 Feb 2009 21:53:30 -0800
From:	David Brownell <david-b@...bell.net>
To:	Joonyoung Shim <dofmind@...il.com>
Cc:	linux-arm-kernel@...ts.arm.linux.org.uk,
	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
	Tony Lindgren <tony@...mide.com>, kyungmin.park@...sung.com
Subject: Re: [PATCH] OMAP3 GPIO: Fix getting the value of the GPIO output pin

On Sunday 08 February 2009, Joonyoung Shim wrote:
> > Which should clearly be AE6_34XX_GPIO141_OUT since it does
> > not enable the input driver.  Try making that ...PIN_OUTPUT
> > read ...PIN_INPUT and see if things behave.
> 
> Of course, it will be better if the name is clear as AE6_34XX_GPIO141_OUT.
> but, the core of this problem is not it, the chip->get() called in
> gpiolib_dbg_show()
> of drivers/gpio/gpiolib.c or dbg_gpio_show() of arch/arm/plat-omap/gpio.c
> can return the wrong value when gpio pin is configured as an output.

No, the core of the problem is that you're using a GPIO
which is explicitly configured as output-only ... but are
treating it as if it were a normal bi-directional GPIO.

It's acting *exactly* right for an output-only GPIO.  But
that's not the behavior you expect, or want.

If you weren't disabling the input driver, then when you
ask for the input value it would work as you expect.  Which
is why I suggested you change how that ball is configured.
(That's actually a bugfix to those muxing tables ...)

- Dave

p.s. This specific confusion is new on OMAP3; previous
     OMAPs didn't have the extra byte of options to
     configure.  The PIN_INPUT flag was, on previous
     chips, effectively hard-wired on for GPIOs.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ