Jonathan Cameron
5672f3982a
iio: light: tsl2591: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr()
...
Using these new macros allows removal of unused pm_ops structure and
functions if !CONFIG_PM without the need to mark the functions
__maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Joe Sandom <joe.g.sandom@gmail.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-32-jic23@kernel.org
2022-07-18 18:48:19 +01:00
Jonathan Cameron
f541541a37
iio: light: tsl2583: Use DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr()
...
Using these new macros allows removal of unused pm_ops structure
and functions if !CONFIG_PM without the need to mark the function
__maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Brian Masney <masneyb@onstation.org >
Reviewed-by: Brian Masney <masneyb@onstation.org >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-31-jic23@kernel.org
2022-07-18 18:48:19 +01:00
Jonathan Cameron
9ec91dd4e9
iio: light: isl29028: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr()
...
Using these new macros allows removal of unused pm_ops structure
and functions if !CONFIG_PM without the need to mark the functions
__maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Brian Masney <masneyb@onstation.org >
Reviewed-by: Brian Masney <masneyb@onstation.org >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-30-jic23@kernel.org
2022-07-18 18:48:19 +01:00
Jonathan Cameron
7b79cda9e2
iio: light: gp2ap002: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr()
...
Switching to these newer macros allows use of pm_ptr() to remove
the unused functions and structure if !CONFIG_PM without the need to
mark anything __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-29-jic23@kernel.org
2022-07-18 18:48:19 +01:00
Jonathan Cameron
2583f5e828
iio: adc: imx8qxp: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr()
...
Switching to these newer macros allows the compiler to remove
the unused functions and struct dev_pm_ops if !CONFIG_PM without
the need to mark anything __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Cai Huoqing <cai.huoqing@linux.dev >
Reviewed-by: Haibo Chen <haibo.chen@nxp.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-28-jic23@kernel.org
2022-07-18 18:48:19 +01:00
Jonathan Cameron
a79163d19e
iio: light: us5182: Switch from CONFIG_PM guards to pm_ptr() etc
...
Letting the compiler remove these functions when the kernel is built
without CONFIG_PM support is simpler and less error prone than the
use of #ifdef based config guards.
Removing instances of this approach from IIO also stops them being
copied into new drivers.
Very likely it would be safe to use DEFINE_RUNTIME_DEV_PM_OPS() here,
but that would be a functional change.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-27-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
fb4e8e2dad
iio: temperature: ltc2983: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-26-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
dc69c61019
iio: proximity: cros_ec_mkbp: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Cc: Gwendal Grignou <gwendal@chromium.org >
Cc: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Gwendal Grignou <gwendal@chromium.org >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-25-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
dc0258e33d
iio: light: cm3605: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-24-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
7eff2dcec6
iio: light: bh1750: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Tomasz Duszynski <tduszyns@gmail.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-23-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
c422aa418a
iio: light: as73211: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Christian Eggers <ceggers@arri.de >
Reviewed-by: Christian Eggers <ceggers@arri.de >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-22-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
f3231f912b
iio: light: al3320a: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: David Heidelberg <david@ixit.cz >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-21-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
dc064f21ea
iio: light: al3010: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: David Heidelberg <david@ixit.cz >
Reviewed-by: David Heidelberg <david@ixit.cz >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-20-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
b220558c0f
iio: health: afe4404: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-19-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
3d691c6a9f
iio: health: afe4403: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-18-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
fa55750642
iio: gyro: itg3200: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-17-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
bf19b23591
iio: dac: mcp4725: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Philippe Reynes <tremyfr@yahoo.fr >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-16-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
c9ccad9911
iio: dac: max5821: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Philippe Reynes <tremyfr@yahoo.fr >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-15-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
7b9d3e85d7
iio: dac: max517: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Marcus Folkesson <marcus.folkesson@gmail.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-14-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
83a2aa2646
iio: dac: ltc1660: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Marcus Folkesson <marcus.folkesson@gmail.com >
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-13-jic23@kernel.org
2022-07-18 18:48:18 +01:00
Jonathan Cameron
46b7116712
iio: dac: ds4424: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Ismail H. Kose <ihkose@gmail.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-12-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
479e575aee
iio: chemical: scd4x: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Roan van Dijk <roan@protonic.nl >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-11-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
3b4a1bd839
iio: adc: xilinx-ams: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Michal Simek <michal.simek@xilinx.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-10-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
0fda2c652d
iio: adc: ti-am335x: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Miquel Raynal <miquel.raynal@bootlin.com >
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-9-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
0b1e58e9ed
iio: adc: stmpe-adc: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused. This one is a little unusual as
no suspend callback, but the cleanup is still worthwhile (and eventual
aim is to get rid of old macro).
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Philippe Schenker <philippe.schenker@toradex.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-8-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
7ff1d28cc5
iio: adc: mt6577_auxadc: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Zhiyong Tao <zhiyong.tao@mediatek.com >
Cc: Hui Liu <hui.liu@mediatek.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-7-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
507379983b
iio: adc: meson_saradc: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com >
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-6-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
cdb7781059
iio: adc: imx7d_adc: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
In this case we only gain the ability to have the compiler drop the
struct dev_pm_ops because the callbacks are called from paths other
than suspend and resume. In general the purpose of this new macro
is to allow automated removal of the callbacks as well, but that doesn't
apply here.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Haibo Chen <haibo.chen@nxp.com >
Reviewed-by: Haibo Chen <haibo.chen@nxp.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-5-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
45dc8c59e1
iio: adc: at91-sam5d2: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Eugen Hristev <eugen.hristev@microchip.com >
Cc: Nicolas Ferre <nicolas.ferre@microchip.com >
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com >
Cc: Ludovic Desroches <ludovic.desroches@microchip.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-4-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
078d37b73f
iio: adc: ad799x: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-3-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
93a73f6a26
iio: accel: bma220: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-2-jic23@kernel.org
2022-07-18 18:48:17 +01:00
Jonathan Cameron
81e2445132
iio: adc: ti-ads124s08: Drop unused parameter to ads124s_read()
...
The channel number is never used in this call, so don't pass it in.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Link: https://lore.kernel.org/r/20220626153828.589664-1-jic23@kernel.org
2022-07-18 18:43:42 +01:00
Jonathan Cameron
41a7d6718b
iio: ABI: stm32-timer-trigger: Fuse unusual ABI into main doc.
...
We can't duplicate the description of sampling_frequency. This device
has some unusual requirements which we solved by giving a
sampling_frequency of 0 special meaning. As such add a note
about this unusual usage to the main documentation.
Whilst I don't particularly like this resolution, it is the best
I could come up with given earlier discussion on this topic.
Link: https://lore.kernel.org/linux-iio/20210315101217.00002c50@Huawei.com/
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com >
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org >
Link: https://lore.kernel.org/r/20220626165511.602202-4-jic23@kernel.org
2022-07-18 18:38:34 +01:00
Jonathan Cameron
c089f6fc4a
iio: ABI: max31865: Drop in_filter_notch_centre_frequency as in main docs.
...
As this is the last element in the file, also delete the file.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Navin Sankar Velliangiri <navin@linumiz.com >
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org >
Link: https://lore.kernel.org/r/20220626165511.602202-3-jic23@kernel.org
2022-07-18 18:38:31 +01:00
Jonathan Cameron
6c6a6ee939
iio: ABI: temperature: Unify documentation for thermocouple fault detection.
...
Kernel documentation for a given ABI element should not be duplicated
in multiple files, so pull them into one higher level documentation file.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Navin Sankar Velliangiri <navin@linumiz.com >
Cc: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com >
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org >
Link: https://lore.kernel.org/r/20220626165511.602202-2-jic23@kernel.org
2022-07-18 18:38:27 +01:00
Joe Simmons-Talbott
295cc4268b
iio: Be consistent with allocation result tests.
...
Make both allocation result tests use the same format
if (!ptr)
Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com >
Link: https://lore.kernel.org/r/20220718020348.32047-1-joetalbott@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-18 18:29:30 +01:00
Joe Simmons-Talbott
ef7ceceeb1
iio: Use parens with sizeof
...
Prefer 'sizeof(var)' over 'sizeof var' as reported by checkpatch.pl.
Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com >
Link: https://lore.kernel.org/r/20220717153438.10800-1-joetalbott@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-18 18:29:29 +01:00
Tomer Maimon
3ccb252400
iio: adc: npcm: Add NPCM8XX support
...
Adding ADC NPCM8XX support to NPCM ADC driver.
ADC NPCM8XX uses a different resolution and voltage reference.
As part of adding NPCM8XX support:
- Add NPCM8XX specific compatible string.
- Add data to handle architecture-specific ADC parameters.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com >
Link: https://lore.kernel.org/r/20220713132640.215916-3-tmaimon77@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-18 18:29:29 +01:00
Tomer Maimon
f0b4913ad0
dt-bindings: iio: adc: npcm: Add npcm845 compatible string
...
Add a compatible string for Nuvoton BMC NPCM845 ADC.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20220713132640.215916-2-tmaimon77@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-18 18:29:29 +01:00
Gwendal Grignou
0b4ae3f6d1
iio: cros: Register FIFO callback after sensor is registered
...
Instead of registering callback to process sensor events right at
initialization time, wait for the sensor to be register in the iio
subsystem.
Events can come at probe time (in case the kernel rebooted abruptly
without switching the sensor off for instance), and be sent to IIO core
before the sensor is fully registered.
Fixes: aa984f1ba4 ("iio: cros_ec: Register to cros_ec_sensorhub when EC supports FIFO")
Reported-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Gwendal Grignou <gwendal@chromium.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Link: https://lore.kernel.org/r/20220711144716.642617-1-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-18 18:29:13 +01:00
Liam Beguin
0565d238b9
iio: test: rework Kconfig to support modules
...
Rework the IIO test Kconfig to support building KUnit tests as modules.
This lets users execute tests at runtime in addition to the usual
tools/testing/kunit/kunit.py script.
Signed-off-by: Liam Beguin <liambeguin@gmail.com >
Link: https://lore.kernel.org/r/20220710013109.3349104-6-liambeguin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 19:03:41 +01:00
Liam Beguin
cf9a4b58b5
iio: afe: rescale: export symbols used during testing
...
In preparation for module support, export symbols use during testing.
Signed-off-by: Liam Beguin <liambeguin@gmail.com >
Link: https://lore.kernel.org/r/20220710013109.3349104-5-liambeguin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 19:01:14 +01:00
Liam Beguin
1c796caff0
iio: test: format: follow CONFIG_ naming convention
...
The KUnit documentation indicates that all KUnit Kconfig entries must
match CONFIG_<name>_KUNIT_TEST: where <name> is the name of the test
suite. Rename the IIO_TEST_FORMAT configuration accordingly.
Signed-off-by: Liam Beguin <liambeguin@gmail.com >
Link: https://lore.kernel.org/r/20220710013109.3349104-4-liambeguin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 19:01:14 +01:00
Liam Beguin
520f94b6aa
iio: test: format: add MODULE_* information
...
In preparation for module support, add missing MODULE_* information.
Signed-off-by: Liam Beguin <liambeguin@gmail.com >
Link: https://lore.kernel.org/r/20220710013109.3349104-3-liambeguin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 19:01:14 +01:00
Liam Beguin
53a2a90d52
iio: test: rescale: add MODULE_* information
...
In preparation for module support, add missing MODULE_* information.
Signed-off-by: Liam Beguin <liambeguin@gmail.com >
Link: https://lore.kernel.org/r/20220710013109.3349104-2-liambeguin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 19:01:14 +01:00
Thorsten Scherer
6edac2daa9
iio: adc: ad7949: Fix error message
...
Signed-off-by: Thorsten Scherer <t.scherer@eckelmann.de >
Reviewed-by: Liam Beguin <liambeguin@gmail.com >
Link: https://lore.kernel.org/r/20220708201720.16523-1-t.scherer@eckelmann.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 18:50:24 +01:00
William Breathitt Gray
e1d965cebe
iio: dac: cio-dac: Cleanup indexing for DAC writes
...
Simplify DAC write code by defining base member as u16 __iomem *; DAC
registers are 16-bit so this allows us to index each DAC channel
directly in a loop rather than calculating the offsets by multipling by
2 each time.
Signed-off-by: William Breathitt Gray <william.gray@linaro.org >
Link: https://lore.kernel.org/r/d9dab6696af7eabb2d46f5cbc7871329f499c1c9.1657213745.git.william.gray@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 18:48:20 +01:00
William Breathitt Gray
6cfd14c54b
iio: adc: stx104: Implement and utilize register structures
...
Reduce magic numbers and improve code readability by implementing and
utilizing named register data structures.
Tested-by: Fred Eckert <Frede@cmslaser.com >
Signed-off-by: William Breathitt Gray <william.gray@linaro.org >
Link: https://lore.kernel.org/r/8cb91d5b53e57b066120e42ea07000d6c7ef5543.1657213745.git.william.gray@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 18:48:19 +01:00
Marcus Folkesson
98a30ae0b3
iio: magnetometer: rm3100: do not explicity set INDIO_BUFFER_TRIGGERED mode
...
The core sets INDIO_BUFFER_TRIGGERED as part of
devm_iio_triggered_buffer_setup().
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Link: https://lore.kernel.org/r/20220702085005.31666-1-marcus.folkesson@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 17:57:22 +01:00
Andy Shevchenko
f1e252c5d2
iio: proximity: sx_common: Allow IIO core to take care of firmware node
...
IIO core correctly will take care of firmware node if it's not set in
the driver. Drop ACPI and OF specifics from the driver and allow IIO
core to handle this.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Gwendal Grignou <gwendal@chromium.org >
Link: https://lore.kernel.org/r/20220615114746.2767-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 16:41:33 +01:00