Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Brownell
Date: Friday, November 30, 2007 - 1:59 pm

On Friday 30 November 2007, Jean Delvare wrote:

I thought that would make sense too! :)  Someone would need to
write the code though.  Having such a mechanism would provide
another "carrot" to migrate folk towards the gpiolib core.

I think adding a gpiochip primitive to mark a (potential) GPIO
as invalid would support the converse of /sys/kernel/debug/gpio.
Invalid GPIOs include pins set up for non-GPIO usage (like being
used for MMC or MII), or not wired up on a given board.  Pins
that were valid as GPIOs and not requested by a kernel driver
might reasonably be managed by userspace code.



I expect it will become a lot more common.  Remember that legacy
I2C drivers *couldn't* get any board-specific config data; that's
been problematic, since it meant the drivers themselves ended up
with lots of board-specific cruft.   That prevented many drivers
from going upstream at all.  (As I mentioned about pcf8574 code,
although in that case the problem was worsened by lack of any
reusable kernel interface for such GPIO signals.)



Could be.  Right now we have three "GPIO expander" drivers using
the new "gpiolib" framework:  pcf875x and pca9539 for I2C, and
mcp23s08 for SPI.  There are many more that *could* be used with
Linux boxes.  And there are other drivers/XYZ directories that
are (currently) that small.  Maybe gpiolib should go upstream
like that, and lib/gpiolib should be in drivers/gpio too...

However, keep in mind that lots of chips export a few GPIOs but
don't have that as their core functionality ... one example is
the drivers/i2c/chips/tps65010 driver.  So it'd never be the
case that GPIO drivers only live in that directory.

- Dave
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch/rfc 2/4] pcf875x I2C GPIO expander driver, David Brownell, (Mon Oct 29, 6:51 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Nov 30, 5:32 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Bill Gatliff, (Fri Nov 30, 6:04 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Nov 30, 6:36 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Bill Gatliff, (Fri Nov 30, 7:09 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, David Brownell, (Fri Nov 30, 11:40 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Nov 30, 1:13 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, David Brownell, (Fri Nov 30, 1:59 pm)
Re: [patch/rfc 2/4] pcf857x I2C GPIO expander driver, David Brownell, (Wed Dec 5, 8:03 pm)
Re: [patch/rfc 2/4] pcf857x I2C GPIO expander driver, Jean Delvare, (Thu Dec 6, 4:17 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Trent Piepho, (Thu Apr 3, 7:06 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Ben Nizette, (Thu Apr 3, 7:45 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Trent Piepho, (Thu Apr 3, 8:33 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Ben Nizette, (Thu Apr 3, 9:57 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Apr 4, 1:09 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Trent Piepho, (Fri Apr 4, 12:07 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Apr 4, 12:36 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Trent Piepho, (Fri Apr 4, 1:18 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, David Brownell, (Fri Apr 4, 7:51 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, David Brownell, (Fri Apr 4, 7:53 pm)