summaryrefslogtreecommitdiffstats
path: root/drivers/iio/humidity/am2315.c
Commit message (Collapse)AuthorAgeFilesLines
* iio: Switch i2c drivers back to use .probe()Uwe Kleine-König2023-05-211-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>
* iio: humidity: am2315: Convert to i2c's .probe_new()Uwe Kleine-König2022-11-231-3/+2
| | | | | | | | | | The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20221118224540.619276-101-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: humidity: am2315: Fix buffer alignment in ↵Jonathan Cameron2021-05-171-6/+10
| | | | | | | | | | | | | | | iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: 0d96d5ead3f7 ("iio: humidity: Add triggered buffer support for AM2315") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210501170121.512209-12-jic23@kernel.org
* iio: am2315: Remove acpi_device_id tableGuenter Roeck2021-05-171-9/+0
| | | | | | | | | | | | | | | | | | | With CONFIG_ACPI=n and -Werror, 0-day reports: drivers/iio/humidity/am2315.c:259:36: error: 'am2315_acpi_id' defined but not used According to Andy Shevchenko, the ACPI ID used in this driver is fake and does not really exist. Remove it and with it ACPI support from the driver. Note that, if an explicit of_device_id table is added to the driver it could support the PRP0001 based ACPI approach. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: Remove kernel-doc keyword in file header commentGwendal Grignou2021-03-251-1/+1
| | | | | | | | | | | | | | | | | | | Remove kernel-doc keyword from function header comment. It fixes issues spotted by scripts/kernel-doc like: drivers/iio/<driver>.c:3: info: Scanning doc for function <component name> drivers/iio/<driver>.c:X: warning: expecting prototype for <component name>. Prototype was for <function>() instead To reproduce the errors: scripts/kernel-doc -v -none $(find drivers/iio/ -name \*.c \ -exec head -2 {} \+ | grep -B2 -e '\*\*' | grep '==' | cut -d ' ' -f 2) After, confirm these errors are gone with: scripts/kernel-doc -v -none $(git show --name-only | grep -e "^driver") Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20210309234314.2208256-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: remove explicit IIO device parent assignmentAlexandru Ardelean2020-06-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch applies the semantic patch: @@ expression I, P, SP; @@ I = devm_iio_device_alloc(P, SP); ... - I->dev.parent = P; It updates 302 files and does 307 deletions. This semantic patch also removes some comments like '/* Establish that the iio_dev is a child of the i2c device */' But this is is only done in case where the block is left empty. The patch does not seem to cover all cases. It looks like in some cases a different variable is used in some cases to assign the parent, but it points to the same reference. In other cases, the block covered by ... may be just too big to be covered by the semantic patch. However, this looks pretty good as well, as it does cover a big bulk of the drivers that should remove the parent assignment. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: humidity: Use device-managed APIsChuhong Yuan2019-07-271-21/+3
| | | | | | | | | Use device-managed APIs to simplify the code. The remove functions are redundant now and can be deleted. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330Thomas Gleixner2019-06-051-4/+1
| | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this file is subject to the terms and conditions of version 2 of the gnu general public license see the file copying in the main directory of this archive for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 55 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190530000436.108941081@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* iio:humidity: drop assign iio_info.driver_module and iio_trigger_ops.ownerJonathan Cameron2017-08-221-1/+0
| | | | | | | | | The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* iio: humidity: am2315: set up buffer timestamps for non-zero valuesAlison Schofield2016-08-151-1/+1
| | | | | | | | | | | Use the iio_pollfunc_store_time parameter during triggered buffer set-up to get valid timestamps. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-By: Tiberiu Breana <tiberiu.a.breana@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge 4.7-rc4 into staging-nextGreg Kroah-Hartman2016-06-201-3/+1
|\ | | | | | | | | | | | | We want the fixes in here, and we can resolve a merge issue in drivers/iio/industrialio-trigger.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * iio: humidity: am2315: Remove a stray unlockDan Carpenter2016-05-211-3/+1
| | | | | | | | | | | | | | | | | | We haven't taken the lock yet so we don't need to unlock here. Fixes: 0d96d5ead3f7 ('iio: humidity: Add triggered buffer support for AM2315') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: Export I2C module alias informationJavier Martinez Canillas2016-05-211-0/+1
|/ | | | | | | | | | | | | The I2C drivers have an i2c_device_id array but that information isn't exported to the modules using the MODULE_DEVICE_TABLE() macro. So the modules autoloading won't work if the I2C device is registered using OF or legacy board files due missing alias information in the modules. The issue was found using Kieran Bingham's coccinelle semantic patch: https://lkml.org/lkml/2016/5/10/520 Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: humidity: Add triggered buffer support for AM2315Tiberiu Breana2016-04-241-3/+78
| | | | | Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: humidity: Add support for AM2315Tiberiu Breana2016-04-241-0/+228
Add basic support for the Aosong AM2315 relative humidity and ambient temperature sensor. Includes support for raw readings and ACPI detection. Datasheet: http://www.aosong.com/asp_bin/Products/en/AM2315.pdf Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>