04 Jan, 2021
1 commit
-
This is the 5.10.4 stable release
* tag 'v5.10.4': (717 commits)
Linux 5.10.4
x86/CPU/AMD: Save AMD NodeId as cpu_die_id
drm/edid: fix objtool warning in drm_cvt_modes()
...Signed-off-by: Jason Liu
Conflicts:
drivers/gpu/drm/imx/dcss/dcss-plane.c
drivers/media/i2c/ov5640.c
30 Dec, 2020
5 commits
-
commit 1e405bc2512f80a903ddd6ba8740cee885238d7f upstream.
One of a class of bugs pointed out by Lars in a recent review.
iio_push_to_buffers_with_timestamp() assumes the buffer used is aligned
to the size of the timestamp (8 bytes). This is not guaranteed in
this driver which uses an array of smaller elements on the stack.
As Lars also noted this anti pattern can involve a leak of data to
userspace and that indeed can happen here. We close both issues by
moving to a suitable structure in the iio_priv() data with alignment
explicitly requested. This data is allocated with kzalloc() so no
data can leak apart from previous readings.In this driver the timestamp can end up in various different locations
depending on what other channels are enabled. As a result, we don't
use a structure to specify it's position as that would be misleading.Fixes: e717f8c6dfec ("iio: adc: Add the TI ads124s08 ADC code")
Reported-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron
Reviewed-by: Alexandru Ardelean
Cc: Dan Murphy
Cc:
Link: https://lore.kernel.org/r/20200920112742.170751-9-jic23@kernel.org
Signed-off-by: Greg Kroah-Hartman -
commit b0bd27f02d768e3a861c4e6c27f8e369720e6c25 upstream.
The buffer is expressed as a u32 array, yet the extra space for
the s64 timestamp was expressed as sizeof(s64)/sizeof(u16).
This will result in 2 extra u32 elements.
Fix by dividing by sizeof(u32).Fixes: e717f8c6dfec ("iio: adc: Add the TI ads124s08 ADC code")
Signed-off-by: Jonathan Cameron
Reviewed-by: Alexandru Ardelean
Cc: Dan Murphy
Cc:
Link: https://lore.kernel.org/r/20200920112742.170751-8-jic23@kernel.org
Signed-off-by: Greg Kroah-Hartman -
commit 560c6b914c6ec7d9d9a69fddbb5bf3bf71433e8b upstream.
Fix the missing clk_disable_unprepare() of info->pclk
before return from rockchip_saradc_resume in the error
handling case when fails to prepare and enable info->clk.Suggested-by: Robin Murphy
Fixes: 44d6f2ef94f9 ("iio: adc: add driver for Rockchip saradc")
Signed-off-by: Qinglang Miao
Cc:
Link: https://lore.kernel.org/r/20201103120743.110662-1-miaoqinglang@huawei.com
Signed-off-by: Jonathan Cameron
Signed-off-by: Greg Kroah-Hartman -
commit 0fb6ee8d0b5e90b72f870f76debc8bd31a742014 upstream.
Use a heap allocated memory for the SPI transfer buffer. Using stack memory
can corrupt stack memory when using DMA on some systems.This change moves the buffer from the stack of the trigger handler call to
the heap of the buffer of the state struct. The size increases takes into
account the alignment for the timestamp, which is 8 bytes.The 'data' buffer is split into 'tx_buf' and 'rx_buf', to make a clearer
separation of which part of the buffer should be used for TX & RX.Fixes: af3008485ea03 ("iio:adc: Add common code for ADI Sigma Delta devices")
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
Link: https://lore.kernel.org/r/20201124123807.19717-1-alexandru.ardelean@analog.com
Cc:
Signed-off-by: Jonathan Cameron
Signed-off-by: Greg Kroah-Hartman -
[ Upstream commit f091d7c5fe6cc39e916b50f90e3cac67a032d0be ]
This tries to solve a warning reported by the lkp bot:
>> drivers/iio/adc/at91_adc.c:1439:34: warning: unused variable
>> 'at91_adc_dt_ids' [-Wunused-const-variable]
static const struct of_device_id at91_adc_dt_ids[] = {
^
1 warning generated.This warning has appeared after the AT91_ADC driver compilation has been
enabled via the COMPILE_TEST symbol dependency.The warning is caused by the 'of_match_ptr()' helper which returns NULL if
OF is undefined. This driver should build only for device-tree context, so
a dependency on the OF Kconfig symbol has been added.
Also, the usage of of_match_ptr() helper has been removed since it
shouldn't ever return NULL (because the driver should not be built for the
non-OF context).Fixes: 4027860dcc4c ("iio: Kconfig: at91_adc: add COMPILE_TEST dependency to driver")
Reported-by: kernel test robot
Signed-off-by: Alexandru Ardelean
Reviewed-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200930135048.11530-4-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron
Signed-off-by: Sasha Levin
14 Dec, 2020
2 commits
-
i.MX8QXP B0 and i.MX8QM has the same ADC IP, so add the
adc driver to support it.Signed-off-by: Haibo Chen
-
Enable i.MX6SX adc driver. ADC driver will try getting ADC controller
channel number via device tree, because i.MX chip enable 4 channels
on each controller.Signed-off-by: Luwei Zhou
Signed-off-by: Fugang Duan
(cherry picked from commit 14a6a98f64e26702b1c0ecfc7d58a45ee5752d54)
Signed-off-by: Arulpandiyan Vadivel
08 Nov, 2020
2 commits
-
When the command feature of the ADC is used, it is possible to program
the ADC, and specify at each step what input should be processed, and in
comparison to what reference.This broke the AUX and battery readings when the touchscreen was
enabled, most likely because the CMD feature would change the VREF all
the time.Now, when AUX or battery are read, we temporarily disable the CMD
feature, which means that we won't get touchscreen readings in that time
frame. But it now gives correct values for AUX / battery, and the
touchscreen isn't disabled for long enough to be an actual issue.Fixes: b96952f498db ("IIO: Ingenic JZ47xx: Add touchscreen mode.")
Signed-off-by: Paul Cercueil
Acked-by: Artur Rojek
Cc:
Link: https://lore.kernel.org/r/20201103201238.161083-1-paul@crapouillou.net
Signed-off-by: Jonathan Cameron -
The reference voltage for the battery is clearly marked as 1.2V in the
programming manual. With this fixed, the battery channel now returns
correct values.Fixes: a515d6488505 ("IIO: Ingenic JZ47xx: Add support for JZ4770 SoC ADC.")
Signed-off-by: Paul Cercueil
Acked-by: Artur Rojek
Cc:
Link: https://lore.kernel.org/r/20201104192843.67187-1-paul@crapouillou.net
Signed-off-by: Jonathan Cameron
02 Nov, 2020
1 commit
-
Since overrun interrupt support has been added, there's a regression when
two ADCs are used at the same time, with:
- an ADC configured to use IRQs. EOCIE bit is set. The handler is normally
called in this case.
- an ADC configured to use DMA. EOCIE bit isn't set. EOC triggers the DMA
request. It's then automatically cleared by DMA read. But the handler
gets called due to status bit is temporarily set (IRQ triggered by the
other ADC).This is a regression as similar issue had been fixed earlier by
commit dcb10920179a ("iio: adc: stm32-adc:
fix a race when using several adcs with dma and irq").
Issue is that stm32_adc_eoc_enabled() returns non-zero value (always)
since OVR bit has been added and enabled for both DMA and IRQ case.Remove OVR mask in IER register, and rely only on CSR status for overrun.
To avoid subsequent calls to interrupt routine on overrun, CSR OVR bit has
to be cleared. CSR OVR bit cannot be cleared directly by software.
To do this ADC must be stopped first, and OVR bit in ADC ISR has
to be cleared.
Also add a check in ADC IRQ handler to report spurious IRQs.Fixes: cc06e67d8fa5 ("iio: adc: stm32-adc: Add check on overrun interrupt")
Signed-off-by: Olivier Moysan
Signed-off-by: Fabrice Gasnier
Cc:
Link: https://lore.kernel.org/r/20201021085313.5335-1-olivier.moysan@st.com
Signed-off-by: Jonathan Cameron
01 Nov, 2020
1 commit
-
dev_comp field is used in a couple of places but it is never set. This
results in kernel oops when dereferencing a NULL pointer. Set the
`dev_comp` field correctly in the probe function.Fixes: 6d97024dce23 ("iio: adc: mediatek: mt6577-auxadc, add mt6765 support")
Signed-off-by: Fabien Parent
Reviewed-by: Matthias Brugger
Cc:
Link: https://lore.kernel.org/r/20201018194644.3366846-1-fparent@baylibre.com
Signed-off-by: Jonathan Cameron
16 Oct, 2020
2 commits
-
Pull sound updates from Takashi Iwai:
"The amount of changes is smaller at this round (what a surprise), but
lots of activity is seen. Most of changes are about ASoC driver
development, especially Intel platforms. Here are some highlights:General:
- Replace all tasklet usages with other alternatives
- Cleanup of the ASoC error unwinding code
- Fixes for trivial issues caught by static checker
- Spell fixes allover the placesALSA Core:
- Lockdep fix for control devices
- Fix for potential OSS sequencer mutex stallsHD-audio and USB-audio:
- SoundBlaster AE-7 support
- Changes in quirk table for the rename handling
- Quirks for HP and ASUS machines, Pioneer DJ DJM-250MK2.ASoC:
- Lots of updates for Intel SOF and SoundWire enablement
- Replacement of the DSP driver for some older x86 systems; the new
code was written from scratch, better maintenance expected
- Helpers for parsing auxiluary devices from the device tree
- New support for AllWinner A64, Cirrus Logic CS4234, Mediatek MT6359
Microchip S/PDIF TX and RX controllers, Realtek RT1015P, and Texas
Instruments J721E, TAS2110, TAS2564 and TAS2764"* tag 'sound-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (498 commits)
ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close
ALSA: hda: fix jack detection with Realtek codecs when in D3
ALSA: fireworks: use semicolons rather than commas to separate statements
ALSA: hda: use semicolons rather than commas to separate statements
ALSA: hda/i915 - fix list corruption with concurrent probes
ASoC: dmaengine: Document support for TX only or RX only streams
ASoC: mchp-spdiftx: remove 'TX' from playback stream name
ASoC: ti: davinci-mcasp: Use &pdev->dev for early dev_warn
ASoC: tas2764: Add the driver for the TAS2764
dt-bindings: tas2764: Add the TAS2764 binding doc
ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency
ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled
ASoC: stm32: dfsdm: add actual resolution trace
ASoC: stm32: dfsdm: change rate limits
ASoC: qcom: sc7180: Add support for audio over DP
Asoc: qcom: lpass-platform : Increase buffer size
ASoC: qcom: Add support for lpass hdmi driver
Asoc: qcom: lpass:Update lpaif_dmactl members order
Asoc:qcom:lpass-cpu:Update dts property read API
ASoC: dt-bindings: Add dt binding for lpass hdmi
... -
Pull staging / IIO driver updates from Greg KH:
"Here is the large set of staging and IIO driver updates for 5.10-rc1.Included in here are:
- new IIO drivers
- new IIO driver frameworks
- various IIO driver fixes and updates
- IIO device tree conversions to yaml
- so many minor staging driver coding style cleanups
- most cdev driver moved out of staging
- no staging drivers added or removed
Full details are in the shortlog.
All of these have been in linux-next for a while with no reported
issues"* tag 'staging-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (476 commits)
staging: comedi: check validity of wMaxPacketSize of usb endpoints found
staging: wfx: improve robustness of wfx_get_hw_rate()
staging: wfx: drop unicode characters from strings
staging: wfx: gpiod_get_value() can return an error
staging: wfx: increase robustness of hif_generic_confirm()
staging: wfx: wfx_init_common() returns NULL on error
staging: wfx: standardize the error when vif does not exist
staging: wfx: check memory allocation
staging: wfx: improve error handling of hif_join()
staging: dpaa2-switch: add a dpaa2_switch prefix to all functions in ethsw.c
staging: dpaa2-switch: add a dpaa2_switch_ prefix to all functions in ethsw-ethtool.c
staging: rtl8188eu: Fix long lines
dt-bindings: staging: wfx: silabs,wfx yaml conversion
staging: wfx: update copyrights dates
staging: wfx: fix QoS priority for slow buses
staging: wfx: fix BA sessions for older firmwares
staging: wfx: remove remaining code of 'secure link' feature
staging: wfx: fix handling of MMIC error
staging: vchiq: Fix list_for_each exit tests
staging: greybus: use __force when assigning __u8 value to snd_ctl_elem_type_t
...
15 Oct, 2020
1 commit
-
Pull driver core updates from Greg KH:
"Here is the "big" set of driver core patches for 5.10-rc1They include a lot of different things, all related to the driver core
and/or some driver logic:- sysfs common write functions to make it easier to audit sysfs
attributes- device connection cleanups and fixes
- devm helpers for a few functions
- NOIO allocations for when devices are being removed
- minor cleanups and fixes
All have been in linux-next for a while with no reported issues"
* tag 'driver-core-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (31 commits)
regmap: debugfs: use semicolons rather than commas to separate statements
platform/x86: intel_pmc_core: do not create a static struct device
drivers core: node: Use a more typical macro definition style for ACCESS_ATTR
drivers core: Use sysfs_emit for shared_cpu_map_show and shared_cpu_list_show
mm: and drivers core: Convert hugetlb_report_node_meminfo to sysfs_emit
drivers core: Miscellaneous changes for sysfs_emit
drivers core: Reindent a couple uses around sysfs_emit
drivers core: Remove strcat uses around sysfs_emit and neaten
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output
dyndbg: use keyword, arg varnames for query term pairs
driver core: force NOIO allocations during unplug
platform_device: switch to simpler IDA interface
driver core: platform: Document return type of more functions
Revert "driver core: Annotate dev_err_probe() with __must_check"
Revert "test_firmware: Test platform fw loading on non-EFI systems"
iio: adc: xilinx-xadc: use devm_krealloc()
hwmon: pmbus: use more devres helpers
devres: provide devm_krealloc()
syscore: Use pm_pr_dbg() for syscore_{suspend,resume}()
...
09 Oct, 2020
2 commits
-
Add a trace to report actual resolution of audio samples.
Signed-off-by: Olivier Moysan
Link: https://lore.kernel.org/r/20201007153459.22155-3-olivier.moysan@st.com
Signed-off-by: Mark Brown
05 Oct, 2020
1 commit
-
We need the IIO fixes in here as well.
Signed-off-by: Greg Kroah-Hartman
30 Sep, 2020
10 commits
-
Add missing of_node_put calls when exiting the for_each_child_of_node
loop in rcar_gyroadc_parse_subdevs early.Also add goto-exception handling for the error paths in that loop.
Fixes: 059c53b32329 ("iio: adc: Add Renesas GyroADC driver")
Signed-off-by: Tobias Jordan
Link: https://lore.kernel.org/r/20200926161946.GA10240@agrajag.zerfleddert.de
Cc:
Signed-off-by: Jonathan Cameron -
When the ADC is runtime suspended and starting a conversion, the stm32-adc
driver calls pm_runtime_get_sync() that gets cascaded to the parent
(e.g. runtime resume of stm32-adc-core driver). This also kicks the
autosuspend delay (e.g. 2s) of the parent.
Once the ADC is active, calling pm_runtime_get_sync() again (upon a new
capture) won't kick the autosuspend delay for the parent (stm32-adc-core
driver) as already active.Currently, this makes the stm32-adc-core driver go in suspend state
every 2s when doing slow polling. As an example, doing a capture, e.g.
cat in_voltageY_raw at a 0.2s rate, the auto suspend delay for the parent
isn't refreshed. Once it expires, the parent immediately falls into
runtime suspended state, in between two captures, as soon as the child
driver falls into runtime suspend state:
- e.g. after 2s, + child calls pm_runtime_put_autosuspend() + 100ms
autosuspend delay of the child.
- stm32-adc-core switches off regulators, clocks and so on.
- They get switched on back again 100ms later in this example (at 2.2s).So, use runtime_idle() callback in stm32-adc-core driver to call
pm_runtime_mark_last_busy() for the parent driver (stm32-adc-core),
to avoid this.Fixes: 9bdbb1139ca1 ("iio: adc: stm32-adc: add power management support")
Signed-off-by: Fabrice Gasnier
Reviewed-by: Ulf Hansson
Link: https://lore.kernel.org/r/1593615328-5180-1-git-send-email-fabrice.gasnier@st.com
Signed-off-by: Jonathan Cameron -
After the move of the postenable code to preenable, the DMA start was
done before the DMA init, which is not correct.
The DMA is initialized in set_watermark. Because of this, we need to call
the DMA start functions in set_watermark, after the DMA init, instead of
preenable hook, when the DMA is not properly setup yet.Fixes: f3c034f61775 ("iio: at91-sama5d2_adc: adjust iio_triggered_buffer_{predisable,postenable} positions")
Signed-off-by: Eugen Hristev
Link: https://lore.kernel.org/r/20200923121748.49384-1-eugen.hristev@microchip.com
Cc:
Signed-off-by: Jonathan Cameron -
When returning or breaking early from a
`for_each_available_child_of_node()` loop, we need to explicitly call
`of_node_put()` on the child node to possibly release the node.Fixes: 506d2e317a0a0 ("iio: adc: Add driver support for AD7292")
Signed-off-by: Nuno Sá
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200925091045.302-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron -
The AD9265 is a 16-bit, 125 MSPS analog-to-digital converter (ADC). The
AD9265 is designed to support communications applications where high
performance combined with low cost, small size, and versatility is
desired.The ADC core features a multistage, differential pipelined architecture
with integrated output error correction logic to provide 16-bit accuracy at
125 MSPS data rates and guarantees no missing codes over the full operating
temperature range.The ADC features a wide bandwidth differential sample-and-hold analog input
amplifier supporting a variety of user-selectable input ranges. It is
suitable for multiplexed systems that switch full-scale voltage levels in
successive channels and for sampling single-channel inputs at frequencies
well beyond the Nyquist rate. Combined with power and cost savings over
previously available ADCs, the AD9265 is suitable for applications in
communications, instrumentation and medical imaging.Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9434.pdf
The driver supports the same register set as the AD9467, so the support for
this chip is added to the 'ad9467' driver.Signed-off-by: Michael Hennerich
Signed-off-by: Alexandru Ardelean
Signed-off-by: Jonathan Cameron
Link: https://lore.kernel.org/r/20200924080518.96410-4-alexandru.ardelean@analog.com -
The AD9434 is a 12-bit monolithic sampling analog-to-digital converter
(ADC) optimized for high performance, low power, and ease of use. The part
operates at up to a 500 MSPS conversion rate and is optimized for
outstanding dynamic performance in wideband carrier and broadband systems.All necessary functions, including a sample-and-hold and voltage reference,
are included on the chip to provide a complete signal conversion solution.
The VREF pin can be used to monitor the internal reference or provide an
external voltage reference (external reference mode must be enabled through
the SPI port).The ADC requires a 1.8 V analog voltage supply and a differential clock
for full performance operation. The digital outputs are LVDS (ANSI-644)
compatible and support twos complement, offset binary format, or Gray code.
A data clock output is available for proper output data timing.Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9434.pdf
The driver supports the same register set as the AD9467, so the support for
this chip is added to the 'ad9467' driver.Signed-off-by: Michael Hennerich
Signed-off-by: Alexandru Ardelean
Signed-off-by: Jonathan Cameron
Link: https://lore.kernel.org/r/20200924080518.96410-3-alexandru.ardelean@analog.com -
There are 2 chip constants that can be added to the chip-info part. The
default output-mode and the VREF mask.When adding new chips to this driver, these can be easily omitted, because
these also need to be updated in 2 switch statements.However, if adding them in the chip-info constants, they are updated in a
single place and propagated in both switch statements.Signed-off-by: Alexandru Ardelean
Signed-off-by: Jonathan Cameron
Link: https://lore.kernel.org/r/20200924080518.96410-2-alexandru.ardelean@analog.com -
Make use of devm_platform_get_and_ioremap_resource() provided by
driver core platform instead of duplicated analogue, dev_err() is
removed because it has been done in devm_ioremap_resource().Signed-off-by: Wang ShaoBo
Link: https://lore.kernel.org/r/20200918083142.32816-1-bobo.shaobowang@huawei.com
Signed-off-by: Jonathan Cameron -
Make use of devm_platform_get_and_ioremap_resource() provided by
driver core platform instead of duplicated analogue.Signed-off-by: Wang ShaoBo
Link: https://lore.kernel.org/r/20200918082837.32610-1-bobo.shaobowang@huawei.com
Signed-off-by: Jonathan Cameron -
There are no in-tree users of the platform data for this driver, so
remove it and convert the driver to use device tree instead.Signed-off-by: Michael Auchter
Link: https://lore.kernel.org/r/20200922144422.542669-1-michael.auchter@ni.com
Signed-off-by: Jonathan Cameron
22 Sep, 2020
7 commits
-
Remove superfluous '.c' from qcom-spmi-adc5 device driver name.
Fixes: e13d757279bb ("iio: adc: Add QCOM SPMI PMIC5 ADC driver")
Signed-off-by: Dmitry Baryshkov
Acked-by: Manivannan Sadhasivam
Cc:
Link: https://lore.kernel.org/r/20200910140000.324091-2-dmitry.baryshkov@linaro.org
Signed-off-by: Jonathan Cameron -
…it/jic23/iio into staging-next
Jonathan writes:
Second set of features and cleanups for IIO in 5.10
We have a couple of changes that apply to large sets of drivers, so
I have grouped those to keep this short.There are a few late breaking fixes in here that can wait for the
merge window.dt yaml conversions
-------------------* adi,ad7768-1
* adi,ad7949
* aspeed,ast2400
* cosmic,10001-adc
* dlg,da9150-gpadc
* fsl,imx25-gcq
* fsl,imx7d-adc
* fsl,vf610
* holt,hi8435
* marvell,berlin2-adc
* motorola,cpcap-adc
* nuvoton,nau7802
* nuvoton,npcm750-adc
* nxp,lpc1850-adc
* nxp,lpc3220
* sprd,sc2720-adc
* st,stmpe-adc
* ti,adc12138
* ti,ads1015
* ti,ads7950
* ti,twl4030-madcFeatures
--------* adxrs290
- Add triggered buffer support and expose data ready signal as a possible
trigger. Includes updating bindings.
- Add debugfs hooks for register access.
* mlx90632
- Add a clear user interface to override the measured ambient temperature.
* vl53l0x
- Add IRQ support including dt bindings.Cleanups and minor fixes
------------------------
(groups)
Replace mlock with local lock:
* adf4350
* exynos-adc
* fls-imx25-gcq
* stm32-dacdevm use to simplify probe error handling and remove functions.
* adis16201
* adis16203
* adis16209
* adis16240
* adis16136
* adis16260
* adis16400
* adis16460
* adis16480
* adis library - drop unused adis_setup_buffer_and_trigger()of_match_ptr removal and incorrect ACPI binding removal
of_match_ptr() rarely makes sense in an IIO driver as space saving
is trivial and it breaks ACPI PRP0001 based instantiation.
Mostly this series is about removing examples that get copied into new
drivers.
* ad2s1200
* ad5272
* ad5446
* ad5592r
* ad5593r
* ad5703
* ak8974
* ak8975
* ams-iaq-core
* as3935
* atlas-sensor
* ds1803
* hdc100x
* htu21
* icp10100
* lmp91000
* pulsedlight
* max30102
* max5432
* max5481
* mcp4018
* mcp4131
* mcp4531
* mcp4725
* ms5611
* ms5637
* si7020
* sgp30
* ti-dac082s085
* ti-dac5571
* tmp007
* tsys01
* vz89x
* zpa2326kernel-doc fixes
* iio-core
* ad7303
* ad7947
* adis16080
* adis16400
* iio_dummy_evgen
* sgp30Fixes for buffer alignment when passed to iio_push_to_buffers_with_timestamp()
This is a long running effort. There are a few more drivers to come.
* inv_mpu6050
* itg3200
* si1145
* st_lsm6dsx
* ti-adc0832
* ti-adc12138(not driver focused)
* MAINTAINERS
- Consolidate Analog Device IIO entries whilst removing Beniamin Bia.
- Remove Hartmut Knaack as a listed IIO maintainer as he hasn't been
active for a long time and people are getting intermitted bounces.
* Add __printf() markings to a few functions that were missing them.
* drop some rotted documentation from staging.
* rework buffer sysfs file creation (precursor to multiple buffer support)(individual drivers)
* ad5592r
- Fix use of true for IIO_SHARED_BY_TYPE
- Tidy up locking and indentation.
* ad9467
- Improve error message on chip-id missmatch.
- Use more appropriate error value if chip-id not recognised.
* adis-library
- Simplify burst mode handling.
* adxrs290
- Make sure to switch device to standby mode during remove.
* as73211
- Increase measurement timeout as seems some devices are slower.
* bma180
- Fix use of true fo IIO_SHARED_BY_TYPE
* exynos_adc
- Update binding to require second interrut with touch screen.
- Update binding to not require syscon on S5Pv210
* hmc5843
- Fix use of true for IIO_SHARED_BY_TYPE
* inv_mpu6050
- Use regmap_noinc_read() for fifo reading.
* palmas_gpadc
- Use module_platform_driver() to remove boilerplate.
* meson-saradc
- style consistency fixes
* rockchip_saradc
- Allow compile testing with !ARM.
* st_lsm6dsx
- Changing scaling factor to use IIO_VAL_INT_PLUS_NANO to improve precision.
- Fix an issue with unchecked return value.
* stm32-adc
- Fix a missing return introduced in dev_err_probe() patch earlier in
cycle.
* sx9310
- Prefer async mode for probe as paticularly slow startup.
* vcnl4000
- Add missing interrupt property to dt binding.* tag 'iio-for-5.10b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (126 commits)
dt-bindings: iio: vishay,vcnl4000: add interrupts property
iio:imu:inv_mpu6050: Use regmap_noinc_read for fifo reads.
iio:imu:inv_mpu6050 Fix dma and ts alignment and data leak issues.
iio:adc:ti-adc12138 Fix alignment issue with timestamp
iio:adc:ti-adc0832 Fix alignment issue with timestamp
iio:imu:st_lsm6dsx Fix alignment and data leak issues
iio:light:si1145: Fix timestamp alignment and prevent data leak.
iio:gyro:itg3200: Fix timestamp alignment and prevent data leak.
iio:imu:st_lsm6dsx: check st_lsm6dsx_shub_read_output return
iio: adc: exynos_adc: Replace indio_dev->mlock with own device lock
dt-bindings:iio:adc:holt,hi8435 yaml conversion
dt-bindings:iio:adc:adi,ad7768-1 yaml conversion
dt-bindings:iio:adc:adi,ad7949 yaml conversion
dt-bindings:iio:adc:dlg,da9150-gpadc yaml conversion
dt-bindings:iio:adc:motorola,cpcap-adc yaml conversion
dt-bindings:iio:adc:nxp,lpc3220-adc yaml conversion
dt-bindings:iio:adc:nxp,lpc1850-adc yaml conversion
dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion
dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion
dt-bindings:iio:adc:ti,ads1015 yaml conversion
... -
One of a class of bugs pointed out by Lars in a recent review.
iio_push_to_buffers_with_timestamp assumes the buffer used is aligned
to the size of the timestamp (8 bytes). This is not guaranteed in
this driver which uses an array of smaller elements on the stack.We move to a suitable structure in the iio_priv() data with alignment
explicitly requested. This data is allocated with kzalloc so no
data can leak apart from previous readings. Note that previously
no leak at all could occur, but previous readings should never
be a problem.In this case the timestamp location depends on what other channels
are enabled. As such we can't use a structure without misleading
by suggesting only one possible timestamp location.Fixes: 50a6edb1b6e0 ("iio: adc: add ADC12130/ADC12132/ADC12138 ADC driver")
Reported-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron
Reviewed-by: Andy Shevchenko
Cc: Akinobu Mita
Cc:
Link: https://lore.kernel.org/r/20200722155103.979802-26-jic23@kernel.org -
One of a class of bugs pointed out by Lars in a recent review.
iio_push_to_buffers_with_timestamp assumes the buffer used is aligned
to the size of the timestamp (8 bytes). This is not guaranteed in
this driver which uses an array of smaller elements on the stack.We fix this issues by moving to a suitable structure in the iio_priv()
data with alignment explicitly requested. This data is allocated
with kzalloc so no data can leak apart from previous readings.
Note that previously no data could leak 'including' previous readings
but I don't think it is an issue to potentially leak them like
this now does.In this case the postioning of the timestamp is depends on what
other channels are enabled. As such we cannot use a structure to
make the alignment explicit as it would be missleading by suggesting
only one possible location for the timestamp.Fixes: 815bbc87462a ("iio: ti-adc0832: add triggered buffer support")
Reported-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron
Reviewed-by: Andy Shevchenko
Cc: Akinobu Mita
Cc:
Link: https://lore.kernel.org/r/20200722155103.979802-25-jic23@kernel.org -
As part of the general cleanup of indio_dev->mlock, this change replaces
it with a local lock, to protect potential concurrent access to the
completion callback during a conversion.This is part of a bigger cleanup.
Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/Signed-off-by: Sergiu Cuciurean
Signed-off-by: Alexandru Ardelean
Reviewed-by: Krzysztof Kozlowski
Link: https://lore.kernel.org/r/20200916093123.78954-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron -
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/ad7949.c:58: warning: Function parameter or member 'indio_dev' not described in 'ad7949_adc_chip'
Signed-off-by: Lee Jones
Cc: Michael Hennerich
Cc: Charles-Antoine Couret
Link: https://lore.kernel.org/r/20200716135928.1456727-18-lee.jones@linaro.org
Signed-off-by: Jonathan Cameron -
As part of the general cleanup of indio_dev->mlock, this change replaces
it with a local lock, to protect against any other accesses during the
reading of sample. Reading a sample requires multiple consecutive regmap
operations and a completion callback, so this requires that no other
read occurs until it completes.This is part of a bigger cleanup.
Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/Signed-off-by: Sergiu Cuciurean
Signed-off-by: Alexandru Ardelean
Link: https://lore.kernel.org/r/20200916092928.78026-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron
21 Sep, 2020
1 commit
-
This patch fixes the device name typo.
Fixes: 951ad4700313 ("iio: adc: ad7124: move chip ID & name on the chip_info table")
Signed-off-by: Mircea Caprioru
Reviewed-by: Andy Shevchenko
Link: https://lore.kernel.org/r/20200902134222.28357-1-mircea.caprioru@analog.com
Signed-off-by: Jonathan Cameron
17 Sep, 2020
4 commits
-
Use only one line for the closing bracket of the last entry and the
opening bracket for the next one to keep the style across the whole
array consistent. Also add a "sentinel" comment to the last entry and
remove the comma to ensure that there won't be any entry after it.
No functional changes.Signed-off-by: Martin Blumenstingl
Link: https://lore.kernel.org/r/20200915192621.13202-1-martin.blumenstingl@googlemail.com
Signed-off-by: Jonathan Cameron -
The proper error code should be ENODEV (vs EINVAL) in case the chip ID
isn't recognized.Signed-off-by: Alexandru Ardelean
Link: https://lore.kernel.org/r/20200916082221.72851-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron -
We should probably print what the expected chip-ID is. We already have
that information available, based on the device specified via
device-tree.Signed-off-by: Alexandru Ardelean
Link: https://lore.kernel.org/r/20200916083128.73729-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron -
module_platform_driver() makes the code simpler by eliminating
boilerplate code.Signed-off-by: Liu Shixin
Link: https://lore.kernel.org/r/20200914065401.3726354-1-liushixin2@huawei.com
Signed-off-by: Jonathan Cameron