Age | Commit message (Collapse) | Author | Files | Lines |
|
The ak8974_configure() function is used only from the PM code,
but that can be hidden when CONFIG_PM is disabled:
drivers/iio/magnetometer/ak8974.c:201:12: error: 'ak8974_configure' defined but not used [-Werror=unused-function]
This replaces the #ifdef with a __maybe_unused annotation, which
will work correctly in all configurations and avoid the warning,
as the compiler can now see where ak8974_configure is called from.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
A small rework of the PM code in this driver introduced a harmless
warning when CONFIG_PM_SLEEP is not set:
drivers/iio/common/hid-sensors/hid-sensor-trigger.c:212:12: error: 'hid_sensor_resume' defined but not used [-Werror=unused-function]
This removes the #ifdef and instead marks all three PM functions
as __maybe_unused, which covers all possible cases and is harder
to get wrong.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 7f6cf7414538 ("iio: hid-sensors: use asynchronous resume")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
ads1015_get_channels_config_of()
When terminating for_each_child_of_node() iteration with
break or return, of_node_put() should be used to prevent
stale device node references from being left behind.
This is detected by Coccinelle semantic patch.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Fixes the following sparse warnings:
drivers/iio/temperature/maxim_thermocouple.c:35:28: warning:
symbol 'max6675_channels' was not declared. Should it be static?
drivers/iio/temperature/maxim_thermocouple.c:52:28: warning:
symbol 'max31855_channels' was not declared. Should it be static?
drivers/iio/temperature/maxim_thermocouple.c:98:38: warning:
symbol 'maxim_thermocouple_chips' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-By: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
These sensors all have Vdd and Vdd_IO lines. This means the
supplies are *not* optional (optional means that the supply is
optional in the electrical sense, not the software sense)
so we need to get the and enable them at all times.
If the device tree or board file does not define suitable
regulators for the component, it will be substituted by a
dummy regulator, or, if regulators are disabled altogether,
by stubs. There is no need to use the IS_ERR_OR_NULL() check
that is considered harmful.
Cc: Giuseppe Barba <giuseppe.barba@st.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Cc: Crestez Dan Leonard <leonard.crestez@intel.com>
Cc: Gregor Boirie <gregor.boirie@parrot.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add support for Analog Devices AD8801/AD8803, 8 channels 8bits, Digital to
Analog converters.
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add support the VZ89TE variant which removes the voc_short channel,
and has CRC check for data transactions.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Abstract chip configuration data to allow supporting multiple variants
of the VZ89 chemical sensor line.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Adds basic support for the LTC2485 ADC - a delta-sigma analog-to-digital
converter with an I2C interface that operates in single shot conversion
mode.
The driver supports an on board 5V reference and the power-on default
configuration which rejects both 50hz & 60hz line frequencies and
operates in 1x speed mode.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The comparison for devnr limits is off-by-one, the current check
allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact
0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds
write to pdata->dac[devnr]. Fix this by replacing > with >= on the
comparison.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes: c947459979c6 ("iio: ad5755: add support for dt bindings")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-testing
Jonathan writes:
First round of new features, device support and cleanups for IIO in the 4.9 cycle.
Device support
* ak8974
- New driver and bindings for this 2009 vintage magnetometer (it was very
popular back then!)
* atlas-ph-sensor
- ORP sensor support(I had to look up what one of these was)
* cio-dac
- New driver for Measurement Computing DAC boards
* dmard06
- New driver for Domintech DMARDO6 accelerometer. Also vendor prefix.
* dmard09
- New driver for Domintech DMARD09 accelerometer.
* maxim-thermocouple
- max6675 and max31855 new driver
* mt6577 auxdac
- new driver for this Mediatek chip mt2701, mt6577 and mt8173 have this
hardware.
* ti-adc161s626
- new driver for this TI single channel differential ADC.
* vcnl4000
- support vcnl4010 and vcnl4020 which are compatible for all features
currently supported by this driver.
New features
* Core
- Allow retrieving of underlying iio_dev from a callback buffer handle.
This is needed to allow client drivers to perform operations such as
configuring the trigger used.
* hid-sensors
- asynchronous resume support to avoid really long resume times.
* kxcjk-1013
- add the mysterious KIOX000A ACPI id seen in the wild.
* Tools
- lsiio now enumerates processed as well as raw channels.
Cleanup
* ad7298
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* ad7793
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* ade7854
- checkpatch fixups (alignment of parameters)
* atlas-ph-sensor
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
- Switch to REGCACHE_NONE as there are no useful register to cache.
* bma180
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* hdc100x
- Add mention of the HDC1000 and HDC1008 to the Kconfig help text.
* isl29018
- Add driver specific prefixes to defines and function names.
- Remove excessive logging.
- Drop newlines which add nothing to readability.
- General tidying up of comments.
- Drop I2C_CLASS_HWMON as irrelevant to driver.
* isl29028
- Add driver specific prefixes to defines, enums and function names.
- Drop comma's from available attribute output as not ABI compliant.
- Drop I2C_CLASS_HWMON as irrelevant to driver.
* kxsd9
- devicetree bindings.
* mag3110
- This one wasn't locking to protect against mode switches during
raw_reads. Use the iio_claim_direct_mode function to fix this buglet.
* maxim-theromcouple
- Fix missing selects for triggered buffer support in Kconfig.
* nau7802
- Use complete instead of complete_all as only one completion at a time.
* sx9500
- Use complete instead of complete_all as only one completion at a time.
* us5182d
- Add a missing error code asignment instead of checking the result of
an already checked statement.
* vcnl4000
- Use BIT macro where appropriate.
- Refactor return codes in read_raw callback.
- Add some missing locking for concurrent accesses to the device.
|
|
SARADC controller needs to be reset before programming it, otherwise
it will not function properly.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-iio@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Tested-by: Guenter Roeck <linux@roeck-us.net>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Any readings from the raw interface of the KXSD9 driver will
return an empty string, because it does not return
IIO_VAL_INT but rather some random value from the accelerometer
to the caller.
Cc: stable@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Some platforms power off sensor hubs during S3 suspend, which will require
longer time to resume. This hurts system resume time, so resume
asynchronously.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add Mediatek auxadc driver based on iio.
It will register a device in iio and support iio.
So thermal can read auxadc channel to sample data by iio device.
It is tested successfully on mt2701 platform.
Mt8173 and mt6577 platforms are not tested.
But the expectation is compatible.
Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to compile maxim_thermocouple.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Now that open delay and sample delay for each channel is configurable
via DT, the default IDLE_TIMEOUT value is not enough as this is
calculated based on hardcoded macros. This results in driver returning
EBUSY sometimes. Fix this by increasing the timeout
value based on maximum value possible to open delay and sample delays
for each channel.
Fixes: 5dc11e810676e ("iio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters")
Signed-off-by: Vignesh R <vigneshr@ti.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
It is possible that two or more ADC channels can be simultaneously
requested for raw samples, in which case there can be race in access to
FIFO data resulting in loss of samples.
If am335x_tsc_se_set_once() is called again from tiadc_read_raw(), when
ADC is still acquired to sample one of the channels, the second process
might be put into uninterruptible sleep state. Fix these issues, by
protecting FIFO access and channel configurations with a mutex. Since
tiadc_read_raw() might take anywhere between few microseconds to few
milliseconds to finish execution (depending on averaging and delay
values supplied via DT), its better to use mutex instead of spinlock.
Fixes: 7ca6740cd1cd4 ("mfd: input: iio: ti_amm335x: Rework TSC/ADC synchronization")
Signed-off-by: Vignesh R <vigneshr@ti.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Driver was checking for direct mode but not locking it. Use
claim/release helper functions to guarantee the device stays
in direct mode during raw reads.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Fix an incorrect assignment due to a typo on a variable name. The
variable val2 should be assigned 100000 and not val.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-By: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
When using CONFIG_DEBUG_ATOMIC_SLEEP, the scheduler nicely points out
that we're calling sleeping primitives within the wait_event loop, which
means we might clobber the task state:
[ 10.831289] do not call blocking ops when !TASK_RUNNING; state=1 set at [<ffffffc00026b610>]
[ 10.845531] ------------[ cut here ]------------
[ 10.850161] WARNING: at kernel/sched/core.c:7630
...
[ 12.164333] ---[ end trace 45409966a9a76438 ]---
[ 12.168942] Call trace:
[ 12.171391] [<ffffffc00024ed44>] __might_sleep+0x64/0x90
[ 12.176699] [<ffffffc000954774>] mutex_lock_nested+0x50/0x3fc
[ 12.182440] [<ffffffc0007b9424>] iio_kfifo_buf_data_available+0x28/0x4c
[ 12.189043] [<ffffffc0007b76ac>] iio_buffer_ready+0x60/0xe0
[ 12.194608] [<ffffffc0007b7834>] iio_buffer_read_first_n_outer+0x108/0x1a8
[ 12.201474] [<ffffffc000370d48>] __vfs_read+0x58/0x114
[ 12.206606] [<ffffffc000371740>] vfs_read+0x94/0x118
[ 12.211564] [<ffffffc0003720f8>] SyS_read+0x64/0xb4
[ 12.216436] [<ffffffc000203cb4>] el0_svc_naked+0x24/0x28
To avoid this, we should (a la https://lwn.net/Articles/628628/) use the
wait_woken() function, which avoids the nested sleeping while still
handling races between waiting / wake-events.
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org> # 3.19+ for introduction of wake_woken
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Since there are overlapping volatile regions between parts, and only
register that isn't volatile is the temperature compensation provided
from userspace.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add support for Texas Instruments ADC141S626, and ADC161S626 chips.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add iio_channel_cb_get_iio_dev function to allow getting the
underlying iio_dev. This is useful for setting the trigger of the
consumer ADC device.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The call to i2c_get_clientdata(client) returns a struct iio_dev*, not
the needed struct ads1015_data*. We need here an intermediate step as
in the function: void ads1015_get_channels_config(struct i2c_client *client).
Signed-off-by: Giorgio Dal Molin <giorgio.nicole@arcor.de>
Fixes: ecc24e72f437 ("iio: adc: Add TI ADS1015 ADC driver support")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Minimal implementation of an IIO driver for the Domintech DMARD09 3-axis
accelerometer. Only supports reading the x,y,z axes at the moment.
Implementation based on the Android driver from the Acer Liquid E2
kernel sources.
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This patch add support for Domintech DMARD05, DMARD06 and DMARD07
accelerometers.
Signed-off-by: Aleksei Mamlin <mamlinav@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Commit 7ef9153d9af5 ("misc: delete bh1780 driver") has removed the
Kconfig option SENSORS_BH1780. Remove the last reference on this
option.
Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
There is only one waiter for the completion, therefore there
is no need to use complete_all(). Let's make that clear by
using complete() instead of complete_all().
The usage pattern of the completion is:
waiter context waker context
sx9500_read_proximity()
sx9500_inc_chan_users()
sx9500_inc_data_rdy_users()
wait_for_completion_interruptible()
s9500_irq_thread_handler()
complete()
reinit_completion()
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
There is only one waiter for the completion, therefore there
is no need to use complete_all(). Let's make that clear by
using complete() instead of complete_all().
The usage pattern of the completion is:
waiter context waker context
nau7802_read_irq()
reinit_completion()
nau7802_read_conversion()
wait_for_completion_interruptible_timeout()
nau7802_eoc_trigger()
complete()
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The driver always assumes that an input device has been created when
reading channel 3. This causes a kernel panic when dereferencing
st->ts_input.
The change was introduced in
commit 84882b060301 ("iio: adc: at91_adc: Add support for touchscreens
without TSMR"). Earlier versions only entered that part of the if-else
statement if only the following flags are set:
AT91_ADC_IER_XRDY | AT91_ADC_IER_YRDY | AT91_ADC_IER_PRDY
Signed-off-by: Anders Darander <anders@chargestorm.se>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Replace the code that guarantees the device stays in direct mode
with iio_device_claim_direct_mode() which does same.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
hdc100x supports Texas Instruments HDC1000 and HDC1008 relative
humidity and temperature sensors. Add these product names to
Kconfig.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Replace the i2c_smbus_read_byte commmands used to retrieve the sensor
data with an i2c_master_recv command.
The smbus read byte method fails because the device does not expect a
stop condition after sending the first byte. When we issue the second
read, we are getting the first byte again. Net effect is that of the 14
bits used for the measurement, the 8 most significant bits are correct,
the lower 6 are not.
None of the smbus read protocols follow the pattern this device requires
(S Addr Rd [A] Data [A] Data NA P), hence the switch to an i2c receive
transaction.
Applicable from original introduction of this driver, but will require
backporting due to churn in the code.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
It is likely that checking the result of 'pm_runtime_set_active' is
expected here.
Fixes: f0e5f57d3ac2 ("iio: light: us8152d: Add power management support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This adds a driver for the Asahi Kasei AK8974 and its sibling
AMI305 magnetometers. It was deployed on scale in 2009 on a
multitude of devices. It is distincly different from AK8973
and AK8975 and needs its own driver.
This patch is based on the long lost work of Samu Onkalo at Nokia,
who made a misc character device driver for the Maemo/MeeGo Nokia
devices, before the time of the IIO subsystem. It was mounted in e.g.
the Nokia N950, N8, N86, N97 etc. It is also mounted on the
ST-Ericsson HREF reference designs.
It works nicely in sysfs:
$ cat in_magn_x_raw && cat in_magn_y_raw && cat in_magn_z_raw
-55
-101
161
And with buffered reads using a simple HRTimer trigger:
$ generic_buffer -c10 -a -n ak8974 -t foo
iio device number being used is 3
iio trigger number being used is 2
No channels are enabled, enabling all channels
Enabling: in_magn_x_en
Enabling: in_magn_y_en
Enabling: in_magn_z_en
Enabling: in_timestamp_en
/sys/bus/iio/devices/iio:device3 foo
-58.000000 -102.000000 157.000000 946684970985321044
-60.000000 -98.000000 159.000000 946684971012237548
-60.000000 -106.000000 163.000000 946684971032257080
-62.000000 -94.000000 169.000000 946684971052185058
-58.000000 -98.000000 163.000000 946684971072204589
-54.000000 -100.000000 163.000000 946684971092224121
-53.000000 -103.000000 164.000000 946684971112731933
-50.000000 -102.000000 165.000000 946684971132232666
-61.000000 -101.000000 164.000000 946684971152191162
-57.000000 -99.000000 168.000000 946684971172210693
Disabling: in_magn_x_en
Disabling: in_magn_y_en
Disabling: in_magn_z_en
Disabling: in_timestamp_en
I cannot currently scale these raw values to gauss. This is
because of lack of documentation. I have sent a request for
a datasheet to Asahi Kasei.
The driver can optionally use a DRDY line IRQ to capture data,
else it will sleep and poll.
Cc: Samu Onkalo <samu.onkalo@intel.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Tested-By: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
In commit 3d838118c6aa ("iio: pressure: bmp280: add power management")
For some reason the code in the runtime suspend/resume hooks
got wrong (I suspect in the ambition to cut down boilerplate)
and it seems it was tested without CONFIG_PM and crashes like
so for me:
Unable to handle kernel NULL pointer dereference at virtual address 0000000c
pgd = c0204000
[0000000c] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 89 Comm: kworker/1:2 Not tainted
4.7.0-03348-g90dc3680458a-dirty #99
Hardware name: Generic DT based system
Workqueue: pm pm_runtime_work
task: df3c6300 ti: dec8a000 task.ti: dec8a000
PC is at regulator_disable+0x0/0x6c
LR is at bmp280_runtime_suspend+0x3c/0xa4
Dereferencing the BMP280 state container properly fixes the problem,
sorry for screwing up.
Fixes: 3d838118c6aa ("iio: pressure: bmp280: add power management")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to compile.
Remove IIO_TRIGGER if present since IIO_BUFFER selects it.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The devm_iio_device_register function should not be used if custom
operations must be performed in the remove callback. This patch replaces
the dem_iio_device_register call with a iio_device_register call and
respective iio_device_unregister call in the remove callback.
Fixes: 765550e4d98d ("iio: stx104: Add GPIO support for the Apex Embedded Systems STX104")
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Use the iio_pollfunc_store_time parameter during triggered buffer
set-up to get valid timestamps.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Use the iio_pollfunc_store_time parameter during triggered buffer
set-up to get valid timestamps.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-By: Tiberiu Breana <tiberiu.a.breana@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Use the iio_pollfunc_store_time parameter during triggered buffer
set-up to get valid timestamps.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-By: Tiberiu Breana <tiberiu.a.breana@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The data buffer for captured mode for the ad799x driver is allocated in the
update_scan_mode() callback. This callback is not set in the iio_info
struct for the ad7791/ad7995/ad7999, which means that the data buffer is
not allocated when a captured transfer is started. As a result the driver
crashes when the first sample is received. To fix this properly set the
update_scan_mode() callback.
Fixes: d8dca33027c1 ("staging:iio:ad799x: Preallocate sample buffer")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
PTR_ERR should access the value just tested by IS_ERR, otherwise
the wrong error code will be returned.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The Measurement Computing CIO-DAC is a family of 16-bit and 12-bit
analog output devices. The analog outputs are from AD660BN/AD7237
converters with each output buffered by an OP-27. Voltage ranges are
configured via physical jumpers on the device.
This driver does not support the devices' simulataneous update mode; the
XFER jumper option should be deselected for all analog output channels.
This driver provides IIO support for the Measurement Computing CIO-DAC
family: CIO-DAC16, CIO-DAC08, and PC104-DAC06. The base port addresses
for the devices may be configured via the base array module parameter.
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Replace the code that guarantees the device stays in direct mode
with iio_device_claim_direct_mode() which does same.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Replace the code that guarantees the device stays in direct mode
with iio_device_claim_direct_mode() which does same.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|