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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jean Delvare <khali@...>
Cc: David Brownell <david-b@...>, Linux Kernel list <linux-kernel@...>
Date: Friday, April 4, 2008 - 3:07 pm

On Fri, 4 Apr 2008, Jean Delvare wrote:

But it's less efficient!  Will nobody think of the wasted cycles?


I guess I wanted to support the interface of using out or 1 vs in or 0, since
both seemed like the two most obvious ways of setting it.  But direction uses
in/out for output, so that's probably the most obvious single interface.


I thought the gpiolib layer didn't let you read an output, but I see that's
not the case now.  Maybe it's changed since the first revision?  I've changed
this to call gpio_get_value(n) for outputs too.

Though for the MPC8572 GPIO driver I wrote, it doesn't support reading
outputs.  The hardware doesn't allow it (IMHO, a design flaw), and working
around this significantly slows down GPIO functions.  What I'm trying to do
with the GPIO lines is going to be slower than desired no matter how fast I
make the gpio code (which is almost entirely responsible for the final speed),
so slowing down reads by a factor of four or more just to read back outputs
isn't desirable.


I know, but I'm not using modules for the system this is in, so it will never
get called.  What's the point of writing code I'll never use if this isn't
useful for the kernel?


It would be easier to call gpiochip_classdev_register() earlier when the spin
lock is held, but one can't because it could sleep.  The comment was a warning
to anyone who thought they could simplify the logic.


Looks like mailer damage from something, it's correct in my patch file.
--
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, 9:51 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Nov 30, 8:32 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, David Brownell, (Fri Nov 30, 2:40 pm)
Re: [patch/rfc 2/4] pcf857x I2C GPIO expander driver, David Brownell, (Wed Dec 5, 11:03 pm)
Re: [patch/rfc 2/4] pcf857x I2C GPIO expander driver, Jean Delvare, (Thu Dec 6, 7:17 pm)
Re: [patch/rfc 2/4] pcf857x I2C GPIO expander driver, David Brownell, (Fri Dec 7, 12:02 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Nov 30, 4:13 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, David Brownell, (Fri Nov 30, 4:59 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Trent Piepho, (Thu Apr 3, 10:06 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Apr 4, 4:09 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, David Brownell, (Fri Apr 4, 10:53 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Trent Piepho, (Fri Apr 4, 3:07 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, David Brownell, (Fri Apr 4, 10:51 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Apr 4, 3:36 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Trent Piepho, (Fri Apr 4, 4:18 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Ben Nizette, (Thu Apr 3, 10:45 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Trent Piepho, (Thu Apr 3, 11:33 pm)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Ben Nizette, (Fri Apr 4, 12:57 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Bill Gatliff, (Fri Nov 30, 9:04 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Jean Delvare, (Fri Nov 30, 9:36 am)
Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver, Bill Gatliff, (Fri Nov 30, 10:09 am)