lkml.org 
[lkml]   [2011]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] input: add driver support for Sharp gp2ap002a00f proximity sensor
Hi Jonathan,

Thanks for reviewing!

> ALS sensor in input? Please see all the previous discussions about
> this. I'm guessing you are aware of this given you cc'd me though!

Actually, this chip only has a hardwired ALS, meaning nothing is
exposed through the input interfaces.

> Having read driver, this is a proximity switch. Basically it's a button.
> The interface used should reflect this rather than pretending you are
> outputing an ABS value. Hence this one probably does fit squarely in
> input, but that's for Dmitry to comment on.

Yes, I agree.

> Also, irq fields contain irqs not gpios + the two gpio related pdata
> functions need justification.
>
> Various small points inline.

> > --- /dev/null
> > +++ b/include/linux/gp2ap002a00f.h
> > @@ -0,0 +1,13 @@
> > +#ifndef _GP2AP002A00F_H_
> > +#define _GP2AP002A00F_H_
> > +
> What is this doing in the header?
> > +#define GP2A_I2C_NAME "gp2ap002a00f"

This is used for setting up the I2C_BOARD_INFO() in the board file. I
grepped linux/input and found some other drivers doing the same, but if this
is not common practice I can of course move the define to the .c-file.

I'll prepare v2 based on the rest of your comments!

Thanks!

-Oskar


\
 
 \ /
  Last update: 2011-11-11 10:07    [W:0.036 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site