Thread (59 messages) 59 messages, 10 authors, 2009-12-26

GPIO support for HTC Dream

flat view

From: H Hartley Sweeten <hidden>
Date: 2009-12-14 18:12:34
Also in: lkml

On Monday, December 14, 2009 10:55 AM, Daniel Walker wrote:
On Mon, 2009-12-14 at 07:45 +0100, Pavel Machek wrote:
quoted
Hi!
quoted
This looks MUCH better!
Thanks :-).
quoted
quoted
arch/arm/Kconfig                     |    1
arch/arm/mach-msm/board-dream-gpio.c |  327 +++++++++--------------------------
...
quoted
Please update (or remove) this diffstat.  It no longer matches the patch.
I was just showing differences to _previous_ version, not what I was sending.
quoted
Ok.  The hardware still seems a bit strange. Is there any datasheet
available?
I don't think there is one. Daniel, can you help here?
I don't know if there is one or not (I'd guess not).. I can't release
documents, but I could try to address specific questions or find people
to answer specific questions.
Hello Daniel,

My specific question was about the gpio hardware registers.
From Pavel's implementation it appears that the gpio's are organized as a
number of 8-bit ports.  Each of these ports only have one 8-bit register.
Writing a '1' to a bit in the register makes the associated pin a high-level
output.  Writing a '0' makes the pin a low-level output or an input pin.
Reading the port at this point will return the actual 'input' level of the pin.

The hardware seems a bit strange and I just wanted to verify that this is
correct.  If it is, this would explain the need to keep the 'shadow' contents
of the port in order to set the 'direction' of a pin.

I was also wondering if the initial 'shadow' value needs to be written to the
port at init in order to correctly establish the output value for specific
pins.

One other thing.  Are the gpio's handled by Pavel's driver actually from the
MSM chip or from an external CPLD?  The registers are all defined as:

+		.reg = reg_num + DREAM_CPLD_BASE,

If they are external from the MSM chip this driver should probably be renamed
to something more appropriate since it is probably dream specific and not
generic to the msm architecture.

Thanks for the help,
Hartley
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help