Commit graph

5 commits

Author SHA1 Message Date
Crestez Dan Leonard 06ad7ea10e max44000: Initial triggered buffer support
Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-24 10:24:08 +01:00
Crestez Dan Leonard d5d8f49b63 max44000: Expose ambient sensor scaling
This patch exposes ALSTIM as illuminance_integration_time and ALSPGA as
illuminance_scale.

Changing ALSTIM also changes the number of bits available in the data
register. This is handled inside raw value reading because:
* It's very easy to shift a few bits
* It allows SCALE and INT_TIME to be completely independent controls
* Buffer support requires constant scan_type.realbits per-channel

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-24 10:23:02 +01:00
Crestez Dan Leonard 237a378b3b max44000: Support controlling LED current output
This is exposed as an output channel with "led" as an extend_name.

Other sensors also have support for controlling an external LED. It's
not clear that simply exposing an undecorated output channel is the
correct approach.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-24 10:21:32 +01:00
Crestez Dan Leonard 35b651f391 max44000: Initial support for proximity reading
The proximity sensor relies on sending pulses to an external IR led and
it is disabled by default on powerup. The driver will enable it with a
default power setting.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-24 10:12:15 +01:00
Crestez Dan Leonard b9567e6664 max44000: Initial support
This just adds support for reporting illuminance with default settings.

Important default registers are written on probe because the device
otherwise lacks a reset function.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-24 10:06:55 +01:00