aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/light/cm3323.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-08-22iio:light: drop assign iio_info.driver_module and iio_trigger_ops.ownerJonathan Cameron1-1/+0
The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
2015-07-20Merge 4.2-rc3 into staging-nextGreg Kroah-Hartman1-1/+1
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 Knaack1-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>
2015-06-21iio:light:cm3323: make use of GENMASKHartmut Knaack1-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>
2015-06-21iio:light:cm3323: replace unneeded variableHartmut Knaack1-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>
2015-06-21iio:light:cm3323: pass up error valueHartmut Knaack1-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>
2015-06-21iio:light:cm3323: clear bitmask before setHartmut Knaack1-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>
2015-03-15iio: light: Add support for Capella CM3323 color sensorDaniel Baluta1-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>