[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZC+hvChpDMasj0avRTTbprVn8ro7NxywNUPw+SOr10bw@mail.gmail.com>
Date: Tue, 12 Nov 2013 20:59:21 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Magnus Damm <magnus.damm@...il.com>,
Paul Mundt <lethal@...ux-sh.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
Grant Likely <grant.likely@...retlab.ca>,
Simon Horman <horms@...ge.net.au>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Alexandre Courbot <acourbot@...dia.com>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] gpio: Renesas RZ GPIO driver
On Thu, Nov 7, 2013 at 12:47 AM, Magnus Damm <magnus.damm@...il.com> wrote:
> From: Magnus Damm <damm@...nsource.se>
>
> This patch adds a GPIO driver for the RZ series of SoCs from
> Renesas. The driver can be used as platform device with dynamic
> or static GPIO assignment or via DT using dynamic GPIOs.
So given that this is for a new system which should only ever
be booted using device tree, why are we bothering with supporting
platform data passing at all?
Is it so that arch/sh is more soft on this for example...?
Can some arch maintainer like SH/Paul ACK this approach?
Read: SH is not moving to device tree...?
(...)
> Tested with yet-to-be-posted platform device and DT devices on
> r7s72100 and Genmai using LEDs, DIP switches and I2C bitbang.
Do you think the maintainers will merge the platform
device approach?
> --- /dev/null
> +++ work/include/linux/platform_data/gpio-rz.h 2013-11-06 14:18:46.000000000 +0900
> @@ -0,0 +1,13 @@
> +#ifndef __GPIO_RZ_H__
> +#define __GPIO_RZ_H__
> +
> +struct gpio_rz_config {
> + int gpio_base;
Passing these static base offsets around is not good for the
kernel and we're trying to get rid of it :-(
> + const char *pctl_name;
Ho hum... This needs some kerneldoc describing that this is
used to map the GPIO range to the right pin controller.
> +};
> +
> +#define RZ_GPIOS_PER_PORT 16
This is only used in the driver so move it into the driver.
> +#define RZ_PORT_PIN(bank, pin) (((bank) * RZ_GPIOS_PER_PORT) + (pin))
This is not used anywhere so delete it.
If it is to be kept I'd like "pin" replaced with "line" to avoid
confusion with the pin control business.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists