All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: linux-iio@vger.kernel.org
Subject: Re: [PATCH/RFC] iio: gp2ap002a00f: Add a driver for the device.
Date: Wed, 26 Jun 2013 16:48:24 +0200	[thread overview]
Message-ID: <51CAFF38.6040506@samsung.com> (raw)
In-Reply-To: <51C58B62.30602@kernel.org>

On 06/22/2013 01:32 PM, Jonathan Cameron wrote:
> Sorry, due to some local email weirdness I don't seem to have an original
> copy of this email, so have grabbed it from marc.info.
> This may mess up the thread handling for others.
>
>> Add a new driver for the ambient light/proximity sensor
>> device. The driver exposes three channels: light_clear
>> light_ir and proximity. It also supports high and low
>> ambient light threshold event and proximity detection
>> event.
>>
> Just to check, are you aware of the drive in drivers/input/misc?

Yes I am aware of it. I even got influenced by it to the extent
that I mistakenly adopted its name for my driver, which should be
gp2ap020a00f. The name will be corrected in the second version
of the patch. The gp2ap002a00f device seems not to have too much
in common with gp2ap020a00f.

> A few comments from a somewhat superficial review below.
>
[...]
>> +static const struct iio_chan_spec gp2ap002a00f_channels[] = {
>> +	{
>> +		.type = IIO_LIGHT,
>> +		.channel2 = IIO_MOD_LIGHT_CLEAR,
>> +		.modified = 1,
>> +		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
> Just to confirm, you are providing no means at all of converting
> these channels to any form of standard unit?
> Without the datasheet I can't tell if this is because no conversion
> is provided.

Yes, this is intentional.

[...]
>> +	err = iio_triggered_buffer_setup(indio_dev, NULL,
>> +		&gp2ap002a00f_trigger_handler,&gp2ap002a00f_buffer_setup_ops);
>> +
> So this is a single irq line for events and dataready?
> I can't seem to find a decent datasheet online for this part which is
> always annoying!

The documentation I have for my disposal is confidential.
Yes, there is common interrupt line for events and data ready.
When threshold registers are filled with a value greater than 0
the interrupts are considered enabled. This has also side effect -
no interrupt is being generated when converted value is 0.

Thanks,
Jacek


  reply	other threads:[~2013-06-26 14:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-22 11:32 [PATCH/RFC] iio: gp2ap002a00f: Add a driver for the device Jonathan Cameron
2013-06-26 14:48 ` Jacek Anaszewski [this message]
2013-06-26 14:49 ` Jacek Anaszewski
2013-06-26 15:12   ` Jacek Anaszewski
  -- strict thread matches above, loose matches on Subject: below --
2013-06-17 11:59 [PATCH/RFC] gp2ap002a00f ambient light/proximity sensor Jacek Anaszewski
     [not found] ` <1371470364-14475-2-git-send-email-j.anaszewski@samsung.com>
2013-06-24 17:05   ` [PATCH/RFC] iio: gp2ap002a00f: Add a driver for the device Lars-Peter Clausen

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=51CAFF38.6040506@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=linux-iio@vger.kernel.org \
    /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.