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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Brownell <david-b@...>
Cc: Linux Kernel list <linux-kernel@...>, Felipe Balbi <felipebalbi@...>, Bill Gatliff <bgat@...>, Haavard Skinnemoen <hskinnemoen@...>, Andrew Victor <andrew@...>, Tony Lindgren <tony@...>, eric miao <eric.y.miao@...>, Kevin Hilman <khilman@...>, Paul Mundt <lethal@...>, Ben Dooks <ben@...>
Date: Friday, November 30, 2007 - 8:32 am

Hi David,

Sorry for the late review.

Note that I can't test your code.

On Mon, 29 Oct 2007 18:51:48 -0700, David Brownell wrote:

By now there's also a drivers/i2c/chips/pcf8575.c driver.


How?


Strange name, and I can't make much sense of the description either.


Would make more sense to list setup and teardown before context?

Typo: invalidated.


Typo: initialization.


After reading this paragraph I still have no idea what n_latch does.
But maybe that's just me.


For alphabetical order, it would go one line above.


I recommend spelling out chip names completely, as it lets people grep
the kernel tree for chip names when they look for support.


I suspect that there will be many more such header files in the future.
Would it make sense to move them to include/linux/gpio?


Typo: extra "a".


Useless cast.


!!(value & (1 << offset))
is more efficiently written
(value >> offset) & 1


Useless cast.


It would be more efficient to drop pcf857x_set8 altogether and do
gpio->chip.set = pcf857x_output8.

Many of the comments above apply to the 16-bit functions below as well.


Stray comma.


Useless initialization.


You need to include <linux/slab.h> to have access to this function.


You set status here...


... but overwrite it immediately.


Same problem here.


Might make sense to move this to a common error path, as you do it more
than once.


Why %s instead of hard-coding "teardown"?

Why is this an error message while a failing setup() at initialization
time only deserves a debug message?


No MODULE_AUTHOR? No entry in MAINTAINERS?

-- 
Jean Delvare
-
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)