Linux IIO development
 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 17:12:00 +0200	[thread overview]
Message-ID: <kqf0bq$mar$1@ger.gmane.org> (raw)
In-Reply-To: <51CAFF62.5030707@samsung.com>

On 06/26/2013 04:49 PM, Jacek Anaszewski wrote:
> 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.

I messed up the things - events are considered enabled then.
Interrupts are being generated when converted value exceeds
threshold register value, and thus no interrupt is being
generated when converted value is 0 as in this case it
can't exceed threshold value.
Sorry for making confusion.

Thanks,
Jacek



  reply	other threads:[~2013-06-26 15:12 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
2013-06-26 14:49 ` Jacek Anaszewski
2013-06-26 15:12   ` Jacek Anaszewski [this message]
  -- 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='kqf0bq$mar$1@ger.gmane.org' \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox