2005-12-21 11:10:42

by Ivan Korzakow

[permalink] [raw]
Subject: GPIO device class driver

Hi,
I read about a generic device class driver
(http://marc.theaimsgroup.com/?l=linux-kernel&m=109419719600753&w=2)
for GPIO. I wanted to know if anything generic finally came out of the
dicussion ?
I'm willing to write a gpio driver and I am considering taking Robert
Schwebel patch into it if nothing exist in the main line.

Thanks in advance for any info.

Ivan


2005-12-21 11:49:24

by Robert Schwebel

[permalink] [raw]
Subject: Re: GPIO device class driver

Ivan,

On Wed, Dec 21, 2005 at 12:07:27PM +0100, Ivan Korzakow wrote:
> I read about a generic device class driver (http://marc.theaimsgroup.com/?l=
> linux-kernel&m=109419719600753&w=2) for GPIO. I wanted to know if anything
> generic finally came out of the dicussion ?
> I'm willing to write a gpio driver and I am considering taking Robert Schwebel
> patch into it if nothing exist in the main line.

As far as I know there is nothing new available yet; the LED framework
people have don some things, but it should be "above" GPIO. This morning
we have discussed serveral things which could be improved in our code;
if you are interested I'll keep you informed about the progress.

Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9

2006-02-01 07:00:30

by Kumar Gala

[permalink] [raw]
Subject: Re: GPIO device class driver


On Dec 21, 2005, at 5:50 AM, Robert Schwebel wrote:

> Ivan,
>
> On Wed, Dec 21, 2005 at 12:07:27PM +0100, Ivan Korzakow wrote:
>> I read about a generic device class driver (http://
>> marc.theaimsgroup.com/?l=
>> linux-kernel&m=109419719600753&w=2) for GPIO. I wanted to know if
>> anything
>> generic finally came out of the dicussion ?
>> I'm willing to write a gpio driver and I am considering taking
>> Robert Schwebel
>> patch into it if nothing exist in the main line.
>
> As far as I know there is nothing new available yet; the LED framework
> people have don some things, but it should be "above" GPIO. This
> morning
> we have discussed serveral things which could be improved in our code;
> if you are interested I'll keep you informed about the progress.
>
> Robert

Any further progress on this. I'm looking at the GPIO's on an
embedded PowerPC and would prefer to produce a driver towards a
standard kernel interface. I'm also happy to help on the standard
interface if it needs some work.

- kumar

2006-02-01 07:07:07

by Robert Schwebel

[permalink] [raw]
Subject: Re: GPIO device class driver

On Wed, Feb 01, 2006 at 01:00:27AM -0600, Kumar Gala wrote:
> Any further progress on this. I'm looking at the GPIO's on an
> embedded PowerPC and would prefer to produce a driver towards a
> standard kernel interface. I'm also happy to help on the standard
> interface if it needs some work.

Sorry, no progress so far on our side.

Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9

2006-02-01 08:43:34

by Ivan Korzakow

[permalink] [raw]
Subject: Re: GPIO device class driver

2006/2/1, Robert Schwebel <[email protected]>:
> On Wed, Feb 01, 2006 at 01:00:27AM -0600, Kumar Gala wrote:
> > Any further progress on this. I'm looking at the GPIO's on an
> > embedded PowerPC and would prefer to produce a driver towards a
> > standard kernel interface. I'm also happy to help on the standard
> > interface if it needs some work.
>
> Sorry, no progress so far on our side.
>

Hi,

I worked on a GPIO driver, starting from the work of Robert Schwebel.
I wrote something that suited my needs, but I kept in mind the idea of
a generic layer. It's worth what it's worth, but i'm sending it in
case it might help someone.
Basically I nearly didn't touch the sysfs part of Robert's driver. I
added the possibility to register a block of GPIO pins, and to handle
interrupts. The platform specific layer registers itself with this
generic layer and passes all the required platform dependant functions
and parameters through a struct.
Attached is the generic layer gpio.c and I moved the header in
include/linux/gpio.h
Feel free to comment, criticize, reject :-)

Ivan


Attachments:
(No filename) (1.06 kB)
gpio.tgz (5.74 kB)
Download all attachments

2006-02-02 17:30:30

by Kumar Gala

[permalink] [raw]
Subject: Re: GPIO device class driver

On Wed, 1 Feb 2006, Robert Schwebel wrote:

> On Wed, Feb 01, 2006 at 01:00:27AM -0600, Kumar Gala wrote:
> > Any further progress on this. I'm looking at the GPIO's on an
> > embedded PowerPC and would prefer to produce a driver towards a
> > standard kernel interface. I'm also happy to help on the standard
> > interface if it needs some work.
>
> Sorry, no progress so far on our side.

Is there a list of things to do?

- kumar