summaryrefslogtreecommitdiffstats
path: root/drivers/iio/light/cm3323.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge 4.2-rc3 into staging-nextGreg Kroah-Hartman2015-07-201-1/+1
|\ | | | | | | | | | | We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * iio:light:cm3323: clear bitmask before setHartmut Knaack2015-06-211-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | iio:light:cm3323: add empty lines for code structureHartmut Knaack2015-06-211-0/+5
| | | | | | | | | | | | | | | | | | 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>
* | iio:light:cm3323: make use of GENMASKHartmut Knaack2015-06-211-1/+1
| | | | | | | | | | | | | | 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>
* | iio:light:cm3323: replace unneeded variableHartmut Knaack2015-06-211-6/+6
| | | | | | | | | | | | | | | | | | | | 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>
* | iio:light:cm3323: pass up error valueHartmut Knaack2015-06-211-1/+1
|/ | | | | | | | | 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>
* iio: light: Add support for Capella CM3323 color sensorDaniel Baluta2015-03-151-0/+286
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>