lkml.org 
[lkml]   [2013]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cw1200: fix some obvious mistakes
On Sun, Jun 02, 2013 at 08:29:54AM -0400, Solomon Peachy wrote:
> > * Add comments about passing GPIO numbers in platform_data:
> > You should not use IORESOURCE_IO, which is for legacy ISA
> > I/O ports on PCs, not for GPIOs.
>
> Fair enough. The use of resources was something already in the driver
> when I inherited it, but I've seen this pattern a lot elsewhere. Is
> there a specific driver I should reference instead?

Reading linux/ioport.h I don't see a type that seems to be a better fit.
It's not MEM, REG, IRQ, DMA, or BUS. IO seems to be the only type that
fits.

The reason the driver uses struct resources instead of straight-up
numeric GPIO fields is for the 'name' field in the resources.

Given that the use of platform_data pretty much makes it impossible to
have more than one of these devices in a system at a time, there doesn't
seem to be a point to using named resources.

So I'll change these resource lists to using straight-up ints.

- Solomon
--
Solomon Peachy pizza at shaftnet dot org
Delray Beach, FL ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum viditur.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-06-02 16:01    [W:0.124 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site