summaryrefslogtreecommitdiffstats
path: root/Documentation (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-10-20iio: adc: ti-ads7950: Make use of the helper function dev_err_probe()Cai Huoqing1-2/+2
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20211008092858.495-9-caihuoqing@baidu.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: adc: rockchip_saradc: Make use of the helper function dev_err_probe()Cai Huoqing1-15/+12
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20211008092858.495-8-caihuoqing@baidu.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: adc: qcom-pm8xxx-xoadc: Make use of the helper function dev_err_probe()Cai Huoqing1-5/+4
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. BTW, change the return value from 'ENXIO' to 'ENODEV', perfer ENODEV which means no such device. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20211008092858.495-7-caihuoqing@baidu.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: adc: meson_saradc: Make use of the helper function dev_err_probe()Cai Huoqing1-22/+17
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> #Meson8b Odroid-C1 Link: https://lore.kernel.org/r/20211008092858.495-6-caihuoqing@baidu.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: adc: max1241: Make use of the helper function dev_err_probe()Cai Huoqing1-9/+8
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20211008092858.495-5-caihuoqing@baidu.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: adc: max1118: Make use of the helper function dev_err_probe()Cai Huoqing1-4/+3
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20211008092858.495-4-caihuoqing@baidu.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: adc: lpc18xx_adc: Make use of the helper function dev_err_probe()Cai Huoqing1-8/+6
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20211008092858.495-3-caihuoqing@baidu.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: adc: imx7d_adc: Make use of the helper function dev_err_probe()Cai Huoqing1-12/+6
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20211008092858.495-2-caihuoqing@baidu.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: adc: ab8500-gpadc: Make use of the helper function dev_err_probe()Cai Huoqing1-13/+9
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20211008092858.495-1-caihuoqing@baidu.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: buffer: Fix uninitialized variable retColin Ian King1-1/+1
When !iio_buffer_space_available(rb) is true and signal_pending(current) is false the end of the do-while loop is reached and the uninitialized variable ret is zero checked. Fix this by initializing variable ret to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 9eeee3b0bf19 ("iio: Add output buffer support") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20211015153254.33783-1-colin.king@canonical.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: adc: lpc18xx_adc: Convert probe to device managed versionAndré Gustavo Nakagomi Lopez1-30/+31
The remove function and the goto sections are not necessary if devm functions are used. Convert device register to devm version. Add hook functions to release device resources, and use them inside probe with devm_add_action, which will release resources on driver detach. To maintain the order of which device resources were released/reseted, register the hook functions as soon as resources are obtained/initialized. Since devres actions are called on driver detach, the remove function and the error-handling goto sections are no longer necessary. Signed-off-by: André Gustavo Nakagomi Lopez <andregnl@usp.br> Link: https://lore.kernel.org/r/YWnMsGlc/I35gYvy@Andryuu.br Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: light: ltr501: Add of_device_id tableNikita Travkin1-0/+9
Add of_device_id table so the driver can be used on DT platforms without relying on i2c_device_id fallback. (So DT schema validation is possible) Signed-off-by: Nikita Travkin <nikita@trvn.ru> Link: https://lore.kernel.org/r/20211006163058.145842-4-nikita@trvn.ru Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-10-20iio: light: ltr501: Add rudimentary regulator supportNikita Travkin1-0/+28
On some platforms the supply regulators must be enabled before the sensor can work. Add vdd and vddio regulators for the sensor and IO bus power respectively. Signed-off-by: Nikita Travkin <nikita@trvn.ru> Link: https://lore.kernel.org/r/20211006163058.145842-3-nikita@trvn.ru Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>