All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: oskar.andero@sonyericsson.com
Cc: Jonathan Cameron <jic23@kernel.org>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"aghayal@codeaurora.org" <aghayal@codeaurora.org>,
	"Cavin, Courtney" <Courtney.Cavin@sonyericsson.com>
Subject: Re: [PATCH] input: add driver support for Sharp gp2ap002a00f proximity sensor
Date: Fri, 11 Nov 2011 09:57:18 +0000	[thread overview]
Message-ID: <4EBCF17E.9070601@cam.ac.uk> (raw)
In-Reply-To: <20111111090616.GA9307@caracas.corpusers.net>

On 11/11/2011 09:06 AM, oskar.andero@sonyericsson.com wrote:
> 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.
> 
Fair enough.  I'm personally a  bit unclear what the advantage in doing
it this way is rather than just putting the string in directly but it
isn't important!
> I'll prepare v2 based on the rest of your comments!
> 
> Thanks!
> 
> -Oskar


  reply	other threads:[~2011-11-11  9:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 16:07 [PATCH] input: add driver support for Sharp gp2ap002a00f proximity sensor oskar.andero
2011-11-10 16:07 ` oskar.andero
2011-11-10 18:22 ` Jonathan Cameron
2011-11-11  9:06   ` oskar.andero
2011-11-11  9:57     ` Jonathan Cameron [this message]
2011-11-10 18:38 ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EBCF17E.9070601@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=Courtney.Cavin@sonyericsson.com \
    --cc=aghayal@codeaurora.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oskar.andero@sonyericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.