summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/ad5766.c
Commit message (Collapse)AuthorAgeFilesLines
* iio: dac: ad5766: Fix alignment for DMA safetyJonathan Cameron2022-06-141-1/+1
| | | | | | | | | | | ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: fd9373e41b9b ("iio: dac: ad5766: add driver support for AD5766") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20220508175712.647246-54-jic23@kernel.org
* iio: expose shared parameter in IIO_ENUM_AVAILABLEAntoniu Miclaus2021-11-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | The shared parameter should be configurable based on its usage, and not constrained to IIO_SHARED_BY_TYPE. This patch aims to improve the flexibility in using the IIO_ENUM_AVAILABLE define and avoid redefining custom iio enums that expose the shared parameter. An example is the ad5766.c driver where IIO_ENUM_AVAILABLE_SHARED was defined in order to achieve `shared` parameter customization. The current state of the IIO_ENUM_AVAILABLE implementation will imply similar redefinitions each time a driver will require access to the `shared` parameter. An example would be admv1013 driver which will require custom device attribute for the frequency translation modes: Quadrature I/Q mode and Intermediate Frequency mode. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211119085627.6348-1-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Merge tag 'iio-fixes-for-5.16a' of ↵Greg Kroah-Hartman2021-10-241-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: First set of IIO fixes for the 5.16 cycle As these are very late in the 5.15 cycle and non are particularly urgent, they can wait for the merge window. Key element in this set is Yang Yingliang has identified a number of issues in error paths introduced recently when we added multiple buffer support. Other fixes: * adi,ad5662 - Fix handling of i2c_master_send() return value. * adi,ad5766 - Fix a wrong dt-property name that indicated wrong units and did not mach the bindings. - Associated 'fix' of the bindings example to have a possible scale. * st,pressure-spi - Add some missing entries to the spi_device_id table to ensure auto-loading works. * ti,tsc2046 - Fix a backwards comparison leading to a false dev_warn * tag 'iio-fixes-for-5.16a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: buffer: Fix memory leak in iio_buffers_alloc_sysfs_and_mask() iio: adc: tsc2046: fix scan interval warning iio: core: fix double free in iio_device_unregister_sysfs() iio: core: check return value when calling dev_set_name() iio: buffer: Fix memory leak in iio_buffer_register_legacy_sysfs_groups() iio: buffer: Fix double-free in iio_buffers_alloc_sysfs_and_mask() iio: buffer: Fix memory leak in __iio_buffer_alloc_sysfs_and_mask() iio: buffer: check return value of kstrdup_const() iio: dac: ad5446: Fix ad5622_write() return value Documentation:devicetree:bindings:iio:dac: Fix val drivers: iio: dac: ad5766: Fix dt property name iio: st_pressure_spi: Add missing entries SPI to device ID table
| * drivers: iio: dac: ad5766: Fix dt property nameMihail Chindris2021-10-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | In the documentation the name for the property is output-range-microvolts which is a standard name, therefore this name must be used. Fixes: fd9373e41b9ba ("iio: dac: ad5766: add driver support for AD5766") Signed-off-by: Mihail Chindris <mihail.chindris@analog.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211007080035.2531-5-mihail.chindris@analog.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* | drivers:iio:dac:ad5766.c: Add trigger bufferMihail Chindris2021-10-191-0/+42
|/ | | | | | | | | | This chip is able to generate waveform and using an with the output trigger buffer will be easy to generate one. Signed-off-by: Mihail Chindris <mihail.chindris@analog.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211007080035.2531-7-mihail.chindris@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: dac: ad5766: Drop duplicate setting of iio_dev.dev.parent and of_nodeJonathan Cameron2021-05-171-2/+0
| | | | | | | | | | This is set to the same value in devm_iio_device_alloc() so no need to do it again. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Cristian Pop <cristian.pop@analog.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20210426170251.351957-3-jic23@kernel.org
* iio: dac: Rudimentary typo fixBhaskar Chowdhury2021-03-291-1/+1
| | | | | | | | | s/concurent/concurrent/ Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20210323012215.451075-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: dac: ad5766: add driver support for AD5766Cristian Pop2021-01-221-0/+643
The AD5766/AD5767 are 16-channel, 16-bit/12-bit, voltage output dense DACs Digital-to-Analog converters. This change adds support for these DACs. Signed-off-by: Cristian Pop <cristian.pop@analog.com> Link: https://lore.kernel.org/r/20210115112105.58652-3-cristian.pop@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>