lkml.org 
[lkml]   [2009]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] rtc-v3020: add ability to access v3020 chip with GPIOs
Date
On Monday 02 March 2009, Mike Rapoport wrote:
> +
> +#define V3020_CS       0
> +#define V3020_WR       1
> +#define V3020_RD       2
> +#define V3020_IO       3
> +
> +struct v3020_gpio {
> +       const char *name;
> +       unsigned int gpio;
> +};
> +

> +static struct v3020_gpio v3020_gpio[] = {
> +       { "RTC CS", 0 },
> +       { "RTC WR", 0 },
> +       { "RTC RD", 0 },
> +       { "RTC IO", 0 },
> +};

After Andrew's fault path cleanup it looks OK, but I see
no point to that GPIO struct with the name. You know the
name based on the position, if you ever need one. Take
that away, and you can add my ack.


Also, best not to have a single static struct; there's
no need to add a driver restriction that there be only
one of these chips in a system.

- Dave



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-03-03 22:11    [W:0.091 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site