Re: question about hwo to fit in an ALS driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 02.09.2010 00:52, schrieb Rhyland Klein:
I am looking into submitting a sensor driver for the isl29018 ambient
light sensor (als). I noticed there is an old isl als driver for a
different part (isl29003) in drivers/misc but I also see the light
sensor driver for tsl2653 in the drivers/staging/iio/light directory
which seems much more like the correct place for this type of sensor
driver to reside.

Is this subsystem designed for ALS drivers or a different type of
light sensor?

It's designed for all kind of sensors. Of course not all are supported properly yet.

If it should support ALS drivers, I don't know how the
IIO_DEV* attributes should map for this. I suppose it would just use
the IIO_DEV_ATTR_LIGHT_VISIBLE for the lux, which could work, except
that the isl29018 also functions as a proximity sensor, and the
driver will support both modes.  What is the proper way to fit a
driver like this into the iio subsystem?

> One thing to note is that there are additional properties other than
> just reporting the lux that will need to be supported including
> changing the mode and setting the range, and I am not sure how these
> should fit into the device attribute framework exposed via light.h.

When you have attributes that fit into the current scheme, use these.
When you have additional attributes that might be useful for other sensors, make a name proposal. When you have attributes, like mode, that are device specific, use IIO_DEVICE_ATTR(_name, _mode, _show, _store, _addr) and put in a proper name.


Regards,
--
Dipl.-Inf. Manuel Stahl
Fraunhofer-Institut für Integrierte Schaltungen IIS
- Leistungsoptimierte Systeme -
Nordostpark 93                Telefon  +49 (0)911/58061-6419
90411 Nürnberg                Fax      +49 (0)911/58061-6398
http://www.iis.fraunhofer.de  manuel.stahl@xxxxxxxxxxxxxxxxx
begin:vcard
fn:Manuel Stahl
n:Stahl;Manuel
email;internet:manuel.stahl@xxxxxxxxxxxxxxxxx
tel;work:+49 911 58061-6419
x-mozilla-html:FALSE
version:2.1
end:vcard


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux