An error occurred fetching the project authors.
- 23 May, 2020 1 commit
-
-
Greg Kroah-Hartman authored
Merge tag 'iio-for-5.8c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Third set of IIO new device support, cleanups etc for the 5.8 cycle. A rather late final set to pick up a couple of new drivers, a bunch of cleanup and some fixes that can wait for the merge window. In particularly I'd like to highlight the great core and driver cleanup work that the Alex and the team at Analog devices are currently doing. Should see lots more of that in the next cycle give what is currently under review. This pull also has the first few fixes squashing a class of alignment and small kernel data leak bugs that Lars-Peter Clausen picked up on in a review. Quite a few more of those to come. They've been there a long time so we aren't rushing the reviews. New device support * atlas ezo - new driver supporting this range of chemical and similar sensors with the odd interface of ascii strings over i2c. * bma180 - bma023, bma150 and smb380 support. Note these are currently also supported by a driver in input which we will hopefully remove (eventually). There are Kconfig protections to avoid a clash in the meantime. * vcnl3020 - new driver for this proximity sensor. Core change * during buffer updates, change the current state variable before we actually call pre and post enable callbacks so drivers can know where we are going. Note this is a precursor to only exposing one enable callback to drivers. The (false) logic behind having two such callbacks has long been fixed, but only now is the mess getting cleaned up. Features * exynos adc. - add reporting of channels scale values. Cleanups and minor fixes. * core - drop now unused attrcount_orig variable. * ad5360, ad5446, ad5449, ad5755, ad5761, ad5764, ad5380, ad5421, ad5592, ad5686 and vf610_dac - remove direct use of iio_dev->mlock from all these drivers. Its semantics used to be poorly defined, but now it is for core use only. Removing it's use in drivers has been a long process of which this is the latest step! * exynos_adc - drop a pointless check on the phy as the driver doesn't access it. * ping - avoid a dance from iio_priv and iio_priv_to_dev back again by just passing the iio_dev into the functions. * pms7003 - alignment and potential data leak fix. * sps30 - alignment bug fix. * tag 'iio-for-5.8c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (31 commits) iio:chemical:pms7003: Fix timestamp alignment and prevent data leak. iio:chemical:sps30: Fix timestamp alignment iio: adc: stm32-adc: fix a wrong error message when probing interrupts iio: light: gp2ap002: Take runtime PM reference on light read iio: proximity: ping: pass reference to IIO device as param to ping_read() iio: dac: ad5592r-base: Replace indio_dev->mlock with own device lock iio: proximity: Add driver support for vcnl3020 proximity sensor dt-bindings: proximity: provide vcnl3020 device tree binding document iio: buffer: remove attrcount_orig var from sysfs creation iio: chemical: add atlas-ezo-sensor initial support dt-bindings: iio: chemical: add CO2 EZO module documentation iio: adc: exynos: Simplify Exynos7-specific init iio: adc: Add scaling support to exynos adc driver iio: __iio_update_buffers: Update mode before preenable/after postdisable iio: dac: vf610_dac: Replace indio_dev->mlock with own device lock iio: dac: ad5686: Replace indio_dev->mlock with own device lock iio: dac: ad5421: Replace indio_dev->mlock with own device lock iio: dac: ad5380: Replace indio_dev->mlock with own device lock iio: dac: ad5764: Replace indio_dev->mlock with own device lock iio: dac: ad5761: Replace indio_dev->mlock with own device lock ...
-
- 22 May, 2020 15 commits
-
-
Jonathan Cameron authored
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 appart from previous readings. Fixes: a1d64226 ("iio: chemical: add support for Plantower PMS7003 sensor") Reported-by:
Lars-Peter Clausen <lars@metafoo.de> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: <Stable@vger.kernel.org> Acked-by:
Tomasz Duszynski <tomasz.duszynski@octakon.com>
-
Jonathan Cameron authored
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. Fixes: 232e0f6d ("iio: chemical: add support for Sensirion SPS30 sensor") Reported-by:
Lars-Peter Clausen <lars@metafoo.de> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: <Stable@vger.kernel.org> Acked-by:
Tomasz Duszynski <tomasz.duszynski@octakon.com>
-
Fabrice Gasnier authored
A wrong error message is printed out currently, like on STM32MP15: - stm32-adc-core 48003000.adc: IRQ index 2 not found. This is seen since commit 7723f4c5 ("driver core: platform: Add an error message to platform_get_irq*()"). The STM32 ADC core driver wrongly requests up to 3 interrupt lines. It should request only the necessary IRQs, based on the compatible: - stm32f4/h7 ADCs share a common interrupt - stm32mp1, has one interrupt line per ADC. So add the number of required interrupts to the compatible data. Fixes: d58c67d1 ("iio: adc: stm32-adc: add support for STM32MP1") Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@st.com> Cc: <Stable@vger.kernel.org> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Bakker authored
The light sensor needs the regulators to be enabled which means the runtime PM needs to be on. This only happened when the proximity part of the chip was enabled. As fallout from this change, only report changes to the prox state in the interrupt handler when it is explicitly enabled. Fixes: 97d642e2 ("iio: light: Add a driver for Sharp GP2AP002x00F") Signed-off-by:
Jonathan Bakker <xc-racer2@live.ca> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Malcolm Priestley authored
vnt_fill_txkey now has access to tx_buffer move cipher frag controls The icv_len is the only thing needed from hw_key in vnt_tx_packet. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/bb91b159-387a-005b-f614-c541de128c40@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
Change vnt_fill_txkey to return true if mic_hdr is needed and change calling point at where it is to be placed. tx_buffer is already in tx_context. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/f08a6f07-a77e-0b8e-cb05-505a1f995683@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
tx_key can be got directly from info. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/1b964a6c-5cf7-e675-cf53-3a632acc0be9@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
both variables can be removed and replaced with skb->len. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/12e96cb5-a2a5-de3c-ebe7-ca5a4e2b5594@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
Use vnt_tx_fifo_head to point directly at tx_key removing key_buffer. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/3631f327-1386-90a2-ba9a-bb62617f3c66@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
Use the control for rts/cts exhanges replacing need_rts and use_cts_prot for packet type PK_TYPE_11GB / PK_TYPE_11GA Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/1b21b3db-b9ef-c167-8f88-b32646ba5a19@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
Use the info->control.hw_key to replace need mic which is only present when info->control.hw_key->cipher == WLAN_CIPHER_SUITE_CCMP. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/e8969f47-ffc7-6eb6-9f3c-72b06970c1b8@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
mic_hdr has three possible locations ieee80211_tx_info can controls these with control.use_cts_prot for rts or cts exchange or otherwise the rts/data position. Removing double pointer. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/6420a6ae-82eb-f794-fa7c-bac419222ad6@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
need_ack is no longer used by driver remove it. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/f19dfbde-23a6-ba79-d988-576d2e3bcf62@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
It is only used in one place were it can be pointed to at skb->data. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/556fab01-aa1e-154e-149e-c04feeb76efa@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
Currently HSD20_IPS is defined as "true" and will always result in a non-zero result even if it is defined as "false" because it is an array and that will never be zero. Fix this by defining it as an integer 1 rather than a literal string. Addessses-Coverity: ("Array compared against 0") Fixes: f03c9b78 ("staging: fbtft: fb_st7789v: Initialize the Display") Signed-off-by:
Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200521135038.345878-1-colin.king@canonical.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 21 May, 2020 7 commits
-
-
Alexandru Ardelean authored
Since there will be some changes to how iio_priv_to_dev() is implemented, it could be that the helper becomes a bit slower, as it will be hidden away in the IIO core. But even without that rework, this looks like it can pass the 'indio_dev' object to ping_read() and obtain the state struct via iio_priv() which is a preferred practice than going back-n-forth (getting the state-struct, then using iio_priv_to_dev() to get the indio_dev object back). Signed-off-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Sergiu Cuciurean authored
As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock on the device's state structure. This also removes unused iio_dev pointers. Signed-off-by:
Sergiu Cuciurean <sergiu.cuciurean@analog.com> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ivan Mikhaylov authored
Proximity sensor driver based on light/vcnl4000.c code. For now supports only the single on-demand measurement. The VCNL3020 is a fully integrated proximity sensor. Fully integrated means that the infrared emitter is included in the package. It has 16-bit resolution. It includes a signal processing IC and features standard I2C communication interface. It features an interrupt function. Datasheet: http://www.vishay.com/docs/84150/vcnl3020.pdfSigned-off-by:
Ivan Mikhaylov <i.mikhaylov@yadro.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ivan Mikhaylov authored
Mostly standard i2c driver with some additional led-current option for vcnl3020. Signed-off-by:
Ivan Mikhaylov <i.mikhaylov@yadro.com> Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
John Oldman authored
clear below issues reported by checkpatch.pl: CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by:
John Oldman <john.oldman@polehill.co.uk> Link: https://lore.kernel.org/r/20200521084732.12576-1-john.oldman@polehill.co.ukSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mitchell Tasman authored
In several cases where a pointer marked as __user is (intentionally) assigned or passed to a non-marked target, cast to the target pointer type with a __force directive to quiet warnings from sparse. Signed-off-by:
Mitchell Tasman <tasman@leaflabs.com> Link: https://lore.kernel.org/r/20200519004531.33158-1-tasman@leaflabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Oldman authored
fix below issue reported by checkpatch.pl: CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by:
John Oldman <john.oldman@polehill.co.uk> Link: https://lore.kernel.org/r/20200520163719.14463-1-john.oldman@polehill.co.ukSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 19 May, 2020 10 commits
-
-
Pascal Terjan authored
This causes a change in behaviour: - stats also get updated when reordering, this seems like it should be the case but those lines were commented out. - sub_skb NULL check now happens early in both cases, previously it happened only after dereferencing it 12 times, so it may not actually be needed. Signed-off-by:
Pascal Terjan <pterjan@google.com> Link: https://lore.kernel.org/r/20200519150042.199690-1-pterjan@google.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
Use usb_anchor to track tx submitted urbs and initialize the urb as needed in vnt_tx_context. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/077f42f8-4f7f-adc4-5a14-955165cef9f1@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
A limit is also placed in vnt_tx_context of MAX_TOTAL_SIZE_WITH_ALL_HEADERS limiting size. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/9416e1a8-bd72-ffb1-5366-78361d053907@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
Create room for vnt_tx_short_buf_head in sk_buff and vnt_tx_usb_header. The struct ieee80211_mgmt is not longer in the header and is at the initial skb->data point. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/5f00d319-9242-65b2-d100-dcfe9b0e32be@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
mac80211 can provide space for the driver to put a tx header on the skb buffer instead coping the entire frame on to a local buffer with the header. To use this extra_tx_headroom must be set in mac80211 with the largest possible header which is struct vnt_tx_buffer. The driver has 8 possible combinations of tx header size which are found in vnt_get_hdr_size replacing vnt_mac_hdr_pos. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/7b967bfc-1d4b-4b45-efab-d54f16cca226@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mohamed Dawod authored
Fixing some typo errors in traces.h file Signed-off-by:
Mohamed Dawod <mhm.dawod@gmail.com> Link: https://lore.kernel.org/r/20200518062445.GA13044@dinuxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xiangyang Zhang authored
DMA not unmapped when lock failed, this patch fixed it. Signed-off-by:
Xiangyang Zhang <xyz.sun.ok@gmail.com> Fixes: 4322c5be ("qlge: Expand coverage of hw lock for config register.") Link: https://lore.kernel.org/r/20200517054638.10764-1-xyz.sun.ok@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Oldman authored
fix below issue reported by checkpatch: CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by:
John Oldman <john.oldman@polehill.co.uk> Link: https://lore.kernel.org/r/20200516163327.9197-1-john.oldman@polehill.co.ukSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Oldman authored
fix below issue reported by checkpatch CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by:
John Oldman <john.oldman@polehill.co.uk> Link: https://lore.kernel.org/r/20200515173108.14739-1-john.oldman@polehill.co.ukSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Oldman authored
Coding style issues: This patch clears the checkpatch.pl "braces {} are not necessary for single statement blocks" and "else_should_follow_close_brace" warnings. Signed-off-by:
John Oldman <john.oldman@polehill.co.uk> Link: https://lore.kernel.org/r/20200515165646.12867-1-john.oldman@polehill.co.ukSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 16 May, 2020 7 commits
-
-
Alexandru Ardelean authored
The variable no longer does anything. It should have been removed with commit 2e036804 ("iio: buffer: remove 'scan_el_attrs' attribute group from buffer struct"). That was about the last time this was needed. Signed-off-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Matt Ranostay authored
Add driver for Atlas EZO line of sensors with initial support for CO2 the sensor. This is effectively ASCII strings proxied over I2C due to these series of sensors being by default UART. Signed-off-by:
Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Matt Ranostay authored
Cc: devicetree@vger.kernel.org Signed-off-by:
Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Krzysztof Kozlowski authored
The Exynos7-specific code bits in ADC driver do not play with PHY: the field exynos_adc_data.needs_adc_phy is not set in exynos7_adc_data instance. Therefore the initialization code does not have to check if it is true. Signed-off-by:
Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by:
Alim Akhtar <alim.akhtar@samsung.com> Tested-by:
Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Bakker authored
Currently the driver only exposes the raw counts. As we have the regulator voltage and the maximum value (stored in the data mask), we can trivially produce a scaling fraction of voltage / max value. This assumes that the regulator voltage is in fact the max voltage, which appears to be the case for all mainline dts and cross referenced with the public Exynos4412 and S5PV210 datasheets. Signed-off-by:
Jonathan Bakker <xc-racer2@live.ca> Reviewed-by:
Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
It is clear that we transition to INDIO_DIRECT_MODE when disabling the buffer(s) and it is also clear that we transition from INDIO_DIRECT_MODE when enabling the buffer(s). So leaving the currentmode field INDIO_DIRECT_MODE until after the preenable() callback and updating it to INDIO_DIRECT_MODE before the postdisable() callback doesn't add additional value. On the other hand some drivers will need to perform different actions depending on which mode the device is going to operate in/was operating in. Moving the update of currentmode before preenable() and after postdisable() enables us to have drivers which perform mode dependent actions in those callbacks. Note, was originally not intended as such, but fixes an issue introduced in the at91-sama5d2 adc driver. Signed-off-by:
Lars-Peter Clausen <lars@metafoo.de> Signed-off-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Fixes: 065056cb ("iio: at91-sama5d2_adc: split at91_adc_current_chan_is_touch() helper") Tested-by:
Eugen Hristev <eugen.hristev@microchip.com> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Sergiu Cuciurean authored
As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock on the device's state structure. Signed-off-by:
Sergiu Cuciurean <sergiu.cuciurean@analog.com> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-