mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arve Hjønnevåg" <arve@android.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Daniel Walker <dwalker@codeaurora.org>,
	Pavel Machek <pavel@ucw.cz>, Ryan Mallon <ryan@bluewatersys.com>,
	Iliyan Malchev <malchev@google.com>,
	Brian Swetland <swetland@google.com>,
	kernel list <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: GPIO support for HTC Dream
Date: Mon, 14 Dec 2009 22:40:19 -0800	[thread overview]
Message-ID: <d6200be20912142240q5e7785e6h57fae538a5f4ea4e@mail.gmail.com> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE19090200E9C6@mi8nycmail19.Mi8.com>

On Mon, Dec 14, 2009 at 10:12 AM, H Hartley Sweeten
<hartleys@visionengravers.com> wrote:
> On Monday, December 14, 2009 10:55 AM, Daniel Walker wrote:
>> On Mon, 2009-12-14 at 07:45 +0100, Pavel Machek wrote:
>>> Hi!
>>>
>>>> This looks MUCH better!
>>>
>>> Thanks :-).
>>>
>>>>> arch/arm/Kconfig                     |    1
>>>>> arch/arm/mach-msm/board-dream-gpio.c |  327 +++++++++--------------------------
>>> ...
>>>> 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.
>>>
>>>> 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.

These are board specific gpios. I think it would be less confusing if
the msm gpio support was added first.

-- 
Arve Hjønnevåg

  reply	other threads:[~2009-12-15  6:40 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 10:28 Pavel Machek
2009-12-08 20:22 ` Ryan Mallon
2009-12-08 21:37   ` Pavel Machek
2009-12-08 21:53     ` Ryan Mallon
2009-12-10 16:26       ` Pavel Machek
2009-12-08 21:56     ` Arve Hjønnevåg
2009-12-09 11:32       ` Pavel Machek
2009-12-08 21:46   ` Pavel Machek
2009-12-08 22:03     ` Joe Perches
2009-12-09 11:46       ` Pavel Machek
2009-12-08 22:10     ` Ryan Mallon
2009-12-09 23:40       ` Ryan Mallon
2009-12-10 17:24         ` Pavel Machek
2009-12-10 17:41           ` Mark Brown
2009-12-10 19:49           ` Ryan Mallon
2009-12-10 23:14             ` H Hartley Sweeten
2009-12-11 19:58               ` Pavel Machek
2009-12-11 22:10               ` Pavel Machek
2009-12-11 22:40                 ` Arve Hjønnevåg
2009-12-11 23:12                   ` H Hartley Sweeten
2009-12-16 22:53                     ` Pavel Machek
2009-12-16 23:03                       ` Daniel Walker
2009-12-11 23:04                 ` H Hartley Sweeten
2009-12-14  6:45                   ` Pavel Machek
2009-12-14 17:54                     ` Daniel Walker
2009-12-14 18:12                       ` H Hartley Sweeten
2009-12-15  6:40                         ` Arve Hjønnevåg [this message]
2009-12-15 19:12                           ` Pavel Machek
2009-12-15 20:07                             ` Daniel Walker
2009-12-15 21:21                               ` Pavel Machek
2009-12-15 20:48                         ` Jamie Lokier
2009-12-15 21:07                           ` Brian Swetland
2009-12-14 19:00                     ` H Hartley Sweeten
2009-12-15 19:47                       ` Pavel Machek
2009-12-15 20:15                         ` H Hartley Sweeten
2009-12-15 20:47                           ` Pavel Machek
2009-12-15 21:16                           ` [patch] " Pavel Machek
2009-12-25 17:10                             ` Pavel Machek
2009-12-25 23:49                               ` Daniel Walker
2009-12-26  8:51                                 ` Pavel Machek
2009-12-15 20:24                         ` Ryan Mallon
2009-12-15 20:44                           ` Pavel Machek
2009-12-15  6:48                     ` Arve Hjønnevåg
2009-12-11 23:28                 ` Russell King - ARM Linux
2009-12-11 23:50                   ` H Hartley Sweeten
2009-12-14  6:24                   ` Pavel Machek
2009-12-10 16:57       ` Pavel Machek
2009-12-08 22:45 ` Russell King - ARM Linux
2009-12-09  0:39   ` Arve Hjønnevåg
2009-12-09 11:37     ` Pavel Machek
2009-12-09 11:42       ` Arve Hjønnevåg
2009-12-10 16:27         ` Pavel Machek
2009-12-09 16:18       ` Daniel Walker
2009-12-13 21:29         ` Pavel Machek
2009-12-13 21:38           ` Brian Swetland
2009-12-15 19:09             ` Pavel Machek
2009-12-14 17:40           ` Daniel Walker
2009-12-15 19:10             ` Pavel Machek
2009-12-09 11:41   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6200be20912142240q5e7785e6h57fae538a5f4ea4e@mail.gmail.com \
    --to=arve@android.com \
    --cc=dwalker@codeaurora.org \
    --cc=hartleys@visionengravers.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malchev@google.com \
    --cc=pavel@ucw.cz \
    --cc=ryan@bluewatersys.com \
    --cc=swetland@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®