iio: temperature: tmp006: support for drdy irq
Subsystems (2)
v2 cover iio: temperature: tmp006: support for drdy irq
This patch series adds support for the data ready interrupt of tmp006 sensor. The interrupt line is pulled down once there is a measurement available to be read. Hence, triggered buffers are used in order to support continuous data capture for the sensor.
Changes since v1:
* dt-binding: improve the commit message
* tmp006_read_raw: use iio_device_claim_direct_scoped()
* tmp006_channels[] : add trailing commas
* tmp006_trigger_handler: use s32 to check return value of read_word_data()
* tmp006_set_trigger_state: fix data alignment
* tmp006_probe: check return value of devm_iio_triggered_buffer_setup()
* tmp006_probe: remove IRQF_TRIGGER_FALLING from irqflags argument of devm_request_threaded_irq()
* tmp006_probe: set avaliable_scan_masks to tmp006_scan_masks[]
Antoni Pokusinski (2):
iio: temperature: tmp006: add triggered buffer support
dt-bindings: iio: temperature: tmp006: document interrupt
.../bindings/iio/temperature/ti,tmp006.yaml | 6 + drivers/iio/temperature/Kconfig | 2 + drivers/iio/temperature/tmp006.c | 134 ++++++++++++++++-- 3 files changed, 129 insertions(+), 13 deletions(-)
Signature · 1 line
2.25.1
PATCH v2 1/2 iio: temperature: tmp006: add triggered buffer support
Add support for continuous data capture using triggered buffers for the tmp006 sensor. The device features a "data ready" interrupt line which is pulled down once a new measurement is ready to be read.
--- drivers/iio/temperature/Kconfig | 2 + drivers/iio/temperature/tmp006.c | 134 ++++++++++++++++++++++++++++--- 2 files changed, 123 insertions(+), 13 deletions(-)
drivers/iio/temperature/Kconfig +2 -0
@@ -91,6 +91,8 @@ config MLX90635 config TMP006 tristate "TMP006 infrared thermopile sensor" depends on I2C + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER help If you say yes here you get support for the Texas Instruments TMP006 infrared thermopile sensor.
drivers/iio/temperature/tmp006.c +121 -13
207 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v2 2/2 dt-bindings: iio: temperature: tmp006: document interrupt
In reply to Antoni PokusinskiTMP006 sensor has a DRDY (data ready) active-low interrupt which indicates that a new measurement is ready to be read.
--- .../devicetree/bindings/iio/temperature/ti,tmp006.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml +6 -0
@@ -23,6 +23,9 @@ properties: vdd-supply: description: provide VDD power to the sensor. + interrupts: + maxItems: 1 + required: - compatible - reg
@@ -31,6 +34,7 @@ additionalProperties: false examples: - | + #include <dt-bindings/interrupt-controller/irq.h> i2c { #address-cells = <1>; #size-cells = <0>;
@@ -38,5 +42,7 @@ examples: compatible = "ti,tmp006"; reg = <0x40>; vdd-supply = <&ldo4_reg>; + interrupt-parent = <&gpio1>; + interrupts = <4 IRQ_TYPE_EDGE_FALLING>; }; };
Signature · 1 line
2.25.1
Re: [PATCH v2 2/2] dt-bindings: iio: temperature: tmp006: document interrupt
Quoted 7 lines · Antoni Pokusinski
TMP006 sensor has a DRDY (data ready) active-low interrupt which indicates that a new measurement is ready to be read.
Signed-off-by Antoni Pokusinski <[email protected]>--- .../devicetree/bindings/iio/temperature/ti,tmp006.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
---
<form letter>
This is an automated instruction, just in case, because many review tags are being ignored. If you know the process, you can skip it (please do not feel offended by me posting it here - no bad intentions intended). If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.
https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577
</form letter>
Best regards,
Krzysztof
Jonathan Cameron
maintainerQuoted 5 lines · On Sun, 8 Sep 2024 19:21:51 +0200 Antoni Pokusinski <[email protected]>…
This patch series adds support for the data ready interrupt of tmp006 sensor. The interrupt line is pulled down once there is a measurement available to be read. Hence, triggered buffers are used in order to support continuous data capture for the sensor.
Applied to the testing branch of iio.git.
I'll rebase that on rc1 once available and push this out as togreg at which point linux-next will pick it up etc.
Thanks,
Jonathan
Quoted 20 lines
Changes since v1:
* dt-binding: improve the commit message
*tmp006_read_raw: useiio_device_claim_direct_scoped()
* tmp006_channels[] : add trailing commas
*tmp006_trigger_handler: use s32 to check return value ofread_word_data()
*tmp006_set_trigger_state: fix data alignment
*tmp006_probe: check return value ofdevm_iio_triggered_buffer_setup()
*tmp006_probe: removeIRQF_TRIGGER_FALLINGfrom irqflags argument ofdevm_request_threaded_irq()
*tmp006_probe: setavaliable_scan_masksto tmp006_scan_masks[]Antoni Pokusinski (2):
iio: temperature: tmp006: add triggered buffer support
dt-bindings: iio: temperature: tmp006: document interrupt.../bindings/iio/temperature/ti,tmp006.yaml | 6 + drivers/iio/temperature/Kconfig | 2 + drivers/iio/temperature/tmp006.c | 134 ++++++++++++++++-- 3 files changed, 129 insertions(+), 13 deletions(-)