aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/iio/proximity/vcnl3020.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-21iio: Switch i2c drivers back to use .probe()Uwe Kleine-König1-1/+1
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230515205048.19561-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-06-14iio: proximity: vcnl3020: Drop unnecessary alignment requirement for i2c deviceJonathan Cameron1-2/+2
I2C does not by default use buffers directly for DMA so there is no need to ensure they are DMA safe. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Ivan Mikhaylov <i.mikhaylov@yadro.com> Acked-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20220508175712.647246-88-jic23@kernel.org
2021-07-24iio: proximity: vcnl3020: remove iio_claim/release_directIvan Mikhaylov1-12/+21
Remove iio_claim/release and change it on mutex accordingly in vcnl3020_write_proxy_samp_freq. Signed-off-by: Ivan Mikhaylov <i.mikhaylov@yadro.com> Link: https://lore.kernel.org/r/20210722154420.915082-4-i.mikhaylov@yadro.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-07-24iio: proximity: vcnl3020: add periodic modeIvan Mikhaylov1-3/+312
Add the possibility to run proximity sensor in periodic measurement mode with thresholds. Reported-by: kernel test robot <lkp@intel.com> #repeated include Signed-off-by: Ivan Mikhaylov <i.mikhaylov@yadro.com> Link: https://lore.kernel.org/r/20210722154420.915082-3-i.mikhaylov@yadro.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-07-24iio: proximity: vcnl3020: add DMA safe bufferIvan Mikhaylov1-4/+5
Add DMA safe buffer for bulk transfers. Signed-off-by: Ivan Mikhaylov <i.mikhaylov@yadro.com> Link: https://lore.kernel.org/r/20210722154420.915082-2-i.mikhaylov@yadro.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-03-25iio: proximity: vcnl3020: add proximity rateIvan Mikhaylov1-1/+96
Add the proximity rate optional option and handling of it for vishay vcnl3020. Signed-off-by: Ivan Mikhaylov <i.mikhaylov@yadro.com> Link: https://lore.kernel.org/r/20210225201444.12983-2-i.mikhaylov@yadro.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-06-14iio: remove left-over parent assignmentsAlexandru Ardelean1-1/+0
These were found by doing some shell magic: ------------ for file in $(git grep -w devm_iio_device_alloc | cut -d: -f1 | sort | uniq) ; do if grep 'parent =' $file | grep -v trig | grep -vq devm_; then echo "$file -> $(grep "parent =" $file)" fi done ----------- The output is bearable [after the semantic patch is applied]. There is a mix of trigger assignments with some iio device parent assignments that are removed via this patch. JC: A few more added via inspection of all parent = statements in drivers/iio. Some of these may just have crossed with this series, others were less obvious to scripting due to some cross file / module boundary calls. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-05-21iio: proximity: Add driver support for vcnl3020 proximity sensorIvan Mikhaylov1-0/+258
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.pdf Signed-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>