linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: cbouatmailru@gmail.com (Anton Vorontsov)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/5] gemini: convert to basic-mmio-gpio
Date: Tue, 12 Apr 2011 18:37:14 +0400	[thread overview]
Message-ID: <20110412143714.GA8931@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <1302522502-24381-2-git-send-email-jamie@jamieiles.com>

On Mon, Apr 11, 2011 at 12:48:18PM +0100, Jamie Iles wrote:
> The basic-mmio-gpio driver is capable of supporting this controller so
> convert the platform to use it for basic GPIO support.
> 
> Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
[...]
> +#define GPIO_RES(__name, __addr) \
> +	{ \
> +		.start = (__addr), \
> +		.end = (__addr) + 0x3, \
> +		.flags = IORESOURCE_MEM, \
> +		.name = #__name, \
> +	}

Btw, how about moving this (repetitive) macro into basic_mmio_gpio.h?

Assuming, that there could be IRQ resources later, making
something like BGPIO_MEM_RES(name, addr, sz)?

Or, even better, some generic shorthand macro in linux/ioport.h?

#define IORES(__type, __name, __addr, __size)	\
	{					\
		.start = (__addr), 		\
		.end = (__addr) + (__size),	\
		.flags = IORESOURCE_##__type, 	\
		.name = #__name, 		\
	}

Would translate to

IORES(MEM, set, GEMINI_GPIO_BASE(i) + GPIO_DATA_SET), 3),
vs.
GPIO_RES(set, GEMINI_GPIO_BASE(i) + GPIO_DATA_SET),

Thanks,

-- 
Anton Vorontsov
Email: cbouatmailru at gmail.com

  reply	other threads:[~2011-04-12 14:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-11 11:48 [RFC PATCH 0/5] Convert some ARM platforms to basic-mmio-gpio Jamie Iles
2011-04-11 11:48 ` [RFC PATCH 1/5] gemini: convert " Jamie Iles
2011-04-12 14:37   ` Anton Vorontsov [this message]
2011-04-12 15:01     ` Jamie Iles
2011-04-13 11:46     ` Sergei Shtylyov
2011-04-11 11:48 ` [RFC PATCH 2/5] sa1100: " Jamie Iles
2011-04-11 16:00   ` Jamie Iles
2011-04-11 11:48 ` [RFC PATCH 3/5] w90x900: " Jamie Iles
2011-04-11 14:27   ` Wan ZongShun
2011-06-10 12:50     ` Jamie Iles
2011-04-11 11:48 ` [RFC PATCH 4/5] iop: " Jamie Iles
2011-04-11 11:48 ` [RFC PATCH 5/5] mxc: " Jamie Iles
2011-04-11 13:43 ` [RFC PATCH 0/5] Convert some ARM platforms " Uwe Kleine-König
2011-04-11 13:52   ` Jamie Iles
2011-04-11 14:23     ` Uwe Kleine-König
2011-04-11 14:33       ` Jamie Iles
2011-04-11 14:49         ` Uwe Kleine-König
2011-04-11 15:13           ` Jamie Iles
2011-04-12 15:06           ` Anton Vorontsov
2011-04-11 15:17 ` Linus Walleij
2011-04-11 15:21   ` Jamie Iles

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=20110412143714.GA8931@oksana.dev.rtsoft.ru \
    --to=cbouatmailru@gmail.com \
    --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).