summaryrefslogtreecommitdiff
path: root/drivers/iio/light/cm3323.c
AgeCommit message (Collapse)Author
2015-07-20Merge 4.2-rc3 into staging-nextGreg Kroah-Hartman
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-21iio:light:cm3323: add empty lines for code structureHartmut Knaack
Add some empty lines to visually separate logical structure blocks, as after if-blocks or before regular returns. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-06-21iio:light:cm3323: make use of GENMASKHartmut Knaack
Use GENMASK to define the integration time bitmask. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-06-21iio:light:cm3323: replace unneeded variableHartmut Knaack
In cm3323_read_raw() i is used as return variable for the integration time index. The also existing return variable ret however is unused in this case, although appropriate. Replace i with ret and drop it. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-06-21iio:light:cm3323: pass up error valueHartmut Knaack
cm3323_get_it_bits() returns a valid error code, so pass it up in cm3323_read_raw(). Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-06-21iio:light:cm3323: clear bitmask before setHartmut Knaack
When setting the bits for integration time, the appropriate bitmask needs to be cleared first. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-15iio: light: Add support for Capella CM3323 color sensorDaniel Baluta
Minimal implementation providing raw light intensity and integration time attribute. Userspace applications can use GREEN channel for raw illuminance readings following this table: Integration Time | G Sensitivity ================================ 40 ms | 0.18 80 ms | 0.09 160 ms | 0.045 320 ms | 0.0225 640 ms | 0.01125 1280 ms | 0.005625 Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>