linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: gbean@codeaurora.org (Gregory Bean)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2 v2] msm: Install the Google-Android gpio driver.
Date: Thu, 02 Sep 2010 12:45:06 -0700	[thread overview]
Message-ID: <4C7FFEC2.2050502@codeaurora.org> (raw)
In-Reply-To: <20100902102752.GB20737@trinity.fluff.org>

>> +#define MSM_GPIO_OUT_0         MSM_GPIO1_REG(0x00)  /* gpio  15-0  */
>> +#define MSM_GPIO_OUT_1         MSM_GPIO2_REG(0x00)  /* gpio  42-16 */
>> +#define MSM_GPIO_OUT_2         MSM_GPIO1_REG(0x04)  /* gpio  67-43 */
>> +#define MSM_GPIO_OUT_3         MSM_GPIO1_REG(0x08)  /* gpio  94-68 */
>> +#define MSM_GPIO_OUT_4         MSM_GPIO1_REG(0x0C)  /* gpio 106-95 */
>> +#define MSM_GPIO_OUT_5         MSM_GPIO1_REG(0x50)  /* gpio 107-121 */
>> +
>> +/* same pin map as above, output enable */
>> +#define MSM_GPIO_OE_0          MSM_GPIO1_REG(0x10)
>> +#define MSM_GPIO_OE_1          MSM_GPIO2_REG(0x08)
>> +#define MSM_GPIO_OE_2          MSM_GPIO1_REG(0x14)
>> +#define MSM_GPIO_OE_3          MSM_GPIO1_REG(0x18)
>> +#define MSM_GPIO_OE_4          MSM_GPIO1_REG(0x1C)
>> +#define MSM_GPIO_OE_5          MSM_GPIO1_REG(0x54)
>
> do we need each and every register defined in the header? would simply
> the base of each gpio bank make this header file much smaller? or
> turn it into MSM_GPIO_OE(x) ?

Unfortunately, the registers are not regularly spaced.  There are small 
sections of regularity, but special cases abound.  I could produce 
macros or functions to calculate them, but I fear that they'd be so full 
of conditionals that the net gain would be negligible, or worse.

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

      reply	other threads:[~2010-09-02 19:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 23:39 [PATCH 1/2 v2] msm: Install the Google-Android gpio driver Gregory Bean
2010-09-01 23:39 ` [PATCH 2/2 v2] msm: gpio: Add gpiomux calls to request and free Gregory Bean
2010-09-01 23:48 ` [PATCH 1/2 v2] msm: Install the Google-Android gpio driver Daniel Walker
2010-09-02 10:27 ` Ben Dooks
2010-09-02 19:45   ` Gregory Bean [this message]

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=4C7FFEC2.2050502@codeaurora.org \
    --to=gbean@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).