Jonathan Cameron
15ea2878bf
iio: core: move @id from struct iio_dev to struct iio_dev_opaque
...
Continuing from Alexandru Ardelean's introduction of the split between
driver modifiable fields and those that should only be set by the core.
This could have been done in two steps to make the actual move after
introducing iio_device_id() but there seemed limited point to that
given how mechanical the majority of the patch is.
Includes fixup from Alex for missing mxs-lradc-adc conversion.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com >
Link: https://lore.kernel.org/r/20210426174911.397061-2-jic23@kernel.org
2021-05-17 13:49:13 +01:00
Jonathan Cameron
dbb8f20d83
iio:chemical:scd30: Use IRQF_NO_AUTOEN to avoid irq request then disable
...
This new flag cleanly avoids the need for a dance where we request the
interrupt only to immediately disabling it by ensuring it is not
auto-enabled in the first place.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Tomasz Duszynski <tomasz.duszynski@octakon.com >
Reviewed-by: Barry Song <song.bao.hua@hisilicon.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de >
Link: https://lore.kernel.org/r/20210402184544.488862-6-jic23@kernel.org
2021-04-07 08:36:39 +01:00
Gwendal Grignou
8a22522016
iio: fix devm_iio_trigger_alloc with parent.cocci
...
Use cocci semantic patch:
@@
expression trigger, P;
@@
trigger = devm_iio_trigger_alloc(P, ...);
...
- trigger->dev.parent = P;
To remove trigger->dev.parent, since it is set by default.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20210309193620.2176163-3-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-03-25 19:13:50 +00:00
Krzysztof Kozlowski
ed1759093c
iio: chemical: scd30: Simplify with dev_err_probe()
...
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Acked-by: Tomasz Duszynski <tomasz.duszynski@octakon.com >
Link: https://lore.kernel.org/r/20200829064726.26268-11-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2020-09-03 19:40:50 +01:00
Tomasz Duszynski
64b3d8b1b0
iio: chemical: scd30: add core driver
...
Add Sensirion SCD30 carbon dioxide core driver.
Signed-off-by: Tomasz Duszynski <tomasz.duszynski@octakon.com >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2020-06-27 14:46:44 +01:00