he TSL2X7X_DEF_LUX_TABLE_SZ define instead of using
> the magic number 3. I declared the default tables using that define
> to hopefully signal to future programmers that if they want to use a
> different size they have to update all the related code.
>
> Signed-off-by: Dan Carpente
rove code
readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 183 +---
1 file changed, 85 insertions(+), 98 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio/light/tsl2x7x.c
index d9defc8ece83..e34
The sysfs attributes in_intensity0_thresh_period and
in_proximity0_thresh_period are currently directly created by the driver.
This patch migrates the creation of these sysfs attributes from the driver
to using the IIO core via iio_event_spec.
Signed-off-by: Brian Masney
---
drivers/staging/iio
./in_intensity0_raw
./in_intensity1_raw
./in_proximity0_calibrate
./in_proximity0_raw
./name
./power/autosuspend_delay_ms
./power/control
./power/runtime_active_time
./power/runtime_status
./power/runtime_suspended_time
./uevent
Brian Masney (3):
staging: iio: tsl2x7x: rename tsl2x7x_settings variable to
The driver explicitly creates the in_illuminance0_integration_time sysfs
attribute outside the IIO core. This attribute is available in the IIO
core so this patches migrates the attribute to be created by
the iio_chan_spec.
Signed-off-by: Brian Masney
---
Changes since v1 (Jul 9 2017):
- Use
On Sun, Oct 01, 2017 at 11:14:46AM +0100, Jonathan Cameron wrote:
> On Fri, 29 Sep 2017 21:09:21 -0400
> Brian Masney wrote:
>
> > The sysfs attributes in_intensity0_thresh_period and
> > in_proximity0_thresh_period are currently directly created by the driver.
> &
The structure tsl2x7x_parse_result is not used so this patch removes its
definition.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio/light/tsl2x7x.c
index
The sysfs attribute in_proximity0_calibscale_available is currently
created by using DEVICE_ATTR_RO(). Convert this over to use
IIO_CONST_ATTR().
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff
This patch adds a return_max label for the two cases that need to set
the lux to TSL2X7X_LUX_CALC_OVER_FLOW and return.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/light
The functions tsl2x7x_invoke_change() and tsl2x7x_prox_calculate() are
short enough that the return value and static declaration can be moved
onto the same line with the function name. This patch makes that change
to increase code readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio
variables in order to get the line short
enough.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio/light/tsl2x7x.c
index 6cc89cd6505e
This patch fixes the error 'Unnecessary parentheses around 'XXX' from
checkpatch.pl. It also fixes several other places with unnecessary
parentheses that checkpatch.pl did not detect.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 16
1
Correct the alignment of the break statements to match the alignment of
the rest of the code within the case statements.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/light
tsl2x7x.h has a blank definition for 'struct iio_dev' that is not
needed. This patch removes that definition.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.h
b/drivers/staging
The sysfs attributes in_intensity0_thresh_period and
in_proximity0_thresh_period are currently directly created by the driver.
This patch migrates the creation of these sysfs attributes from the driver
to using the IIO core via iio_event_spec.
Signed-off-by: Brian Masney
---
Changes since v1
n the same column to increase code readability. This patch
also removes the unnecessary parentheses around the value of
TSL2X7X_MAX_TIMER_CNT.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 132 ++--
1 file changed, 66 insertions(+), 66 dele
code cleanups to improve code readability
that will be required for a staging graduation:
- Convert in_proximity0_calibscale_available to IIO_CONST_ATTR
- Remove unused structures
- Sort #includes
- Remove unnecessary parentheses
- Code alignment cleanups
Brian Masney (13):
staging: iio: tsl2x7x
The LED power defines are named like TSL2X7X_mAXXX. Rename these values
to TSL2X7X_XXX_mA to improve code readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/light
length of that sysfs attribute.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 35 ++-
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio/light/tsl2x7x.c
index 88
Sort the #include statements for increased code readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio/light/tsl2x7x.c
index
Hopefully I'll have time to wrap this up next week.
Brian Masney (13):
staging: iio: tsl2x7x: move integration_time* attributes to
IIO_INTENSITY channel
staging: iio: tsl2x7x: use GPL-2.0+ SPDX license identifier
staging: iio: tsl2x7x: don't return error in IRQ handler
s
tsl2x7x_write_interrupt_config() has an unnecessary return value check
at the end of the function. This patch changes the function to just
return the value from the call to tsl2x7x_invoke_change().
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 7 +--
1 file changed
tsl2x7x_event_handler() could return an error and this could cause the
interrupt to remain masked. We shouldn't return an error in the
interrupt handler so this patch always returns IRQ_HANDLED. An error
will be logged if one occurs.
Signed-off-by: Brian Masney
---
drivers/staging/iio/
The summary text for the GPL is not needed since the SPDX identifier
is a legally binding shorthand that can be used instead.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 10 +-
drivers/staging/iio/light/tsl2x7x.h | 14 +-
2 files changed, 2
in_proximity0_calibscale_available
in_proximity0_raw
name
of_node
power
subsystem
uevent
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio/light
This patch renames tsl2x7x_device_id() to tsl2x7x_device_id_verif(),
removes the unnecessary pointer on the id parameter, and only calls
the verification function once.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 11 +--
1 file changed, 5 insertions(+), 6
The power and diode defines are needed for the platform data so this
patch moves the defines out of the .c file and into the header file. A
comment for the diode is also cleaned up while this code is touched.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 12
for some existing structure members.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 59 +
drivers/staging/iio/light/tsl2x7x.h | 48 +++---
2 files changed, 51 insertions(+), 56 deletions(-)
diff --git a/drivers
This patch changes the defaults of the als_time, prox_time and
wait_time to match the defaults according to the TSL2772 datasheet.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio
tsl2x7x_suspend() and tsl2x7x_resume() both check to see what the
current chip status is. These checks are not necessary so this patch
removes those checks.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 16 ++--
1 file changed, 2 insertions(+), 14 deletions
. This patch removes the
tsl2x7x_clear_interrupts() function and replaces the two callers
with the i2c_smbus_write_byte() call instead.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 32 +++-
1 file changed, 15 insertions(+), 17 deletions(-)
diff
rx_gain is corrected to prox_gain so that
it matches what is actually in the structure.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 12 ++--
drivers/staging/iio/light/tsl2x7x.h | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging
als_prox_config since ALS settings can
be stored here as well.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 7 ---
drivers/staging/iio/light/tsl2x7x.h | 5 +++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b
The sysfs attributes in_illuminance0_target_input,
in_illuminance0_calibrate, and in_proximity0_calibrate did not have
proper range checking in place so this patch adds the correct range
checks.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 25
On Sat, Apr 21, 2018 at 05:16:38PM +0100, Jonathan Cameron wrote:
> On Fri, 20 Apr 2018 20:41:42 -0400
> Brian Masney wrote:
>
> > The summary text for the GPL is not needed since the SPDX identifier
> > is a legally binding shorthand that can be used instead.
> >
The summary text for the GPL is not needed since the SPDX identifier
is a legally binding shorthand that can be used instead.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 11 +--
drivers/staging/iio/light/tsl2x7x.h | 15 +--
2 files changed, 2
IIO_CONST_ATTR. The following device datasheets
were checked: tsl2571, tsl2771, tmd2771, tsl2572, tsl2772, tmd2772.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 46 -
1 file changed, 4 insertions(+), 42 deletions(-)
diff --git a/drivers
info structure members.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 130 +++-
1 file changed, 112 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio/light/tsl2x7x.c
index b4d77f65ca12
.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio/light/tsl2x7x.c
index 7e8db5178a2c..9aee04fb4168 100644
--- a/drivers/staging/iio
The sysfs attributes in_illuminance0_target_input,
in_illuminance0_calibrate, and in_proximity0_calibrate did not have
proper range checking in place so this patch adds the correct range
checks.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 28
-
https://ams.com/eng/content/download/250283/976077/file/TMD2771_DS000177_2-00.pdf
- https://ams.com/eng/content/download/365023/1210677/file/TMD2772-E.pdf
Brian Masney (11):
staging: iio: tsl2x7x: use GPL-2.0+ SPDX license identifier
staging: iio: tsl2x7x: add range checking to three sysfs
The driver assumed that the ALS increment was 2.72 ms, and the upper
range was 696 ms. Some other supported devices use 2.73 ms - 699 ms.
This patch adds support for the multiple ranges.
Signed-off-by: Brian Masney
---
I debated whether or not this change should even be included. I feel
pretty
Move the tsl2772 driver out of staging and into mainline.
Signed-off-by: Brian Masney
---
drivers/iio/light/Kconfig | 8
drivers/iio/light/Makefile | 1 +
drivers/{staging => }/iio/light/tsl2772.c |
This patch adds the device IDs to the device_channel_config array to
improve code readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b
went above 3.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 44 +
drivers/staging/iio/light/tsl2x7x.h | 1 -
2 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio
https://en.wikipedia.org/wiki/Lux.
The driver was primarily tested using a TSL2772, however some quick tests
were also ran against the devices TSL2771, TSL2572, and TMD2772.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 174
drivers/stagi
.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/Kconfig | 2 +-
drivers/staging/iio/light/Makefile | 2 +-
drivers/staging/iio/light/{tsl2x7x.c => tsl2772.c} | 691 +++--
drivers/staging/iio/light/{tsl2x7x.h => tsl2772.h} | 48
light intensity in (lux) and proximity
* detection (prox) for the TAOS TSL2571, TSL2671, TMD2671, TSL2771, TMD2771,
* TSL2572, TSL2672, TMD2672, TSL2772, and TMD2772 devices.
*
* Copyright (c) 2012, TAOS Corporation.
* Copyright (c) 2017-2018 Brian Masney
*/
#include
#include
#include
#in
supported devices use 2.73 ms - 699 ms.
This patch adds support for the multiple ranges.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 93 ++---
1 file changed, 76 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
_3-00.pdf
-
https://ams.com/eng/content/download/250283/976077/file/TMD2771_DS000177_2-00.pdf
- https://ams.com/eng/content/download/365023/1210677/file/TMD2772-E.pdf
Brian Masney (9):
staging: iio: tsl2x7x: remove unnecessary whitespace
staging: iio: tsl2x7x: use direct returns
staging
This patch removes unnecessary whitespace in preparation for moving this
driver out of staging.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 22 +++---
drivers/staging/iio/light/tsl2x7x.h | 1 -
2 files changed, 11 insertions(+), 12 deletions(-)
diff
The CALIBBIAS and INT_TIME masks in tsl2x7x_write_raw did not have any
range checking in place so this patch adds the appropriate range
checking. The defines TSL2X7X_ALS_GAIN_TRIM_{MIN,MAX} are also
introduced by this patch.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c
-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio/light/tsl2x7x.c
index c1e726fc87b7..f5ca5ada0358 100644
--- a/drivers/staging/iio/light/tsl2x7x.c
+++ b
This patch changes the functions tsl2x7x_read_event_value() and
tsl2x7x_read_raw() to use direct returns to simplify the code.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 49 -
1 file changed, 16 insertions(+), 33 deletions(-)
diff
went above 3.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 44 +
drivers/staging/iio/light/tsl2x7x.h | 1 -
2 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c
b/drivers/staging/iio
This patch creates a macro that populates the tsl2X7X_device_info
structure to reduce duplicated code in the driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 61 ++---
1 file changed, 16 insertions(+), 45 deletions(-)
diff --git a
.
This patch also adds Brian Masney's copyright to tsl2772.h for all of
the work that has been done to move this driver out of staging.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/Kconfig | 2 +-
drivers/staging/iio/light/Makefile | 2 +-
dr
Move the tsl2772 driver out of staging and into mainline.
Signed-off-by: Brian Masney
---
drivers/iio/light/Kconfig | 8
drivers/iio/light/Makefile | 1 +
drivers/{staging => }/iio/light/tsl2772.c |
On Thu, May 10, 2018 at 08:12:23PM -0400, Brian Masney wrote:
> Move the tsl2772 driver out of staging and into mainline.
Hey Jonathan,
Here is the .c and .h file to make your review easier. Thanks for all
your feedback on all of these changes to this driver plus the other 3
that I've
On Sat, May 12, 2018 at 12:44:37PM +0100, Jonathan Cameron wrote:
> On Thu, 10 May 2018 20:32:06 -0400
> Brian Masney wrote:
>
> > On Thu, May 10, 2018 at 08:12:23PM -0400, Brian Masney wrote:
> > > Move the tsl2772 driver out of staging and into mainline.
> >
&
to you
on this driver. I got side tracked with other projects.
Brian Masney (2):
staging: iio: isl29028: correct proximity sleep times
staging: iio: isl29028: move out of staging
drivers/iio/light/Kconfig| 10 +
drivers/iio/light/Makefile | 1 +
drivers/iio/light
the _available sysfs attribute.
The original code showed the value 83 that corresponds to the sleep
time 12 ms. The data sheet actually lists 12.5 ms as the sleep time,
so the proximity frequency was updated to 80.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 70
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/iio/light/isl29028.c | 723 +++
drivers/staging/iio
On Fri, Apr 28, 2017 at 05:55:58PM +0200, Sebastian Reichel wrote:
> isl29030 is basically the same chip. The only difference
> is the chip's first pin. For isl29028 its named ADDR0 and
> can be used to change the chip's i2c address. For isl29030
> on the other hand that pin is named Ials and is an
This patch renames the tsl2x7x_core.c file to tsl2x7x.c so that the
naming convention is consistent with other IIO light drivers outside
of staging.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/Makefile | 2 +-
drivers/staging/iio/light/{tsl2x7x_core.c
There is a tsl2x7x.h header that is only used by tsl2x7x.c. This patch
moves the contents of the header file into the C code with the driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2x7x.c | 76 ++-
drivers/staging/iio/light/tsl2x7x.h | 100
The two patches in this series begin my work to move this driver out
of staging. Before I start working on the meat of the changes that
are necessary for a staging graduation, I want to get these two
trivial patches out and merged first in case there are any concerns
with these changes.
Brian
On Sat, May 20, 2017 at 06:55:02PM +0100, Jonathan Cameron wrote:
> On 19/05/17 10:37, surenderpols...@gmail.com wrote:
> >From: Surender Polsani
> >
> >Fixed the following checkpatch.pl warnings:
> >octal permissions are more preferable than symbolic permissions
> >
> >Replaced DEVICE_ATTR family
On Mon, Jun 05, 2017 at 08:24:44PM +1000, Tobin C. Harding wrote:
> On Mon, Jun 05, 2017 at 09:22:12AM +0200, Wolfram Sang wrote:
> > Tobin,
> >
> > > My question is should I be digging further into the MMC code or be doing
> > > something else with the driver code?
> >
> > So, you haven't found
: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 30 ++
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light/isl29028.c
index aa413e5..4e35d00 100644
--- a/drivers/staging/iio/light
isl29028_enable_proximity() has a boolean argument named enable. This
function is only called once and the enable flag is set to true in that
call. This patch removes the enable parameter from that function.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 10 --
1
The alignment of the #defines at the top of the file is not consistent.
This changes all of the defines to use consistent alignment to improve
the code readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 42 ++--
1 file changed, 21
This patch adds power management support to the isl29028 driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 59
1 file changed, 59 insertions(+)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light
g. Looking through the data sheet, and the git commits since
the driver was first introduced into staging, everything in the driver
looks correct so I think this is operator error on my part.
Brian Masney (19):
staging: iio: isl29028: remove nested if statements
staging: iio: isl29028: remove enable
The alignment of the variables in the struct isl29028_chip is not
consistent. This changes all of the variables to use consistent
alignment to improve the code readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 10 +-
1 file changed, 5 insertions(+), 5
isl29028_chip_init_and_power_on().
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 42 +++-
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light/isl29028.c
index c8e234d
When isl29028_set_proxim_sampling() fails, it was up to both callers to
log the failure message. This patch moves the logging into
isl29028_set_proxim_sampling() to reduce the overall amount of code in
the driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 28
Two separate calls to regmap_update_bits() in isl29028_set_als_scale()
and isl29028_set_als_ir_mode() did not have their function arguments
on the next line aligned correctly to the open parenthesis. This patch
corrects the alignment.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light
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 3f01ad1..bda5183 100644
--- a/drivers/staging/iio/light/isl29028.c
+++ b/dr
pport
this binding indefinitely.
Signed-off-by: Brian Masney
Cc: devicet...@vger.kernel.org
Cc: Rob Herring
Cc: Mark Rutland
---
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
ind
Fixed warning found by make W=2 to reduce the amount of build noise:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
When isl29028_set_als_scale() fails, it was up to both callers to log
the failure message. This patch moves the logging into
isl29028_set_als_scale() to reduce the overall amount of code in the
driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 23
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
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 | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/iio
If the call to isl29028_chip_init_and_power_on() in isl29028_probe()
fails, then isl29028_probe() will log an error message. All of the
error paths in that call path already have error logging in place. This
patch removes the unnecessary logging.
Signed-off-by: Brian Masney
---
drivers/staging
-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 22 --
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light/isl29028.c
index 38027ee..fa2b283 100644
--- a/drivers/staging/iio/light
The wording and style of the different error messages was not
consistent. This patches makes the wording and style consistent
throughout the driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 56
1 file changed, 32 insertions
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
-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light/isl29028.c
index 0e727ba..218d165 100644
--- a/drivers/staging/iio/light/isl29028.c
+++ b
On Mon, Dec 05, 2016 at 11:53:39PM +0300, Dan Carpenter wrote:
> On Sat, Dec 03, 2016 at 09:19:36PM -0500, Brian Masney wrote:
> > Fixed warning found by make W=2 to reduce the amount of build noise:
> >
> > warning: comparison between signed and unsigned integer expression
On Sun, Dec 04, 2016 at 11:16:04AM +, Jonathan Cameron wrote:
> On 04/12/16 02:19, Brian Masney wrote:
> > isl29028_enable_proximity() has a boolean argument named enable. This
> > function is only called once and the enable flag is set to true in that
> > call. This pat
When isl29028_set_als_scale() fails, it was up to both callers to log
the failure message. This patch moves the logging into
isl29028_set_als_scale() to reduce the overall amount of code in the
driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 27
-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 22 --
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/iio/light/isl29028.c
b/drivers/staging/iio/light/isl29028.c
index 74eb736..a13c8db 100644
--- a/drivers/staging/iio/light
nable
flag from isl29028_enable_proximity(). I think that we can apply
that patch now that the driver has runtime power management support.
- Suggestions from Dan Carpenter
- Dropped v1 patch #12 (fix comparison between signed and unsigned
integers)
Brian Masney (15):
staging: iio: isl
Two separate calls to regmap_update_bits() in isl29028_set_als_scale()
and isl29028_set_als_ir_mode() did not have their function arguments
on the next line aligned correctly to the open parenthesis. This patch
corrects the alignment.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light
If the call to isl29028_chip_init_and_power_on() in isl29028_probe()
fails, then isl29028_probe() will log an error message. All of the
error paths in that call path already have error logging in place. This
patch removes the unnecessary logging.
Signed-off-by: Brian Masney
---
drivers/staging
isl29028_enable_proximity() has a boolean argument named enable. This
function is only called once and the enable flag is set to true in that
call. This patch removes the enable parameter from that function.
Signed-off-by: Brian Masney
---
The device gets runtime power management support in the
The wording and style of the different error messages was not
consistent. This patch makes the wording and style consistent
throughout the driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 56
1 file changed, 32 insertions(+), 24
When isl29028_set_proxim_sampling() fails, it was up to both callers to
log the failure message. This patch moves the logging into
isl29028_set_proxim_sampling() to reduce the overall amount of code in
the driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 31
The alignment of the variables in the struct isl29028_chip is not
consistent. This changes all of the variables to use consistent
alignment to improve the code readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/isl29028.c | 10 +-
1 file changed, 5 insertions(+), 5
1 - 100 of 320 matches
Mail list logo