public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Vikram Narayanan <vikram186@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] imx25: Move MXC_GPIO_PORT_TO_NUM to imx-regs.h
Date: Mon, 11 Jun 2012 20:30:29 +0530	[thread overview]
Message-ID: <4FD6080D.1050509@gmail.com> (raw)
In-Reply-To: <CAOMZO5CG8xv=CO5n3nGD+K7OMJsntqPcCkWxxJ=+a3gj0bCEvA@mail.gmail.com>

On 6/10/2012 8:03 PM, Fabio Estevam wrote:
> Hi Vikram,
>
> On Sun, Jun 10, 2012 at 10:02 AM, Vikram Narayanan<vikram186@gmail.com>  wrote:
>
>> +
>> +/* Converts a GPIO port number and the internal bit position
>> + * to the GPIO number
>> + */
>> +#define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1)<<  5) + (bit&  0x1f))
>
> Just a minor comment:
>
> MXC_GPIO_PORT_TO_NUM looks like a very looong string.
>
> Couldn't we use the same macro as in the Linux kernel (IMX_GPIO_NR) instead?
>
> It is more concise and it would nice to have the same macro name for
> kernel and U-boot.
>
> What do you think?

Yes. That should be a better option. I'll go with it.

~Vikram

> Thanks,
>
> Fabio Estevam

  reply	other threads:[~2012-06-11 15:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-10 13:01 [U-Boot] imx: gpio cleanups Vikram Narayanan
2012-06-10 13:02 ` [U-Boot] [PATCH 1/3] imx25: Move MXC_GPIO_PORT_TO_NUM to imx-regs.h Vikram Narayanan
2012-06-10 14:33   ` Fabio Estevam
2012-06-11 15:00     ` Vikram Narayanan [this message]
2012-06-11 19:56       ` Troy Kisky
2012-06-10 15:03   ` Fabio Estevam
2012-06-11 15:02     ` Vikram Narayanan
2012-06-13 11:37       ` Fabio Estevam
2012-06-15 14:55         ` Stefano Babic
2012-06-15 18:10           ` Vikram Narayanan
2012-06-15 18:13             ` Fabio Estevam
2012-06-10 13:03 ` [U-Boot] [PATCH 2/3] tx25: Use generic gpio_* calls Vikram Narayanan
2012-06-10 14:38   ` Fabio Estevam
2012-06-11 14:58     ` Vikram Narayanan
2012-06-11 15:01       ` Fabio Estevam
2012-06-10 13:04 ` [U-Boot] [PATCH 3/3] imx: Define a common header file for gpio.h Vikram Narayanan
2012-06-10 13:06 ` [U-Boot] imx: gpio cleanups Vikram Narayanan

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=4FD6080D.1050509@gmail.com \
    --to=vikram186@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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