lkml.org 
[lkml]   [2013]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] gpio: Renesas RZ GPIO driver
From
On Thu, Nov 7, 2013 at 12:47 AM, Magnus Damm <magnus.damm@gmail.com> wrote:

> From: Magnus Damm <damm@opensource.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


\
 
 \ /
  Last update: 2013-11-12 21:21    [W:0.122 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site