isl29028_write_raw() contains unnecessary parenthesis when checking to
see if the passed in lux scale is valid. This patch removes the
unnecessary parenthesis.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
stage for faster resume times from runtime power
management if the user is only querying the proximity sensor.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b
renames that function to isl29028_clear_configure_reg() since it is
now used in several places.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 118 ---
1 file changed, 110 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/iio/light
stage for faster resume times from the runtime power
management if the user is only querying the ALS/IR sensor.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b
ssary.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light/isl29028.c
index be1fc4a..e93077b 100644
--- a/drivers/staging/iio/light/isl29028.c
+++ b/dr
Add and remove newlines to improve code readability in preparation for
moving the driver out of staging.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 33 -
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/drivers/staging
The #define ISL29028_DEV_ATTR was not used so this patch removes the
unnecessary code.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light/isl29028.c
index
On Sat, Jan 21, 2017 at 02:58:12PM +, Jonathan Cameron wrote:
> On 17/01/17 09:25, Brian Masney wrote:
> > This patch adds runtime power management support to the isl29028 driver.
> > It defaults to powering off the device after two second
resume to go through the runtime power management.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light/isl29028.c
index b63fdf70..ddd604d 10
instead of the expected 400ms value. This patch changes
the 3 supported sampling frequency to 2 so that the proximity sleep
time of 400ms can be used.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
When proximity is enabled in isl29028_enable_proximity(), the function
msleep() is called with the sampling frequency, which is not correct.
This patch changes the code to sleep the specified amount of time listed
in the datasheet instead.
Signed-off-by: Brian Masney
---
drivers/staging/iio
This driver in some cases can busy wait for upwards of 100 ms. Since the
kernel at this point is not running in atomic context, and is running in
process context, we can safely use msleep() instead. This patch changes
the two occurrences of mdelay() to msleep().
Signed-off-by: Brian Masney
Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.
Signed-off-by: Brian Masney
---
drivers/iio/light/Kconfig | 10 ++
drivers/iio/light/Makefile | 1 +
drivers/{staging => }/iio/light/isl29028.c | 0
drivers/staging/iio/li
Add Brian Masney's copyright to the header for the several rounds of
staging cleanups that has been done to this driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/iio/light/isl29028.c
b/dr
Add entry for the in_proximity_sampling_frequency_available sysfs
entry to the existing sampling_frequency_available ABI documentation.
Signed-off-by: Brian Masney
---
Documentation/ABI/testing/sysfs-bus-iio | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/ABI/testing/sysfs-bus
creen that the IR LED
turns on for two seconds when the proximity sensing feature is enabled.
Brian Masney (7):
staging: iio: isl29028: change mdelay() to msleep()
staging: iio: isl29028: fix incorrect sleep time when taking proximity
reading
staging: iio: isl29028: fix incorrect sam
This is hopefully the last of the changes that are needed to move
this driver out of staging.
Datasheet:
http://www.intersil.com/content/dam/Intersil/documents/isl2/isl29028.pdf
Changes since v1:
- in_proximity_sampling_frequency_available sysfs attribute now shows
decimals.
Brian Masney (2
Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.
Signed-off-by: Brian Masney
---
drivers/iio/light/Kconfig | 10 ++
drivers/iio/light/Makefile | 1 +
drivers/{staging => }/iio/light/isl29028.c | 0
drivers/staging/iio/li
will still be selected.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light/isl29028.c
index 5375e7a..c1d6540 100644
--- a/drivers/staging/iio
On Sun, Feb 12, 2017 at 05:55:34AM -0500, Brian Masney wrote:
> Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.
>
> Signed-off-by: Brian Masney
Sorry, Jonathan, I forgot to run git format-patch with --no-renames and
didn't realize until the emails went out.
Address warning from checkpatch:
CHECK: Alignment should match open parenthesis
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/light/isl29018.c
b/drivers/staging/iio/light
Address warning from checkpatch:
CHECK: Do not include the paragraph about writing to the Free Software
Foundation's mailing address from the sample GPL notice. The FSF has
changed addresses in the past, and may do so again. Linux already
includes a copy of the GPL.
Signed-off-by: Brian M
function.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/iio/light/isl29018.c
b/drivers/staging/iio/light/isl29018.c
index ad282f1..0a35588 100644
--- a/drivers/staging/iio/light
Removes unused variable and associated #defines that was found using
make W=1.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/drivers/staging/iio/light/isl29018.c
b/drivers/staging/iio/light/isl29018.c
index
Fixes warning found by make W=2:
warning: comparison between signed and unsigned integer expressions
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/iio/light/isl29018.c
b
: Brian Masney
---
include/linux/iio/sysfs.h | 13 +
1 file changed, 13 insertions(+)
diff --git a/include/linux/iio/sysfs.h b/include/linux/iio/sysfs.h
index 9cd8f74..f7c6431 100644
--- a/include/linux/iio/sysfs.h
+++ b/include/linux/iio/sysfs.h
@@ -59,6 +59,19 @@ struct iio_const_attr
Use the IIO_DEVICE_ATTR_RO and IIO_DEVICE_ATTR_RW macros to
create the device attributes.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 33 +++--
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/iio/light
Use the IIO_DEVICE_ATTR_RO and IIO_DEVICE_ATTR_RW macros to
create the device attributes.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 33 +++--
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/iio/light
include/linux/sysfs.h.
Signed-off-by: Brian Masney
---
include/linux/iio/sysfs.h | 24
1 file changed, 24 insertions(+)
diff --git a/include/linux/iio/sysfs.h b/include/linux/iio/sysfs.h
index 9cd8f74..ce9426c 100644
--- a/include/linux/iio/sysfs.h
+++ b/include/linux/iio
When the chip is in a suspended state, isl29018_read_raw() will return
-EBUSY. Change the function so that it only has a single exit point.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers
include/linux/sysfs.h.
Signed-off-by: Brian Masney
---
This is the same version of this patch that I sent out on Sunday. I am
resending the patch set since my the second patch in that series would
not apply cleanly to iio.git/testing.
include/linux/iio/sysfs.h | 24
1 file
Add a check to isl29018_write_raw() to ensure that the chip is not in a
suspended state. This makes the code consistent with what is present
in isl29018_read_raw().
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion
Use the IIO_DEVICE_ATTR_RO and IIO_DEVICE_ATTR_RW macros to
create the device attributes.
Signed-off-by: Brian Masney
---
This version of the patch now applies cleanly to the iio.git/testing
branch.
drivers/staging/iio/light/isl29018.c | 33 +++--
1 file changed, 15
raw() locks a
mutex specific to this driver when the integration time variable is
updated.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/iio/light/isl29018.c
b/drivers/staging/iio/light/isl29018.c
index 19f2
On Sat, Oct 01, 2016 at 02:59:49PM +0100, Jonathan Cameron wrote:
> On 27/09/16 01:20, Brian Masney wrote:
> > Add a check to isl29018_write_raw() to ensure that the chip is not in a
> > suspended state. This makes the code consistent with what is present
> >
Add documentation from the ISL29018 Data Sheet (FN6619.4, Oct 8, 2012)
about the infrared suppression that can be controlled
with the proximity_on_chip_ambient_infrared_suppression sysfs attribute.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 18 ++
1
Rename CONFIG_SENSORS_ISL29018 to CONFIG_ISL29018 for consistency with
the other light drivers in mainline.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/Kconfig | 2 +-
drivers/staging/iio/light/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a
Move ISL29018/ISL29023/ISL29035 driver out of staging into mainline.
Signed-off-by: Brian Masney
---
drivers/iio/light/Kconfig| 12 +
drivers/iio/light/Makefile | 1 +
drivers/iio/light/isl29018.c | 847 +++
drivers/staging/iio
RNING: DT compatible string "isil,isl29035" appears un-documented --
check ./Documentation/devicetree/bindings/
Signed-off-by: Brian Masney
---
.../devicetree/bindings/iio/light/isl29018.txt | 28 ++
1 file changed, 28 insertions(+)
create mode 100644 Documentation
On Sun, Oct 09, 2016 at 10:45:12AM +0100, Jonathan Cameron wrote:
> On 07/10/16 01:48, Brian Masney wrote:
> > Move ISL29018/ISL29023/ISL29035 driver out of staging into mainline.
> >
> > Signed-off-by: Brian Masney
> Time for a nitpick tastic review ;)
>
> The n
Add newlines to improve code readability in preparation for moving the
driver out of staging.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/staging/iio/light/isl29018.c
b/drivers/staging/iio/light/isl29018
Use the return value from isl29018_set_integration_time() as the return
value for isl29018_chip_init() since this is the last piece of work
inside that function.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions
Change multiline comments from:
/* line1
* line2
* ...
*/
to
/*
* line1
* line2
* ...
*/
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/light/isl29018.c
b/drivers
This is a series of cleanup patches to the ISL29018/ISL29023/ISL29035
driver to move it out of staging based on feedback from Jonathan
Cameron.
Brian Masney (8):
staging: iio: isl29018: add newlines to improve readability
staging: iio: isl29018: remove poorly named function
staging: iio
isl29035_detect() did not do chip detection. Move functionality directly
into isl29018_chip_init() to avoid naming confusion.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 44
1 file changed, 19 insertions(+), 25 deletions(-)
diff
Rename description from "ISL 29018" to "Intersil 29018" in Kconfig for
consistency with other drivers in mainline.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/ligh
Move ISL29018/ISL29023/ISL29035 driver out of staging into mainline.
Signed-off-by: Brian Masney
---
drivers/iio/light/Kconfig| 12 +
drivers/iio/light/Makefile | 1 +
drivers/iio/light/isl29018.c | 847 +++
drivers/staging/iio
Remove blank line between MODULE_DEVICE_TABLE() and its corresponding
structure for consistency with the other device table entries.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29018.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/iio/light/isl29018.c
b
Add ABI documentation from the ISL29018 Data Sheet (FN6619.4, Oct 8,
2012) about the infrared suppression that can be controlled
with the proximity_on_chip_ambient_infrared_suppression sysfs attribute.
Signed-off-by: Brian Masney
---
.../ABI/testing/sysfs-bus-iio-light-isl29018 | 19
On Sat, Oct 15, 2016 at 04:15:57PM +0100, Jonathan Cameron wrote:
> On 10/10/16 08:20, Brian Masney wrote:
> > Move ISL29018/ISL29023/ISL29035 driver out of staging into mainline.
> >
> > Signed-off-by: Brian Masney
> Applied to the togreg branch of iio.git and pushed
ith mutex_lock().
Signed-off-by: Brian Masney
---
This is the most controversial change in my patch set. There are two
other possible solutions that I could envision to work around this
issue:
1) Return -EBUSY and make the caller responsible for backing off
2) Change this driver to use RCU instead
The return values from taos_chip_on() and taos_chip_off() was not
checked in several places. This patch adds proper error checking to
these function calls.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 25 ++---
1 file changed, 18 insertions(+), 7
The sysfs attributes modifies variables that are accessed elsewhere when
a mutex is locked. Add locking to the sysfs *_store() functions to avoid
a possible race condition when measurements are taken.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 24
Change the following functions to only have a single exit point:
taos_i2c_read(), taos_als_calibrate(), taos_chip_on(),
taos_gain_store(), taos_gain_available_show(), taos_luxtable_store()
and taos_probe().
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 96
Use the DEVICE_ATTR_RO, IIO_DEVICE_ATTR_RW, and IIO_DEVICE_ATTR_WO
macros to create the device attributes.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 117 ++--
1 file changed, 57 insertions(+), 60 deletions(-)
diff --git a/drivers
taos_gain_store() and taos_als_calibrate() both have a code path where
-1 was returned. This patch changes the code so that a proper error code
is returned to make the code consistent with the error paths that are
present within those same functions.
Signed-off-by: Brian Masney
---
drivers
. This patch changes these three functions to
return -EINVAL when invalid input is passed in.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers
On Wed, Oct 19, 2016 at 02:08:59PM +0300, Dan Carpenter wrote:
> On Wed, Oct 19, 2016 at 06:32:05AM -0400, Brian Masney wrote:
> > Change the following functions to only have a single exit point:
> > taos_i2c_read(), taos_als_calibrate(), taos_chip_on(),
>
On Wed, Oct 19, 2016 at 02:22:49PM +0300, Dan Carpenter wrote:
> On Wed, Oct 19, 2016 at 06:32:08AM -0400, Brian Masney wrote:
> > @@ -775,14 +778,20 @@ static ssize_t illuminance0_lux_table_store(struct
> > device *dev,
> > goto luxable_store_done;
> >
On Wed, Oct 19, 2016 at 12:47:13PM +0200, Peter Meerwald-Stadler wrote:
>
> > Use the DEVICE_ATTR_RO, IIO_DEVICE_ATTR_RW, and IIO_DEVICE_ATTR_WO
> > macros to create the device attributes.
>
> great that you work on cleaning this up!
>
> the patch does a bit more than is claimed, it also renames
On Wed, Oct 19, 2016 at 02:26:27PM +0300, Dan Carpenter wrote:
> What does illuminance0_ mean? Can we remove that?
I left the names of the existing sysfs attributes intact to not break
any existing users of the driver. I'm not sure why the original author
named it that way.
Brian
__
Add device tree support for the tsl2583 IIO driver with no custom
properties.
Signed-off-by: Brian Masney
---
.../devicetree/bindings/iio/light/tsl2583.txt | 26 ++
drivers/staging/iio/light/tsl2583.c| 13 +++
2 files changed, 39 insertions
taos_i2c_read() and taos_als_calibrate() does not check to see if the
value returned by i2c_smbus_read_byte() was an error code. This patch
adds the appropriate error handling.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 22 +-
1 file changed, 21
taos_als_calibrate() has a code path where -1 is returned. This patch
changes the code so that a proper error code is returned.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/light
change, this sysfs entry will have its prefix changed
from illuminance0_ to in_illuminance_.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 89 +++--
1 file changed, 25 insertions(+), 64 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583
The return value from taos_chip_on() and taos_chip_off() was not
checked in taos_luxtable_store() and taos_probe(). This patch adds
proper error checking to these function calls.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 26 ++
1 file changed
.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 31 ---
1 file changed, 31 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
index 47fd373..f8ccb4d 100644
--- a/drivers/staging/iio/light/tsl2583.c
in_illuminance_. This is deemed to be acceptable
since none of the IIO light drivers in mainline use the illuminance0_
prefix, however 8 of the IIO light drivers in mainline use the
in_illuminance_ prefix.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 236
22:29 of_node ->
../../../../../../../firmware/devicetree/base/soc/i2c@7e804000/tsl2581@29/
drwxr-xr-x 2 root root0 Oct 27 22:29 power/
lrwxrwxrwx 1 root root0 Oct 27 22:29 subsystem ->
../../../../../../../bus/iio/
-rw-r--r-- 1 root root 4096 Oct 27 22:23 uevent
Brian Masney (10):
-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
index 1462374..98afa5b 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b
locking to these sysfs attributes.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
index 98afa5b..49b19f5 100644
--- a
entries were prefixed with illuminance0_, however
they are now prefixed with in_illuminance_ to make these sysfs entries
consistent with how the IIO core is creating the other sysfs entries.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 73
On Sun, Oct 30, 2016 at 06:37:40PM +, Jonathan Cameron wrote:
> On 28/10/16 11:00, Brian Masney wrote:
> > The illuminance0_calibscale sysfs attribute is not currently created by
> > the IIO core. This patch adds the appropriate mask to iio_chan_spec,
> > along with
Raspberry Pi 2.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
index 709f446..7fb09c6 100644
--- a/drivers/staging/iio/light
in_illuminance_calibrate_store() did not check to see if the chip is
suspended. This patch adds the proper check. The return value from
taos_als_calibrate() was also not checked in this function, so the
proper check was also added while changes are being made here.
Signed-off-by: Brian Masney
in taos_defaults()
The comments in taos_defaults() appear after the line of code
that they apply to. This patch moves the comments so that they appear
before the code. Some of the comments were updated to be more
informative.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c
the calls to taos_chip_off() and taos_chip_on()
in in_illuminance_lux_table_store().
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
index
ing a TSL2581
hooked up to a Raspberry Pi 2.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 37 +
1 file changed, 13 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
still functions correctly using a TSL2581
hooked up to a Raspberry Pi 2.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
ING: Unsigned
expression compared with zero: reg_val < 0
drivers/staging/iio/light/tsl2583.c:388:5-12: WARNING: Unsigned
expression compared with zero: reg_val < 0
This also removes the need for the taos_i2c_read() function since all
callers were only calling the function with a length of 1.
S
.
Brian Masney (9):
staging: iio: tsl2583: i2c_smbus_write_byte() / i2c_smbus_read_byte()
migration
staging: iio: tsl2583: removed unused code from device probing
staging: iio: tsl2583: fixed ordering of comments
staging: iio: tsl2583: remove redundant power off sequence in
.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
index 8c8361d..e80c027 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging/iio
the new
functions mentioned above.
Previously, the current chip state was represented as a tristate
(working, suspended, and unknown). The unknown state was not used. The
chip state is now represented with a single boolean value (suspended).
Signed-off-by: Brian Masney
---
drivers/staging/iio
On Sun, Nov 06, 2016 at 12:03:53PM +, Jonathan Cameron wrote:
> On 03/11/16 12:56, Brian Masney wrote:
> > When updating the in_illuminance_calibscale and
> > in_illuminance_integration_time sysfs attributes, these values were not
> > actually written to the chip. The c
Add and remove newlines to improve code readability in preparation for
moving the driver out of staging.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b
Most of the values in the #defines have their values aligned on a single
column, but some do not. This changes the remaining defines to use
consistent alignment with the majority to improve code readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 10 +-
1
when these sysfs
attributes are updated. The chip initialization also calls these these
new functions.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 85 +++--
1 file changed, 52 insertions(+), 33 deletions(-)
diff --git a/drivers/staging/iio
to a per device lux table.
- Combined redundant sysfs ABI documentation
- Made log messages clearer
- Code style and formatting cleanups
- Staging graduation
I verified that the driver functions correctly using a TSL2581 hooked up
to a Raspberry Pi 2.
Brian Masney (23):
staging: iio: tsl2583
.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
index 9880e41..0f5f544 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging
Address warning from checkpatch:
CHECK: Do not include the paragraph about writing to the Free Software
Foundation's mailing address from the sample GPL notice. The FSF has
changed addresses in the past, and may do so again. Linux already
includes a copy of the GPL.
Signed-off-by: Brian M
taos_get_lux checks to see if the chip is in a working state. This
check is not necessary since it is only called from tsl2583_read_raw
and in_illuminance_calibrate_store (via taos_als_calibrate). The chip
state is already checked by these functions.
Signed-off-by: Brian Masney
---
drivers
in_illuminance_calibrate_store() did not check to see if the chip is
suspended. This patch adds the proper check. The return value from
taos_als_calibrate() was also not checked in this function, so the
proper check was also added while changes are being made here.
Signed-off-by: Brian Masney
changed.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 51 ++---
1 file changed, 30 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
index a03f845..c797ab0 100644
--- a
already powered on.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/staging/iio/light/tsl2583.c
index 2a3db3f..3be2213 100644
--- a/drivers/staging
Fixed warning found by make W=2:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583
part of a larger refactor that was split up to
make the code review easier.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 122 +---
1 file changed, 58 insertions(+), 64 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/dr
Added Brian Masney's copyright to the header and to the MODULE_AUTHOR
for all of the staging cleanups that has been done to this driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/stagin
in_illuminance_lux_table_store assumes that an unsigned int is 32 bits.
Replace this with sizeof(unsigned int).
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers
There are two separate files describing the tsl2583 sysfs attributes.
Combine the two files into one. Updated the name of the sysfs attributes
to match the current ABI.
Signed-off-by: Brian Masney
Suggested-by: Peter Meerwald-Stadler
---
.../Documentation/light/sysfs-bus-iio-light-tsl2583
Some functions and variables were prefixed with either taos, tsl258x or
tsl2583. Change everything to use the tsl2583 prefix since that is the
name of the .c file. The taos_settings member inside the taos_settings
struct was renamed to als_settings.
Signed-off-by: Brian Masney
---
drivers
101 - 200 of 320 matches
Mail list logo