linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Bakker <xc-racer2@live.ca>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Paweł Chmiel" <pawel.mikolaj.chmiel@gmail.com>
Cc: "robh+dt@kernel.org" <robh+dt@kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"mchehab+samsung@kernel.org" <mchehab+samsung@kernel.org>,
	"colyli@suse.de" <colyli@suse.de>,
	"ckeepax@opensource.wolfsonmicro.com"
	<ckeepax@opensource.wolfsonmicro.com>,
	"andrew.smirnov@gmail.com" <andrew.smirnov@gmail.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"xiaotong.lu@spreadtrum.com" <xiaotong.lu@spreadtrum.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 4/4] dt-bindings: input: Add documentation for gp2a sensor
Date: Sat, 26 Jan 2019 03:14:14 +0000	[thread overview]
Message-ID: <BYAPR02MB54959FD8A7CF5977B0D4B5B7A3940@BYAPR02MB5495.namprd02.prod.outlook.com> (raw)
In-Reply-To: <20190126013237.GF212026@dtor-ws>

Hi Dmitry,

Thanks for your review of the patches.

Considering that the light sensor part should be in IIO, should the entire driver be rewritten as an IIO driver?  There's already the driver for gp2ap020a00f there which is presumably the gp2ap002a00f's successor and does the same functions.

On 2019-01-25 5:32 p.m., Dmitry Torokhov wrote:
> On Fri, Jan 25, 2019 at 06:50:45PM +0100, Paweł Chmiel wrote:
>> From: Jonathan Bakker <xc-racer2@live.ca>
>>
>> This commit adds documentation for Sharp GP2AP002A00F.
>> It's Proximity/Opto Sensor connected over i2c.
>>
>> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
>> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
>> ---
>>  .../bindings/input/sharp,gp2ap002a00f.txt     | 29 +++++++++++++++++++
>>  1 file changed, 29 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/input/sharp,gp2ap002a00f.txt
>>
>> diff --git a/Documentation/devicetree/bindings/input/sharp,gp2ap002a00f.txt b/Documentation/devicetree/bindings/input/sharp,gp2ap002a00f.txt
>> new file mode 100644
>> index 000000000000..c524eb7d3d60
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/input/sharp,gp2ap002a00f.txt
>> @@ -0,0 +1,29 @@
>> +* Sharp GP2AP002A00F I2C Proximity/Opto Sensor
>> +
>> +Required properties:
>> +- compatible : Should be "sharp,gp2ap002a00f"
>> +- reg : The I2C address of the sensor
>> +- vout-gpio : The gpio connected to the vout pin
> 
> Do you know what it is for?
> 
It's the control of the main power supply to the chip.
>> +- interrupt-parent : should be the phandle for the interrupt controller
>> +- interrupts : Interrupt mapping for GPIO IRQ, it should by configured with
>> +		flags IRQ_TYPE_EDGE_BOTH
>> +
>> +Optional properties:
>> +- wakeup : If the device is capable of waking up the system
>> +- io-channels : Phandle to an ADC channel connected to the light sensor
>> +- io-channel-names = "light";
>> +- poll-interval : Poll interval time in milliseconds, default 500ms
>> +- light-adc-max : Maximum light value reported, default 4096
>> +- light-adc-fuzz : Fuzz value for reported light value, default 80
>> +
>> +Example:
>> +
>> +gp2a@44 {
>> +	compatible = "sharp,gp2ap002a00f";
>> +	reg = <0x44>;
>> +	vout-gpio = <&gph0 2 GPIO_ACTIVE_HIGH>;
>> +	interrupt-parent = <&gph0>;
>> +	interrupts = <2 IRQ_TYPE_EDGE_BOTH>;
>> +	io-channels = <&adc 9>;
>> +	io-channel-names = "light";
>> +};
>> -- 
>> 2.17.1
>>
> 
Thanks,
Jonathan

  reply	other threads:[~2019-01-26  3:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 17:50 [PATCH 0/4] input: misc: gp2a: Add device tree support Paweł Chmiel
2019-01-25 17:50 ` [PATCH 1/4] input: misc: gp2a: Use managed resource helpers Paweł Chmiel
2019-01-26  1:17   ` Dmitry Torokhov
2019-01-25 17:50 ` [PATCH 2/4] input: misc: gp2a: Add support for light sensor Paweł Chmiel
2019-01-26  1:18   ` Dmitry Torokhov
2019-01-25 17:50 ` [PATCH 3/4] input: misc: gp2a: Enable device tree Paweł Chmiel
2019-01-25 17:50 ` [PATCH 4/4] dt-bindings: input: Add documentation for gp2a sensor Paweł Chmiel
2019-01-26  1:32   ` Dmitry Torokhov
2019-01-26  3:14     ` Jonathan Bakker [this message]
2019-01-28 19:30       ` 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=BYAPR02MB54959FD8A7CF5977B0D4B5B7A3940@BYAPR02MB5495.namprd02.prod.outlook.com \
    --to=xc-racer2@live.ca \
    --cc=andrew.smirnov@gmail.com \
    --cc=arnd@arndb.de \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=colyli@suse.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=pawel.mikolaj.chmiel@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=xiaotong.lu@spreadtrum.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).