Commit graph

35 commits

Author SHA1 Message Date
Uwe Kleine-König
7cf15f4275 iio: Switch i2c drivers back to use .probe()
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230515205048.19561-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2023-05-21 18:54:53 +01:00
Andy Shevchenko
3582a83b1f iio: light: tsl2563: sort header inclusion alphabetically
Sort header inclusion alphabetically.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-10-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:46 +00:00
Andy Shevchenko
571b97fd87 iio: light: tsl2563: Use dev_get_drvdata() directly in PM callbacks
PM callbacks take struct device pointer as a parameter, use
dev_get_drvdata() to retrieve it instead of unneeded double
loop of referencing via i2c_get_clientdata(to_i2c_client(dev)).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-9-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:46 +00:00
Andy Shevchenko
85a6b728ef iio: light: tsl2563: Utilise temporary variable for struct device
We have a temporary variable to keep pointer to struct device.
Utilise it inside the ->probe() implementation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:46 +00:00
Andy Shevchenko
1f5e408f6a iio: light: tsl2563: Drop legacy platform data code
There is no in-kernel user for legacy platform data.
Otherwise, a new one can use software nodes instead.
Hence, drop legacy platform data code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:46 +00:00
Andy Shevchenko
2080c8d346 iio: light: tsl2563: Simplify with dev_err_probe
Code can be a bit simpler with dev_err_probe().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:45 +00:00
Andy Shevchenko
bbabf91991 iio: light: tsl2563: Drop unused defintion(s)
The CALIB_FRAC() is defined and might had been used in
tsl2563_calib_from_sysfs(). But let's just move a comment
from it to the latter function.

CLAIB_FRAC_HALF is used in a single place, i.e. in
tsl2563_calib_to_sysfs(). So, let's just inline it there.

While at it, switch to use DIV_ROUND_CLOSEST().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:45 +00:00
Andy Shevchenko
b90619c4ef iio: light: tsl2563: Make use of the macros from bits.h
Make use of BIT() and GENMASK() where it makes sense.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:45 +00:00
Andy Shevchenko
aca68c0273 iio: light: tsl2563: Configure INT in one place
Introduce tsl2563_configure_irq() to configure INT in one place.

While at it, make use of TSL2563_INT_LEVEL and newly introduced
TSL2563_INT_MASK.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:45 +00:00
Andy Shevchenko
3c183534f2 iio: light: tsl2563: Use i2c_smbus_write_word_data() in tsl2563_configure()
Driver already uses the word accessors when it makes sense, but
in the tsl2563_configure(). Switch the latter to use word accessor.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:45 +00:00
Ferry Toth
027641b52f iio: light: tsl2563: Do not hardcode interrupt trigger type
Instead of hardcoding IRQ trigger type to IRQF_TRIGGER_RAISING,
let's respect the settings specified in the firmware description.
To be compatible with the older firmware descriptions, if trigger
type is not set up there, we'll set it to default (raising edge).

Fixes: 388be48839 ("staging:iio: tsl2563 abi fixes and interrupt handling")
Fixes: bdab100173 ("staging:iio:light:tsl2563 remove old style event registration.")
Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221207190348.9347-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-12-28 17:19:45 +00:00
Uwe Kleine-König
74cd01b3f9 iio: light: tsl2563: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-144-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-11-23 20:20:29 +00:00
Uwe Kleine-König
ed5c2f5fd1 i2c: Make remove callback return void
The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/*
Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5
Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b
Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2022-08-16 12:46:26 +02:00
Tetsuo Handa
dbacf752cd iio:light:tsl2563: Replace cancel_delayed_work() with cancel_delayed_work_sync().
Since cancel_delayed_work(&chip->poweroff_work) does not guarantee that
tsl2563_poweroff_work() is not running, tsl2563_set_power(chip, 0) can be
called from tsl2563_poweroff_work() after tsl2563_get_power(chip) and
tsl2563_set_power(chip, 1) are called. Use _sync version in order to make
sure that tsl2563_poweroff_work() is no longer running.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Link: https://lore.kernel.org/r/041b6745-f784-ff3f-9836-3f4397d35d94@I-love.SAKURA.ne.jp
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-06-18 14:56:25 +01:00
Tetsuo Handa
76faa32077 iio: light: tsl2563: Replace flush_scheduled_work() with cancel_delayed_work_sync().
Commit 9e61d90115 ("iio: light: tsl2563: Remove
flush_scheduled_work") replaced cancel_delayed_work() +
flush_scheduled_work() with cancel_delayed_work_sync() for only
tsl2563_probe() side.

Do the same thing for tsl2563_remove() side, which was added by
commit 388be48839 ("staging:iio: tsl2563 abi fixes and interrupt
handling").

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Link: https://lore.kernel.org/r/3381176e-2f86-24ba-a8ba-c4ce8f416086@I-love.SAKURA.ne.jp
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-06-18 14:51:17 +01:00
Jonathan Cameron
854b67052c iio:light:tsl2563: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
Letting the compiler remove these functions when the kernel is built
without CONFIG_PM_SLEEP support is simpler and less error prone than the
use of #ifdef based config guards.

Removing instances of this approach from IIO also stops them being
copied into new drivers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Vaishnav M A <vaishnav@beagleboard.org>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20220130193147.279148-28-jic23@kernel.org
2022-02-18 11:45:30 +00:00
Vaishnav M A
d884da1a75 iio:light:tsl2563 use generic fw accessors
Replace of_property_read_u32() with device_property_read_u32(),
when reading the amstaos,cover-comp-gain.This opens up the
possibility of passing the properties during platform instantiation
of the device by a suitable populated struct property_entry.
Additionally, a minor change in logic is added to remove the
of_node present check.

Signed-off-by: Vaishnav M A <vaishnav@beagleboard.org>
Link: https://lore.kernel.org/r/20201018203552.GA816421@ubuntu
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-11-01 15:28:55 +00:00
Alexandru Ardelean
d3be83244c iio: remove explicit IIO device parent assignment
This patch applies the semantic patch:
@@
expression I, P, SP;
@@
   I = devm_iio_device_alloc(P, SP);
   ...
-  I->dev.parent = P;

It updates 302 files and does 307 deletions.
This semantic patch also removes some comments like
'/* Establish that the iio_dev is a child of the i2c device */'

But this is is only done in case where the block is left empty.

The patch does not seem to cover all cases. It looks like in some cases a
different variable is used in some cases to assign the parent, but it
points to the same reference.
In other cases, the block covered by ... may be just too big to be covered
by the semantic patch.

However, this looks pretty good as well, as it does cover a big bulk of the
drivers that should remove the parent assignment.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-06-14 11:49:59 +01:00
Alexandru Ardelean
70804e560b iio: light: tsl2563: pass iio device as i2c_client private data
We may want to get rid of the iio_priv_to_dev() helper. That's a bit
uncertain at this point. The reason is that we will hide some of the
members of the iio_dev structure (to prevent drivers from accessing them
directly), and that will also mean hiding the implementation of the
iio_priv_to_dev() helper inside the IIO core.

Hiding the implementation of iio_priv_to_dev() implies that some fast-paths
may not be fast anymore, so a general idea is to try to get rid of the
iio_priv_to_dev() altogether.

For this driver, it implies passing the IIO device on the i2c client
private data. The implementation of iio_priv() will not be affected by the
rework/hiding of iio_priv_to_dev().

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-06-14 11:49:09 +01:00
Nishant Malpani
9fd28570ec iio: light: tsl2563: Rename macro to fix typo
This patch renames macro to fix the following warning generated by
checkpatch.pl:

WARNING: 'DISBLED' may be misspelled - perhaps 'DISABLED'?

Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-03-21 11:12:56 +00:00
Thomas Gleixner
2b27bdcc20 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not write to the free
  software foundation inc 51 franklin st fifth floor boston ma 02110
  1301 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 246 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:07 +02:00
Jonathan Cameron
4166b47c2b iio:light: drop assign iio_info.driver_module and iio_trigger_ops.owner
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>
2017-08-22 21:31:57 +01:00
Akinobu Mita
a3507e48d3 iio: light: tsl2563: use correct event code
The TSL2563 driver provides three iio channels, two of which are raw ADC
channels (channel 0 and channel 1) in the device and the remaining one
is calculated by the two.  The ADC channel 0 only supports programmable
interrupt with threshold settings and this driver supports the event but
the generated event code does not contain the corresponding iio channel
type.

This is going to change userspace ABI.  Hopefully fixing this to be
what it should always have been won't break any userspace code.

Cc: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-06-24 20:42:49 +01:00
Javier Martinez Canillas
9d3922b236 iio: light: tsl2563: Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-03-19 10:52:56 +00:00
Gregor Boirie
bc2b7dab62 iio:core: timestamping clock selection support
Adds a new per-device sysfs attribute "current_timestamp_clock" to allow
userspace to select a particular POSIX clock for buffered samples and
events timestamping.

Following clocks, as listed in clock_gettime(2), are supported:
CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_MONOTONIC_RAW,
CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, CLOCK_BOOTTIME and
CLOCK_TAI.

Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Acked-by: Sanchayan Maity <maitysanchayan@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-06-30 19:41:38 +01:00
Amitoj Kaur Chawla
9e61d90115 iio: light: tsl2563: Remove flush_scheduled_work
flush_scheduled_work is scheduled for deprecation.
Replace cancel_delayed_work and flush_scheduled_work with
cancel_delayed_work_sync instead to ensure there is no pending or
running work item.

Since there is only one work item, chip->poweroff_work, there are
no further dependencies of flush_scheduled_work().

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-03-20 11:04:49 +00:00
Peter Meerwald
6fa273c1aa iio:tsl2563: Use tsl2563_ prefix for driver's functions
just cleanup, no functional change

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-04-18 20:35:31 +01:00
Greg Kroah-Hartman
81e990bbde First set of IIO fixes for the 3.14 cycle.
Included is the patch previously set as the fourth round for 3.13 which was
 to late to be appropriate.
 
 * Another endian fix (ad799x adc) due to missuse of the IIO_ST macro (which
   is going away very shortly)
 * A reversed error check in ad5933 which will make the probe fail.
 * A buffer overflow in the example code in the documentation.
 * ad799x was freeing an irq that might or might not have been requested.
 * tsl2563 was checking the wrong element of chan_spec for modifiers. Thus some
   sysfs reads would give the wrong values.
 * A missing dependency on HAS_IOMEM in spear_adc and lpc32xx was causing some
   test build failures (on s390 and perhaps elsewhere).
 
 I also have a few fixes queued up for things that went in during the 3.14
 merge window which will follow as a separate pull request (to avoid rebasing
 my tree).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJS7+bmAAoJEFSFNJnE9BaIBEIP/Ry6x7SbKwjP71dO0gSrCmbf
 WLO7yE+jy3MRkua/vhRn2nRx76Mk4N0NfZ7aSxja3gE/UMIgDUG0QC5tJgVm+Sol
 rUr+TOn9vrBhvJWoaOuZerkfdEiP1AUE034sQ4BXPm8M+zpf/1t2nRXslFPGx0hw
 bq+XBhBpB2pBlmn8Z6q9DK279elh1cmhuJyFK4BEEa98/fLCfkLoKPWD3L/uDS6/
 ne33LqvcKPgCkEToX5FoSeCibnQI673LgR2zuxfljxVYnkO7y8IqdzwJDExpsNzW
 mGYIrnuGM6ocXe8vIqkqknD9x8xST+mCGrpIUC0MD9eq5AIRzttxZoYKclq3kTTQ
 bukrbuqkiGyC2Hwe50A4+bWM06I8yu/NDUuGxCvKfy26wqwAtXlKGTzwJUg6jHBU
 rssMhYbBLSKmyl0sFlH1xwaHGDZKDNHWz60GpdO2OS516U37JkGvRvRg2bkgomps
 w4OoqXgspE5F1CCnRgy2NYIbN+UlJWY4SGO/boCor5JonYkWnmTq+0sQ4XxehAqc
 sTPW7vXITTkGJmrAgRWmBReI0iE03sC2CDZIOLlGOczJ4tDj7iRh1EN1tAB7gGV8
 n3rIZaE5AfAGKNgLcgF5WaVbnxm/Pd9dr+JdjcFv+I8imKiLCCnj/U23WaD27kUt
 RnMueM0Uu7I1hD3BSbDx
 =otUr
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-3.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First set of IIO fixes for the 3.14 cycle.

Included is the patch previously set as the fourth round for 3.13 which was
to late to be appropriate.

* Another endian fix (ad799x adc) due to missuse of the IIO_ST macro (which
  is going away very shortly)
* A reversed error check in ad5933 which will make the probe fail.
* A buffer overflow in the example code in the documentation.
* ad799x was freeing an irq that might or might not have been requested.
* tsl2563 was checking the wrong element of chan_spec for modifiers. Thus some
  sysfs reads would give the wrong values.
* A missing dependency on HAS_IOMEM in spear_adc and lpc32xx was causing some
  test build failures (on s390 and perhaps elsewhere).

I also have a few fixes queued up for things that went in during the 3.14
merge window which will follow as a separate pull request (to avoid rebasing
my tree).
2014-02-07 08:57:00 -08:00
Ivaylo Dimitrov
3b5c1635d1 iio: tsl2563: Use the correct channel2 member
Use the correct channel2 member instead of channel when dealing with sysfs
reads/writes

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-18 11:36:04 +00:00
Lars-Peter Clausen
cb955852a4 iio: Remove support for the legacy event config interface
Now that all drivers have been converted to the new event config interface we
can remove for the legacy event config interface. Also drop the '_new' suffix
for the event config interface callbacks, since those are the only callbacks
now.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-08 13:13:52 +00:00
Sebastian Reichel
8175bff5b4 iio:light:tsl2563: Add DT support
Add Device Tree support for the TSL2563 driver,
document the binding and add AMS-TAOS Inc. to the
list of vendor prefixes.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Acked-by: Kumar Gala <galak@codeaurora.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-11-24 21:07:14 +00:00
Lars-Peter Clausen
6d59747eb0 iio:tsl2563: Switch to new event config interface
Switch the tsl2563 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:39:27 +01:00
Sachin Kamat
bace48f44a iio: light: tsl2563: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03 18:55:51 +01:00
Jonathan Cameron
d292ef8da3 iio:light:tsl2563 move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Jon Brenner <jbrenner@taosinc.com>
2013-03-17 19:49:37 +00:00
Jonathan Cameron
9c2251dd4b iio:light:tsl2563 move out of staging
This driver is simple, uses the latest interfaces and contains few if
any controversial elements.  All of its interfaces have been in place
for a long time now.  Hence let's move it out of staging.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-01-27 17:37:24 +00:00
Renamed from drivers/staging/iio/light/tsl2563.c (Browse further)