Thread (32 messages) flat view 32 messages, 4 authors, 2011-02-18

Re: [PATCH 5/5] Add chip I2C addresses to header file

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2011-02-04 08:43:53

On Fri, Feb 04, 2011 at 10:37:43AM +0200, Iiro Valkonen wrote:
On 02/03/2011 04:49 PM, Mark Brown wrote:
quoted
On Thu, Feb 03, 2011 at 04:13:09PM +0200, Iiro Valkonen wrote:
quoted
From: Iiro Valkonen <redacted>

Add chip I2C addresses to header file.
Why do this?
To help lazy developers, they don't have to dig up the datasheet to
see what address their chip is at? Well, I guess they might have to do
that anyway to see what address out of these is selected with the
address select pin. I thought it would be neat to have all the
possible addresses listed here, and the developer could pick the
correct one for his/her board file. Or in the case where he is not
sure about the state of the address select pin, maybe even try them
all. 

It does seem to be common practice to have the plain address in the
board file without any defines in the header, so maybe this patch is
not needed.
The headers should carry exported information. I have no problem with
adding register definitions, but data that is not needed for users
should go in .c file.

Thanks.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help