- 23 Jan, 2022 40 commits
-
-
Lars-Peter Clausen authored
sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in checks for size and alignment. Use sysfs_emit() to format the custom `fault_ovuv`, `fault_oc` and `in_temp_filter_notch_center_frequency` device attributes of the max31856 driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211216185217.1054495-9-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in checks for size and alignment. Use sysfs_emit() to format the custom device attributes of the lm3533 driver. Note this driver was using scnprintf correctly so this change is about ensuring examples of code that might get cut and paste into new drivers are using current best practice. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20211216185217.1054495-8-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in checks for size and alignment. Use sysfs_emit() to format the custom `in_allow_async_readout` device attribute of the ina2xx-adc driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211216185217.1054495-7-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in checks for size and alignment. Use sysfs_emit() to format the custom `noise_level_tripped` device attribute of the as3935 driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211216185217.1054495-6-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in checks for size and alignment. Use sysfs_emit() to format the custom device attributes of the ad9523 driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211216185217.1054495-5-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in checks for size and alignment. Use sysfs_emit() to format the custom `ac_excitation` and `bridge_swtich` attributes of the ad7192 driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211216185217.1054495-4-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in checks for size and alignment. Use sysfs_emit() for the `length_align_bytes` buffer attribute. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211216185217.1054495-3-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in checks for size and alignment. This patch converts the places in the IIO core that follow the pattern of return s*printf(...) to return sysfs_emit(...) This covers the new places that have been introduced where sprintf() is used for formatting sysfs output since the last time this was done in commit 83ca56b6 ("iio: core: Use sysfs_emit() (trivial bits)"). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211216185217.1054495-2-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Oleksij Rempel authored
Initially this was designed to: | Fix sleeping in atomic context warning and a deadlock after iio_trigger_poll() | call | | If iio_trigger_poll() is called after IRQ was disabled, we will call | reenable_trigger() directly from hard IRQ or hrtimer context instead of | IRQ thread. In this case we will run in to multiple issue as sleeping in atomic | context and a deadlock. | | To avoid this issue, rework the trigger to use state machine. All state | changes are done over the hrtimer, so it allows us to drop fsleep() and | avoid the deadlock. Since this issue was fixed by: 9020ef65 ("iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046"). This patch is a cleanup to make state machine easier to follow. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/r/20220111130402.3404769-1-o.rempel@pengutronix.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Antoniu Miclaus authored
Add myself as maintainer for the ADRF6780 driver. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Link: https://lore.kernel.org/r/20220103111624.82262-1-antoniu.miclaus@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Antoniu Miclaus authored
The forum link for the Analog Devices linux drivers has changed. Fix the links to redirect to the correct forum subsection. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Link: https://lore.kernel.org/r/20220103104412.81247-1-antoniu.miclaus@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Miquel Raynal authored
This is an internal variable, which should be accessed in a very sporadic way and in no case changed by any device driver. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211215151344.163036-2-miquel.raynal@bootlin.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Guodong Liu authored
This commit adds mt8186 compatible node. Signed-off-by: Guodong Liu <guodong.liu@mediatek.com> Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220110084841.575-2-guodong.liu@mediatek.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Guodong Liu authored
This commit adds dt-binding documentation of auxadc for Mediatek MT8186 SoC Platform. Signed-off-by: Guodong Liu <guodong.liu@mediatek.com> Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220110084841.575-1-guodong.liu@mediatek.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nikita Yushchenko authored
This patch makes I2C and SPI interface drivers for STMicroelectronics sensor chips individually selectable via Kconfig. The default is kept unchanged - I2C and SPI interface drivers are still selected by default if the corresponding bus support is available. However, the patch makes it possible to explicitly disable drivers that are not needed for a particular target. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220110152432.3799227-1-nikita.yoush@cogentembedded.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lad Prabhakar authored
Fix typo RZG2L_ADSMP_DEFUALT_SAMPLING -> RZG2L_ADSMP_DEFAULT_SAMPLING. Reported-by: Pavel Machek <pavel@denx.de> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Pavel Machek <pavel@denx.de> Link: https://lore.kernel.org/r/20220107172529.12361-1-prabhakar.mahadev-lad.rj@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Rob Herring authored
Best practice for multi-cell property values is to bracket each multi-cell value. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220106182518.1435497-3-robh@kernel.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
Previously inconsistent with a space after { but not before }. Tidy that up to avoid providing a bad example that might get copied into other drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-17-jic23@kernel.org
-
Jonathan Cameron authored
Previously inconsistent with a space after { but not before }. Tidy that up to avoid providing a bad example that might get copied into other drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Ivan Drobyshevskyi <drobyshevskyi@gmail.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-16-jic23@kernel.org
-
Jonathan Cameron authored
The final entry was missing a space. Tidy that up. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-15-jic23@kernel.org
-
Jonathan Cameron authored
Previously inconsistent with a space after { but not before }. Tidy that up to avoid providing an example to copy into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-14-jic23@kernel.org
-
Jonathan Cameron authored
Previously inconsistent with space after { but not before }. Tidy that up to avoid providing a bad example to copy into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-13-jic23@kernel.org
-
Jonathan Cameron authored
Previously inconsistent with space after { and not before }. Tidy that up to avoid providing a bad example to copy into new drivers. 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: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-12-jic23@kernel.org
-
Jonathan Cameron authored
The spacing was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-11-jic23@kernel.org
-
Jonathan Cameron authored
The spacing in this driver was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Andreas Klinger <ak@it-klinger.de> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-10-jic23@kernel.org
-
Jonathan Cameron authored
The spacing in this driver was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Andreas Klinger <ak@it-klinger.de> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-9-jic23@kernel.org
-
Jonathan Cameron authored
The spacing in this driver was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-8-jic23@kernel.org
-
Jonathan Cameron authored
The spacing in this driver was inconsistent so make sure we have a space after { and before } for the two id tables. Avoid providing examples of this inconsistency that get copied into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Andreas Klinger <ak@it-klinger.de> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-7-jic23@kernel.org
-
Jonathan Cameron authored
The spacing in this driver was inconsistent so make sure we have a space after { and before } for the two id tables. Part of aim is to avoid providing examples of this inconsistency that get copied into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Nikita Travkin <nikita@trvn.ru> Cc: Maslov Dmitry <maslovdmitry@seeed.cc> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-6-jic23@kernel.org
-
Jonathan Cameron authored
The spacing in this driver was inconsistent so make sure we have a space after { and before } for the two id tables. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-5-jic23@kernel.org
-
Jonathan Cameron authored
Having a space after the { and not one before the } is inconsistent and I'd rather not have examples of this that get copied into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Parthiban Nallathambi <pn@denx.de> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-4-jic23@kernel.org
-
Jonathan Cameron authored
One case in here was inconsistent and was main focus of this patch. In that case there was a space after the { and none before the }. The second case was then inconsistent in having now spaces. Change makes sure there are spaces. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-3-jic23@kernel.org
-
Jonathan Cameron authored
Having a space after the { and not one before the } is inconsistent and good to remove examples that might get copied into new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Matt Ranostay <matt.ranostay@konsulko.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211230174911.78291-2-jic23@kernel.org
-
Gwendal Grignou authored
Add support to configure sx9360 from dt-binding, to match device hardware setup. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203800.290387-4-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Add binding to configure Semtech sx9360 sensor. It is a simpler version of sx9324. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203800.290387-3-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
A simplified version of SX9324, it only have one pin and 2 phases (aka channels). Only one event is presented. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203800.290387-2-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Based on bindings/iio/proximity/semtech,sx9324.yaml, implement retrieving sensor hardware property and alter default values. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203817.290512-6-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Similar to SX9310, add biddings to setup sx9324 hardware properties. SX9324 is a little different, introduce 4 phases to be configured in 2 pairs over 3 antennas. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203817.290512-5-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Semtech SAR sensor SX9324 is an evolution of the SX9310: It has 4 phases that can be configured to capture and process data from any of 3 CS pins and provide independent detection: proximity, table proximity or body proximity. Gather antenna data: echo sx9324-dev3 > trigger/current_trigger echo 1 > scan_elements/in_proximity0_en echo 1 > buffer/enable od -v -An --endian=big -t d2 -w2 /dev/iio\:device3 (at 10Hz, the default). Trigger events: Setting: thresh_falling_period: 2 (events) thresh_rising_period: 2 (events) in_proximity0_thresh_either_value: 300 in_proximity0_thresh_either_hysteresis: 72 using iio_event_monitor /dev/iio\:deviceX, approaching my hand to the antenna pad, I see: ... Event: time: 1634763907532035297, type: proximity, channel: 0, evtype: thresh, direction: falling Event: time: 1634763910138104640, type: proximity, channel: 0, evtype: thresh, direction: rising ... Datasheet: https://edit.wpgdadawant.com/uploads/news_file/program/2019/30184/tech_files/program_30184_suggest_other_file.pdfSigned-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203817.290512-4-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Before adding new Semtech sensors, move common logic to all Semtech SAR sensor in its own file: - interface with IIO subsystem, - interrupt management, - channel access conrol, - event processing. The change adds a bidirectional interface between sx93xx and sx_common. The change is quite mechanical, as the impacted functions are moved and renamed. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203817.290512-3-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-