All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org, omaplinuxkernel@gmail.com, lars@metafoo.de
Subject: Re: [PATCH v3] iio: add vcnl4000 combined ALS and proximity sensor
Date: Mon, 18 Jun 2012 08:38:04 +0100	[thread overview]
Message-ID: <4FDEDADC.4030704@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.01.1206171500540.8174@pmeerw.net>

On 6/17/2012 2:18 PM, Peter Meerwald wrote:
> Hello,
>
>> Couple of nitpicks inline.  My biggest question about
>> this driver is why are you submitting it to staging?
>> Can't see any reason it can't go directly into drivers/iio/light.
> thank you for reviewing; reason for staging is that I consider the driver
> incomplete because IR current control and proximity thresholding/event
> handling is missing -- I plan to add these as soon as I have figured out
> how to do that properly in IIO; I moved the driver out of staging
> nevertheless
cool.  I'm keen to move everything we possibly can out of staging
(when ready!) to make for a vaguely sensible bit of code management in
the long run.
>
>>> +config SENSORS_VCNL4000
>>> +	tristate "VCNL4000 combined ALS and proximity sensor"
>> How did we end up with that SENSORS prefix.  I think it might be a legacy of
>> a few drivers that were intially submitted to hwmon and moved here.
>> Probably best to drop it.
> drivers/iio/light/Kconfig has CONFIG_SENSORS_LM3533
> drivers/staging/iio/light/Kconfig has 3x CONFIG_SENSORS, 2x CONFIG_
> drivers/staging/iio/magnetometer has CONFIG_SENSORS_
>
> hwmon/ and misc/ uses CONFIG_SENSORS; I wonder how many sensor drivers do
> not fly SENSORS_?
The misc ones are mostly drivers that were initially submitted to hwmon (or
I guess have copied the sensors bit off drivers that were.)  Same is true of
the ones in IIO.
>
> patch to remove SENSORS_ for IIO is following
Be careful with this one, whilst it would be nice, it may break lots of 
peoples config
files.  Probably best to leave be for existing drivers.
>
>>> +		.type = IIO_INTENSITY,
>>> +		.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
>>> +			IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
>> IIO_INTENSITY was originally introduced because we had a set of light sensors
>> where their was no simple relationship between them and anything in SI units.
>> If we can convert to illuminance as here via a simple scaling and offset
>> then I'd be tempted to make this IIO_LIGHT (and hence illuminance_raw)
>> with illuminance_scale and illuminance_offset
> I have switched it to IIO_LIGHT, I was taking the conservative route with
> IIO_INTENSITY; I have to trust the data sheet...
Don't we all from time to time. Sometimes they are even right!
>
> regards, p.
>


      reply	other threads:[~2012-06-18  7:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 20:23 [PATCH v3] iio: add vcnl4000 combined ALS and proximity sensor Peter Meerwald
2012-06-15 13:01 ` Jonathan Cameron
2012-06-17 13:18   ` Peter Meerwald
2012-06-18  7:38     ` Jonathan Cameron [this message]

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=4FDEDADC.4030704@kernel.org \
    --to=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=omaplinuxkernel@gmail.com \
    --cc=pmeerw@pmeerw.net \
    /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.