Re: [PATCH 11/16] iio: chemical: scd30: Simplify with dev_err_probe()

2020-08-26 Thread Tomasz Duszynski
return dev_err_probe(dev, PTR_ERR(state->vdd), > + "failed to get regulator\n"); I'd say that removing like break would slightly improve readability. Besides, staying within 100 columns seems socially acceptable now. Otherwise, Acked-by: Tomasz Duszynski > > ret = regulator_enable(state->vdd); > if (ret) > -- > 2.17.1 >

[PATCH v6 4/4] dt-bindings: iio: scd30: add device binding file

2020-06-21 Thread Tomasz Duszynski
Add SCD30 sensor binding file. Signed-off-by: Tomasz Duszynski Reviewed-by: Rob Herring --- .../iio/chemical/sensirion,scd30.yaml | 68 +++ MAINTAINERS | 1 + 2 files changed, 69 insertions(+) create mode 100644 Documentation

[PATCH v6 3/4] iio: chemical: scd30: add serial interface driver

2020-06-21 Thread Tomasz Duszynski
Add serial interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski Reviewed-by: Andy Shevchenko --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig| 11 ++ drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/scd30_serial.c | 263

[PATCH v6 2/4] iio: chemical: scd30: add I2C interface driver

2020-06-21 Thread Tomasz Duszynski
Add I2C interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski Reviewed-by: Andy Shevchenko --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig | 11 +++ drivers/iio/chemical/Makefile| 1 + drivers/iio/chemical/scd30_i2c.c | 139

[PATCH v6 0/4] Add support for SCD30 sensor

2020-06-21 Thread Tomasz Duszynski
e * drop supply from required property Tomasz Duszynski (4): iio: chemical: scd30: add core driver iio: chemical: scd30: add I2C interface driver iio: chemical: scd30: add serial interface driver dt-bindings: iio: scd30: add device binding file Documentation/ABI/testing/sysfs-bus-iio-scd

[PATCH v6 1/4] iio: chemical: scd30: add core driver

2020-06-21 Thread Tomasz Duszynski
Add Sensirion SCD30 carbon dioxide core driver. Signed-off-by: Tomasz Duszynski --- Documentation/ABI/testing/sysfs-bus-iio-scd30 | 34 + MAINTAINERS | 6 + drivers/iio/chemical/Kconfig | 11 + drivers/iio/chemical/Makefile

Re: [PATCH v5 1/4] iio: chemical: scd30: add core driver

2020-06-21 Thread Tomasz Duszynski
On Sat, Jun 20, 2020 at 05:25:02PM +0100, Jonathan Cameron wrote: > On Sun, 7 Jun 2020 19:58:09 +0200 > Tomasz Duszynski wrote: > > > Add Sensirion SCD30 carbon dioxide core driver. > > > > Signed-off-by: Tomasz Duszynski > > A few things I'd missed sho

Re: [PATCH v5 0/4] Add support for SCD30 sensor

2020-06-14 Thread Tomasz Duszynski
On Sun, Jun 14, 2020 at 02:17:38PM +0100, Jonathan Cameron wrote: > On Sun, 7 Jun 2020 19:58:08 +0200 > Tomasz Duszynski wrote: > > > Following series adds support for Sensirion SCD30 sensor module capable of > > measuring carbon dioxide, temperature and relative humidity.

[PATCH v5 2/4] iio: chemical: scd30: add I2C interface driver

2020-06-07 Thread Tomasz Duszynski
Add I2C interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig | 11 +++ drivers/iio/chemical/Makefile| 1 + drivers/iio/chemical/scd30_i2c.c | 139 +++ 4 files

[PATCH v5 3/4] iio: chemical: scd30: add serial interface driver

2020-06-07 Thread Tomasz Duszynski
Add serial interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig| 11 ++ drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/scd30_serial.c | 263 4

[PATCH v5 0/4] Add support for SCD30 sensor

2020-06-07 Thread Tomasz Duszynski
oard file based probing (i2c_device_id) * merge patches touching related files * use fwnode API to retrieve interrupt from dt * fix interrupt-parent spelling * change binding license * drop supply from required property Tomasz Duszynski (4): iio: chemical: scd30: add core driver iio: chemical: s

[PATCH v5 1/4] iio: chemical: scd30: add core driver

2020-06-07 Thread Tomasz Duszynski
Add Sensirion SCD30 carbon dioxide core driver. Signed-off-by: Tomasz Duszynski --- Documentation/ABI/testing/sysfs-bus-iio-scd30 | 34 + MAINTAINERS | 6 + drivers/iio/chemical/Kconfig | 11 + drivers/iio/chemical/Makefile

[PATCH v5 4/4] dt-bindings: iio: scd30: add device binding file

2020-06-07 Thread Tomasz Duszynski
Add SCD30 sensor binding file. Signed-off-by: Tomasz Duszynski --- .../iio/chemical/sensirion,scd30.yaml | 68 +++ MAINTAINERS | 1 + 2 files changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/chemical

Re: [PATCH v4 1/4] iio: chemical: scd30: add core driver

2020-06-07 Thread Tomasz Duszynski
On Sat, Jun 06, 2020 at 04:06:52PM +0100, Jonathan Cameron wrote: > On Wed, 3 Jun 2020 10:44:38 +0200 > Tomasz Duszynski wrote: > > > Add Sensirion SCD30 carbon dioxide core driver. > > > > Signed-off-by: Tomasz Duszynski > > Hi Tomasz, > > One trivia

[PATCH v4 1/4] iio: chemical: scd30: add core driver

2020-06-03 Thread Tomasz Duszynski
Add Sensirion SCD30 carbon dioxide core driver. Signed-off-by: Tomasz Duszynski --- Documentation/ABI/testing/sysfs-bus-iio-scd30 | 34 + MAINTAINERS | 6 + drivers/iio/chemical/Kconfig | 11 + drivers/iio/chemical/Makefile

[PATCH v4 4/4] dt-bindings: iio: scd30: add device binding file

2020-06-03 Thread Tomasz Duszynski
Add SCD30 sensor binding file. Signed-off-by: Tomasz Duszynski --- .../iio/chemical/sensirion,scd30.yaml | 68 +++ MAINTAINERS | 1 + 2 files changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/chemical

[PATCH v4 2/4] iio: chemical: scd30: add I2C interface driver

2020-06-03 Thread Tomasz Duszynski
Add I2C interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig | 11 +++ drivers/iio/chemical/Makefile| 1 + drivers/iio/chemical/scd30_i2c.c | 139 +++ 4 files

[PATCH v4 0/4] Add support for SCD30 sensor

2020-06-03 Thread Tomasz Duszynski
s we have dt probing drop board file based probing (i2c_device_id) * merge patches touching related files * use fwnode API to retrieve interrupt from dt * fix interrupt-parent spelling * change binding license * drop supply from required property Tomasz Duszynski (4): iio: chemical: scd30: add

[PATCH v4 3/4] iio: chemical: scd30: add serial interface driver

2020-06-03 Thread Tomasz Duszynski
Add serial interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig| 11 ++ drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/scd30_serial.c | 263 4

Re: [PATCH v3 3/4] iio: chemical: scd30: add serial interface driver

2020-06-02 Thread Tomasz Duszynski
On Tue, Jun 02, 2020 at 07:57:23PM +0200, Tomasz Duszynski wrote: > On Tue, Jun 02, 2020 at 08:04:16PM +0300, Andy Shevchenko wrote: > > On Tue, Jun 2, 2020 at 7:49 PM Tomasz Duszynski > > wrote: > > > > > > Add serial interface driver for the SCD30 sensor.

Re: [PATCH v3 0/4] Add support for SCD30 sensor

2020-06-02 Thread Tomasz Duszynski
On Tue, Jun 02, 2020 at 07:55:55PM +0300, Andy Shevchenko wrote: > On Tue, Jun 2, 2020 at 7:49 PM Tomasz Duszynski > wrote: > > > > Following series adds support for Sensirion SCD30 sensor module capable of > > measuring carbon dioxide, temperature and relative humidit

Re: [PATCH v3 3/4] iio: chemical: scd30: add serial interface driver

2020-06-02 Thread Tomasz Duszynski
On Tue, Jun 02, 2020 at 08:04:16PM +0300, Andy Shevchenko wrote: > On Tue, Jun 2, 2020 at 7:49 PM Tomasz Duszynski > wrote: > > > > Add serial interface driver for the SCD30 sensor. > > ... > > > +static u16 scd30_serdev_cmd_lookup_tbl[] = { >

Re: [PATCH v3 2/4] iio: chemical: scd30: add I2C interface driver

2020-06-02 Thread Tomasz Duszynski
Hello Andy, On Tue, Jun 02, 2020 at 08:14:13PM +0300, Andy Shevchenko wrote: > On Tue, Jun 2, 2020 at 7:49 PM Tomasz Duszynski > wrote: > > > > Add I2C interface driver for the SCD30 sensor. > > ... > > > +static u16 scd30_i2c_cmd_lookup_tbl[] = { >

[PATCH v3 4/4] dt-bindings: iio: scd30: add device binding file

2020-06-02 Thread Tomasz Duszynski
Add SCD30 sensor binding file. Signed-off-by: Tomasz Duszynski --- .../iio/chemical/sensirion,scd30.yaml | 68 +++ MAINTAINERS | 1 + 2 files changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/chemical

[PATCH v3 1/4] iio: chemical: scd30: add core driver

2020-06-02 Thread Tomasz Duszynski
Add Sensirion SCD30 carbon dioxide core driver. Signed-off-by: Tomasz Duszynski --- Documentation/ABI/testing/sysfs-bus-iio-scd30 | 34 + MAINTAINERS | 6 + drivers/iio/chemical/Kconfig | 11 + drivers/iio/chemical/Makefile

[PATCH v3 3/4] iio: chemical: scd30: add serial interface driver

2020-06-02 Thread Tomasz Duszynski
Add serial interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig| 11 ++ drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/scd30_serial.c | 266 4

[PATCH v3 0/4] Add support for SCD30 sensor

2020-06-02 Thread Tomasz Duszynski
use fwnode API to retrieve interrupt from dt * fix interrupt-parent spelling * change binding license * drop supply from required property Tomasz Duszynski (4): iio: chemical: scd30: add core driver iio: chemical: scd30: add I2C interface driver iio: chemical: scd30: add serial interface dr

[PATCH v3 2/4] iio: chemical: scd30: add I2C interface driver

2020-06-02 Thread Tomasz Duszynski
Add I2C interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig | 11 +++ drivers/iio/chemical/Makefile| 1 + drivers/iio/chemical/scd30_i2c.c | 134 +++ 4 files

Re: [PATCH v2 1/4] iio: chemical: scd30: add core driver

2020-06-02 Thread Tomasz Duszynski
t;failed to reset device: %d\n", ret); > > > > > > + return ret; > > > > > > + } > > > > > > + > > > > > > + if (state->irq > 0) { > > > > > > + ret = scd30_setup_trigger(indio_dev); > > > > > > + if (ret) { > > > > > > + dev_err(dev, "failed to setup trigger: %d\n", > > > > > > ret); > > > > > > + return ret; > > > > > > + } > > > > > > + } > > > > > > + > > > > > > + ret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL, > > > > > > + scd30_trigger_handler, > > > > > > NULL); > > > > > > + if (ret) > > > > > > + return ret; > > > > > > + > > > > > > + ret = scd30_command_read(state, CMD_FW_VERSION, ); > > > > > > + if (ret) { > > > > > > + dev_err(dev, "failed to read firmware version: %d\n", > > > > > > ret); > > > > > > + return ret; > > > > > > + } > > > > > > + dev_info(dev, "firmware version: %d.%d\n", val >> 8, (char)val); > > > > > > + > > > > > > + ret = scd30_command_write(state, CMD_MEAS_INTERVAL, > > > > > > + state->meas_interval); > > > > > > + if (ret) { > > > > > > + dev_err(dev, "failed to set measurement interval: > > > > > > %d\n", ret); > > > > > > + return ret; > > > > > > + } > > > > > > + > > > > > > + ret = scd30_command_write(state, CMD_START_MEAS, > > > > > > state->pressure_comp); > > > > > > + if (ret) { > > > > > > + dev_err(dev, "failed to start measurement: %d\n", ret); > > > > > > + return ret; > > > > > > + } > Here is where we should register that cleanup handler. > > Jonathan > > > > > > > + > > > > > > + return devm_iio_device_register(dev, indio_dev); > > > > > > +} > > > > > > +EXPORT_SYMBOL(scd30_probe); > > > > > > + > > > > > > +MODULE_AUTHOR("Tomasz Duszynski "); > > > > > > +MODULE_DESCRIPTION("Sensirion SCD30 carbon dioxide sensor core > > > > > > driver"); > > > > > > +MODULE_LICENSE("GPL v2"); > > > > > > -- > > > > > > 2.26.2 > > > > > > > > > > > > > > > > > > >

[PATCH] iio: improve IIO_CONCENTRATION channel type description

2020-06-01 Thread Tomasz Duszynski
it follows conventions used throughout IIO ABI docs. Fixes: 8ff6b3bc94930 ("iio: chemical: Add IIO_CONCENTRATION channel type") Signed-off-by: Tomasz Duszynski --- Documentation/ABI/testing/sysfs-bus-iio | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/tes

Re: [PATCH v2 1/4] iio: chemical: scd30: add core driver

2020-06-01 Thread Tomasz Duszynski
On Sun, May 31, 2020 at 09:21:52PM +0200, Tomasz Duszynski wrote: > On Sun, May 31, 2020 at 10:58:40AM +0100, Jonathan Cameron wrote: > > On Sat, 30 May 2020 23:36:27 +0200 > > Tomasz Duszynski wrote: > > > > > Add Sensirion SCD30 carbon dioxide core driver. >

Re: [PATCH v2 1/4] iio: chemical: scd30: add core driver

2020-06-01 Thread Tomasz Duszynski
On Mon, Jun 01, 2020 at 11:36:04AM +0100, Jonathan Cameron wrote: > On Sun, 31 May 2020 21:21:52 +0200 > Tomasz Duszynski wrote: > > > On Sun, May 31, 2020 at 10:58:40AM +0100, Jonathan Cameron wrote: > > > On Sat, 30 May 2020 23:36:27 +0200 > > > Tomasz Du

Re: [PATCH v2 1/4] iio: chemical: scd30: add core driver

2020-05-31 Thread Tomasz Duszynski
On Sun, May 31, 2020 at 10:58:40AM +0100, Jonathan Cameron wrote: > On Sat, 30 May 2020 23:36:27 +0200 > Tomasz Duszynski wrote: > > > Add Sensirion SCD30 carbon dioxide core driver. > > > > Signed-off-by: Tomasz Duszynski > > Hi Tomasz > > A few thing

Re: [PATCH v2 3/4] iio: chemical: scd30: add serial interface driver

2020-05-31 Thread Tomasz Duszynski
On Sun, May 31, 2020 at 11:15:18AM +0100, Jonathan Cameron wrote: > On Sat, 30 May 2020 23:36:29 +0200 > Tomasz Duszynski wrote: > > > Add serial interface driver for the SCD30 sensor. > > > > Signed-off-by: Tomasz Duszynski > > Ah Now I see why you had tho

Re: [PATCH v2 4/4] dt-bindings: iio: scd30: add device binding file

2020-05-31 Thread Tomasz Duszynski
On Sun, May 31, 2020 at 11:19:14AM +0100, Jonathan Cameron wrote: > On Sat, 30 May 2020 23:36:30 +0200 > Tomasz Duszynski wrote: > > > Add SCD30 sensor binding file. > > > > Signed-off-by: Tomasz Duszynski > > --- > > .../iio/che

[PATCH v2 3/4] iio: chemical: scd30: add serial interface driver

2020-05-30 Thread Tomasz Duszynski
Add serial interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig| 11 ++ drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/scd30_serial.c | 266 4

[PATCH v2 1/4] iio: chemical: scd30: add core driver

2020-05-30 Thread Tomasz Duszynski
Add Sensirion SCD30 carbon dioxide core driver. Signed-off-by: Tomasz Duszynski --- Documentation/ABI/testing/sysfs-bus-iio-scd30 | 20 + MAINTAINERS | 6 + drivers/iio/chemical/Kconfig | 11 + drivers/iio/chemical/Makefile

[PATCH v2 2/4] iio: chemical: scd30: add I2C interface driver

2020-05-30 Thread Tomasz Duszynski
Add I2C interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 1 + drivers/iio/chemical/Kconfig | 11 +++ drivers/iio/chemical/Makefile| 1 + drivers/iio/chemical/scd30_i2c.c | 134 +++ 4 files

[PATCH v2 4/4] dt-bindings: iio: scd30: add device binding file

2020-05-30 Thread Tomasz Duszynski
Add SCD30 sensor binding file. Signed-off-by: Tomasz Duszynski --- .../iio/chemical/sensirion,scd30.yaml | 68 +++ MAINTAINERS | 1 + 2 files changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/chemical

[PATCH v2 0/4] Add support for SCD30 sensor

2020-05-30 Thread Tomasz Duszynski
property Tomasz Duszynski (4): iio: chemical: scd30: add core driver iio: chemical: scd30: add I2C interface driver iio: chemical: scd30: add serial interface driver dt-bindings: iio: scd30: add device binding file Documentation/ABI/testing/sysfs-bus-iio-scd30 | 20 + .../iio/chemical

Re: [PATCH 1/6] iio: chemical: scd30: add core driver

2020-05-03 Thread Tomasz Duszynski
On Sat, May 02, 2020 at 05:37:38PM +0100, Jonathan Cameron wrote: > On Tue, 28 Apr 2020 09:51:01 +0200 > Tomasz Duszynski wrote: > > > On Sat, Apr 25, 2020 at 07:55:34PM +0100, Jonathan Cameron wrote: > > > On Wed, 22 Apr 2020 16:11:30 +0200 > > > Tomasz Du

Re: [PATCH 1/6] iio: chemical: scd30: add core driver

2020-04-28 Thread Tomasz Duszynski
On Tue, Apr 28, 2020 at 01:16:47PM +0300, Andy Shevchenko wrote: > On Tue, Apr 28, 2020 at 10:57 AM Tomasz Duszynski > wrote: > > > > On Sat, Apr 25, 2020 at 09:52:25PM +0300, Andy Shevchenko wrote: > > > On Sat, Apr 25, 2020 at 9:42 PM Tomasz Duszynski > > >

Re: [PATCH 5/6] dt-bindings: iio: scd30: add device binding file

2020-04-28 Thread Tomasz Duszynski
On Mon, Apr 27, 2020 at 04:28:26PM -0500, Rob Herring wrote: > On Wed, 22 Apr 2020 16:11:34 +0200, Tomasz Duszynski wrote: > > Add SCD30 sensor binding file. > > > > Signed-off-by: Tomasz Duszynski > > --- > > .../iio/chemical/sensirion,scd30.yaml | 7

Re: [PATCH 1/6] iio: chemical: scd30: add core driver

2020-04-28 Thread Tomasz Duszynski
On Sat, Apr 25, 2020 at 09:52:25PM +0300, Andy Shevchenko wrote: > On Sat, Apr 25, 2020 at 9:42 PM Tomasz Duszynski > wrote: > > On Sat, Apr 25, 2020 at 02:43:35PM +0300, Andy Shevchenko wrote: > > > On Fri, Apr 24, 2020 at 10:05 PM Tomasz Duszynski > > > wrote

Re: [PATCH 1/6] iio: chemical: scd30: add core driver

2020-04-28 Thread Tomasz Duszynski
On Sat, Apr 25, 2020 at 07:55:34PM +0100, Jonathan Cameron wrote: > On Wed, 22 Apr 2020 16:11:30 +0200 > Tomasz Duszynski wrote: > > > Add Sensirion SCD30 carbon dioxide core driver. > > > > Signed-off-by: Tomasz Duszynski > Hi Tomasz > > As you've probably

[PATCH 1/2] dt-bindings: iio: light: bh1750: convert bindings to yaml

2019-09-16 Thread Tomasz Duszynski
Convert existing device tree bindings to yaml. Signed-off-by: Tomasz Duszynski --- .../devicetree/bindings/iio/light/bh1750.txt | 18 .../devicetree/bindings/iio/light/bh1750.yaml | 43 +++ 2 files changed, 43 insertions(+), 18 deletions(-) delete mode 100644

[PATCH 0/2] iio: light: bh1750: convert bindings to yaml

2019-09-16 Thread Tomasz Duszynski
Convert ROHM BH1750 ambient light sensor bindings to yaml format and while at it add myself as a driver maintainer. Tomasz Duszynski (2): dt-bindings: iio: light: bh1750: convert bindings to yaml MAINTAINERS: add entry for ROHM BH1750 driver .../devicetree/bindings/iio/light/bh1750.txt

[PATCH 2/2] MAINTAINERS: add entry for ROHM BH1750 driver

2019-09-16 Thread Tomasz Duszynski
Add myself as a ROHM BH1750 ambient light sensor driver maintainer. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f0c03740b9fb..928059c5cd49 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13792,6

Re: [PATCH] iio: light: bh1750: Move static keyword to the front of declaration

2019-09-03 Thread Tomasz Duszynski
On Mon, Sep 02, 2019 at 01:31:32PM +0200, Krzysztof Wilczynski wrote: > Move the static keyword to the front of declaration of > bh1750_chip_info_tbl, and resolve the following compiler > warning that can be seen when building with warnings > enabled (W=1): Looks okay. Acked-by: Toma

[PATCH 2/2] MAINTAINERS: add entry for plantower pms7003 driver

2019-07-10 Thread Tomasz Duszynski
Add myself as a plantower pms7003 driver maintainer. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ad498428b38c..771de33ef737 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12548,6 +12548,12 @@ F

[PATCH 1/2] dt-bindings: iio: chemical: pms7003: convert bindings to yaml

2019-07-10 Thread Tomasz Duszynski
Convert existing device tree bindings to yaml. Signed-off-by: Tomasz Duszynski --- .../iio/chemical/plantower,pms7003.txt| 26 -- .../iio/chemical/plantower,pms7003.yaml | 51 +++ 2 files changed, 51 insertions(+), 26 deletions(-) delete mode 100644

[PATCH 0/2] iio: chemical: pms7003: convert bindings to yaml

2019-07-10 Thread Tomasz Duszynski
Convert plantower pms7003 air pollution sensor bindings to yaml and while at it add myself as a driver maintainer. Tomasz Duszynski (2): dt-bindings: iio: chemical: pms7003: convert bindings to yaml MAINTAINERS: add entry for plantower pms7003 driver .../iio/chemical/plantower,pms7003.txt

[PATCH 0/2] iio: chemical: sps30: convert bindings to yaml

2019-06-20 Thread Tomasz Duszynski
Convert sensirion sps30 particulate matter sensor bindings to yaml format and while at it add myself as a driver maintainer. Tomasz Duszynski (2): dt-bindings: iio: chemical: sps30: convert bindings to yaml MAINTAINERS: add entry for sensirion sps30 driver .../bindings/iio/chemical

[PATCH 2/2] MAINTAINERS: add entry for sensirion sps30 driver

2019-06-20 Thread Tomasz Duszynski
Add myself as a sensirion sps30 driver maintainer. Signed-off-by: Tomasz Duszynski --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1eb971608ac4..dafa02ba161c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14172,6 +14172,12 @@ S

[PATCH 1/2] dt-bindings: iio: chemical: sps30: convert bindings to yaml

2019-06-20 Thread Tomasz Duszynski
Convert existing device tree bindings to yaml. Signed-off-by: Tomasz Duszynski --- .../bindings/iio/chemical/sensirion,sps30.txt | 12 -- .../iio/chemical/sensirion,sps30.yaml | 39 +++ 2 files changed, 39 insertions(+), 12 deletions(-) delete mode 100644

Re: [PATCH] iio: pms7003: sleect IIO_TRIGGERED_BUFFER

2019-03-14 Thread Tomasz Duszynski
On Thu, Mar 14, 2019 at 10:00:52AM +0100, Arnd Bergmann wrote: > Without IIO_TRIGGERED_BUFFER, this driver fails to link: Good catch, thanks (btw, perhaps typo in subject can be fixed before applying patch). Acked-by: Tomasz Duszynski > > drivers/iio/chemical/pms7003.o: In

Re: [PATCH] iio: envelope-detector: fix use-after-free on device remove

2019-03-11 Thread Tomasz Duszynski
On Sun, Mar 10, 2019 at 03:32:46PM -0400, Sven Van Asbroeck wrote: > This driver's remove path never explicitly cancels the > delayed work. So it is possible for the delayed work to > run after the core has freed the private structure > (struct envelope). This is a potential use-after-free. > >

Re: [PATCH v5 1/2] iio: adc: ti-ads7950: Fix improper use of mlock

2019-03-09 Thread Tomasz Duszynski
On Fri, Mar 08, 2019 at 02:03:27PM -0800, justinpo...@gmail.com wrote: > From: Justin Chen > > Indio->mlock is used for protecting the different iio device modes. > It is currently not being used in this way. Replace the lock with > an internal lock specifically used for protecting the SPI

Re: [PATCH] iio: max9611: fix a NULL pointer dereference

2019-03-09 Thread Tomasz Duszynski
On Fri, Mar 08, 2019 at 10:51:40PM -0600, Kangjie Lu wrote: > of_match_device may return NULL when it fails, and in this case, > there will be a NULL pointer dereference. The fix returns > EINVAL when of_match_device returns NULL. > > Signed-off-by: Kangjie Lu > --- > drivers/iio/adc/max9611.c |

Re: [PATCH] iio: hmc: fix a potential NULL pointer dereference

2019-03-09 Thread Tomasz Duszynski
On Fri, Mar 08, 2019 at 11:15:32PM -0600, Kangjie Lu wrote: > devm_regmap_init_i2c may fail and return NULL. The fix returns > the error when it fails. > > Signed-off-by: Kangjie Lu > --- > drivers/iio/magnetometer/hmc5843_i2c.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >

Re: [PATCH v2] iio: proximity: as3935: fix use-after-free on device remove

2019-03-09 Thread Tomasz Duszynski
On Fri, Mar 08, 2019 at 05:46:24PM -0500, Sven Van Asbroeck wrote: > On Fri, Mar 8, 2019 at 5:33 PM Tomasz Duszynski wrote: > > > > > > So perhaps that change deserves a separate patch because it smells like > > a code cleanup. > > Not really. This patch f

Re: [PATCH v2] iio: proximity: as3935: fix use-after-free on device remove

2019-03-08 Thread Tomasz Duszynski
On Fri, Mar 08, 2019 at 03:42:04PM -0500, Sven Van Asbroeck wrote: > On Fri, Mar 8, 2019 at 3:30 PM Tomasz Duszynski wrote: > > > > > @@ -368,7 +376,6 @@ static int as3935_probe(struct spi_device *spi) > > > > > > spi_set_drvdata(spi, indi

Re: [PATCH v2 1/4] iio:potentiostat:lmp91000: remove unnecessary parentheses

2019-03-08 Thread Tomasz Duszynski
On Fri, Mar 08, 2019 at 04:46:52PM -0300, Anderson Reis wrote: > From: Lucas Oshiro > > Remove unnecessary parentheses on line 116, and solve these checkpatch.pl No need to explicitly point finger at changed lines. This is what context lines are for. > CHECKs: > > - lmp91000.c:116: CHECK:

Re: [PATCH v2] iio: proximity: as3935: fix use-after-free on device remove

2019-03-08 Thread Tomasz Duszynski
On Fri, Mar 08, 2019 at 12:59:35PM -0500, Sven Van Asbroeck wrote: > This driver's probe() uses a mix of devm_ and non-devm_ functions. This > means that the remove order will not be the exact opposite of the probe > order. > > Remove order: > 1. remove() executes: > iio_device_unregister >

Re: [PATCH v2 1/3] iio: light: Add driver for ap3216c

2019-02-27 Thread Tomasz Duszynski
Hi, Comments inline. On Sun, Feb 24, 2019 at 12:34:51PM -0800, Robert Eshleman wrote: > This patch adds support for the ap3216c ambient light and proximity > sensor. > > Supported features include: > > * Illuminance (lux) > * Proximity (raw) > * IR (raw) > *

[PATCH] docs: driver-api: iio: fix errors in documentation

2019-02-25 Thread Tomasz Duszynski
Improve IIO documentation by fixing a few mistakes. Signed-off-by: Tomasz Duszynski --- Documentation/driver-api/iio/buffers.rst | 2 +- Documentation/driver-api/iio/core.rst| 6 +++--- Documentation/driver-api/iio/hw-consumer.rst | 2 +- Documentation/driver-api/iio/triggers.rst

[PATCH v2] iio: chemical: sps30: fix attribute kernel version

2019-02-25 Thread Tomasz Duszynski
4.22 have never existed and this change was actually added to 5.0 hence fix the numbering. Signed-off-by: Tomasz Duszynski --- v2: * this is targeting 5.0 hence fix the version Documentation/ABI/testing/sysfs-bus-iio-sps30 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] iio: chemical: sps30: fix attribute kernel version

2019-02-20 Thread Tomasz Duszynski
On Wed, Feb 20, 2019 at 11:16:32AM +, Jonathan Cameron wrote: > On Fri, 15 Feb 2019 20:57:59 +0100 > Tomasz Duszynski wrote: > > > 4.22 has never existed and this change was actually added to 4.21 > > hence fix the numbering. > > > > Signed-off-by: Tom

[PATCH 2/2] dt-bindings: iio: chemical: pms7003: extend supported sensors list

2019-02-17 Thread Tomasz Duszynski
Add other sensors to the compatible list. Signed-off-by: Tomasz Duszynski --- .../bindings/iio/chemical/plantower,pms7003.txt | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.txt b

[PATCH 1/2] iio: chemical: pms7003: extend supported sensors list

2019-02-17 Thread Tomasz Duszynski
Add other sensors to the compatible list. Signed-off-by: Tomasz Duszynski --- drivers/iio/chemical/pms7003.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/iio/chemical/pms7003.c b/drivers/iio/chemical/pms7003.c index db8e7b2327b3..23c9ab252470 100644 --- a/drivers/iio

[PATCH 0/2] iio: chemical: pms7003: add other supported sensors

2019-02-17 Thread Tomasz Duszynski
This series extends the supported sensors list with a new ones belonging to the PMSxxyy family. All share the very same binary protocol and are capable of measuring PM1.0, PM2.5 and PM10 dust particles. Tomasz Duszynski (2): iio: chemical: pms7003: extend supported sensors list dt-bindings

[PATCH] iio: chemical: sps30: fix attribute kernel version

2019-02-15 Thread Tomasz Duszynski
4.22 has never existed and this change was actually added to 4.21 hence fix the numbering. Signed-off-by: Tomasz Duszynski --- Documentation/ABI/testing/sysfs-bus-iio-sps30 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio-sps30 b

Re: [PATCH] iio: chemical: sps30: mark expected switch fall-throughs

2019-02-13 Thread Tomasz Duszynski
On Tue, Feb 12, 2019 at 08:48:42PM -0600, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. > > This patch fixes the following warnings: > That have been already fixed by this commit available at Greg's

Re: [PATCH] iio/gyro/bmg160: Use millidegrees for temperature scale

2019-02-12 Thread Tomasz Duszynski
On Tue, Feb 12, 2019 at 03:25:49PM +0100, Mike Looijmans wrote: > Standard unit for temperature is millidegrees Celcius, whereas this driver > was reporting in degrees. Fix the scale factor in the driver. > > Signed-off-by: Mike Looijmans > --- > drivers/iio/gyro/bmg160_core.c | 5 +++-- > 1

[PATCH v4 2/3] dt-bindings: add Plantower to the vendor prefixes

2019-02-09 Thread Tomasz Duszynski
Add Plantower to the vendor prefixes. Signed-off-by: Tomasz Duszynski Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree

[PATCH v4 1/3] iio: chemical: add support for Plantower PMS7003 sensor

2019-02-09 Thread Tomasz Duszynski
Add support for Plantower PMS7003 particulate matter sensor. Signed-off-by: Tomasz Duszynski --- drivers/iio/chemical/Kconfig | 10 + drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/pms7003.c | 340 + 3 files changed, 351 insertions(+) create

[PATCH v4 0/3] add support for PMS7003 PM sensor

2019-02-09 Thread Tomasz Duszynski
() (due to changes in linux 5.0 serdev api) * add missing pins descriptions to the driver binding * keep commands in the lookup table * buffer data and process everything in one go instead of using state machine * keep pm offset in channel address to simplify reading measurements Tomasz

[PATCH v4 3/3] dt-bindings: iio: chemical: pms7003: add device tree support

2019-02-09 Thread Tomasz Duszynski
Add device tree support for Plantower PMS7003 particulate matter sensor. Signed-off-by: Tomasz Duszynski --- .../iio/chemical/plantower,pms7003.txt| 20 +++ 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/chemical/plantower

Re: [PATCH v3 3/3] dt-bindings: iio: chemical: pms7003: add device tree support

2019-02-09 Thread Tomasz Duszynski
On Sat, Feb 02, 2019 at 05:12:47PM +, Jonathan Cameron wrote: > On Fri, 1 Feb 2019 22:57:59 +0100 > Tomasz Duszynski wrote: > > > Add device tree support for Plantower PMS7003 particulate matter sensor. > > > > Signed-off-by: Tomasz Duszynski > Hi Tomasz, &g

Re: [PATCH 2/4] pwm: stm32-lp: Add power management support

2019-02-05 Thread Tomasz Duszynski
On Tue, Feb 05, 2019 at 01:40:27PM +0100, Fabrice Gasnier wrote: > Add suspend/resume PM sleep ops. When going to low power, disable > active PWM channel. Active PWM channel is resumed, by calling > pwm_apply_state(). This is inspired by Thierry's comment in [1]. > Don't touch inactive channels,

[PATCH] iio: chemical: sps30: remove printk format specifier

2019-02-02 Thread Tomasz Duszynski
pr_fmt is used by printk wrappers. There are not any in the driver code so remove the format specifier. Signed-off-by: Tomasz Duszynski --- drivers/iio/chemical/sps30.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c index

[PATCH v3 3/3] dt-bindings: iio: chemical: pms7003: add device tree support

2019-02-01 Thread Tomasz Duszynski
Add device tree support for Plantower PMS7003 particulate matter sensor. Signed-off-by: Tomasz Duszynski --- .../iio/chemical/plantower,pms7003.txt| 20 +++ 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/chemical/plantower

[PATCH v3 1/3] iio: chemical: add support for Plantower PMS7003 sensor

2019-02-01 Thread Tomasz Duszynski
Add support for Plantower PMS7003 particulate matter sensor. Signed-off-by: Tomasz Duszynski --- drivers/iio/chemical/Kconfig | 10 + drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/pms7003.c | 340 + 3 files changed, 351 insertions(+) create

[PATCH v3 0/3] add support for PMS7003 PM sensor

2019-02-01 Thread Tomasz Duszynski
missing pins descriptions to the driver binding * keep commands in the lookup table * buffer data and process everything in one go instead of using state machine * keep pm offset in channel address to simplify reading measurements Tomasz Duszynski (3): iio: chemical: add support for Plantower

[PATCH v3 2/3] dt-bindings: add Plantower to the vendor prefixes

2019-02-01 Thread Tomasz Duszynski
Add Plantower to the vendor prefixes. Signed-off-by: Tomasz Duszynski Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree

Re: [PATCH v2 3/3] dt-bindings: iio: chemical: pms7003: add device tree support

2019-02-01 Thread Tomasz Duszynski
On Fri, Feb 01, 2019 at 10:12:31AM +0100, Johan Hovold wrote: > On Thu, Jan 31, 2019 at 09:40:04PM +0100, Tomasz Duszynski wrote: > > On Wed, Jan 30, 2019 at 10:12:54AM +0100, Johan Hovold wrote: > > > On Mon, Jan 28, 2019 at 07:43:33PM +0100, Tomasz Duszynski wrote: > >

Re: [PATCH v2 3/3] dt-bindings: iio: chemical: pms7003: add device tree support

2019-01-31 Thread Tomasz Duszynski
On Wed, Jan 30, 2019 at 10:12:54AM +0100, Johan Hovold wrote: > On Mon, Jan 28, 2019 at 07:43:33PM +0100, Tomasz Duszynski wrote: > > On Mon, Jan 28, 2019 at 08:58:19AM +0100, Johan Hovold wrote: > > > On Sun, Jan 27, 2019 at 07:19:16PM +0100, Tomasz Duszynski wrote: >

Re: [PATCH v2 3/3] dt-bindings: iio: chemical: pms7003: add device tree support

2019-01-28 Thread Tomasz Duszynski
On Mon, Jan 28, 2019 at 08:58:19AM +0100, Johan Hovold wrote: > On Sun, Jan 27, 2019 at 07:19:16PM +0100, Tomasz Duszynski wrote: > > Add device tree support for Plantower PMS7003 particulate matter sensor. > > > > Signed-off-by: Tomasz Duszynski > > --- > > .

Re: [PATCH v2 1/3] iio: chemical: add support for Plantower PMS7003 sensor

2019-01-27 Thread Tomasz Duszynski
On Sun, Jan 27, 2019 at 07:53:58PM +0100, Peter Meerwald-Stadler wrote: > On Sun, 27 Jan 2019, Tomasz Duszynski wrote: > > some minor comments below, looks good to me > Thanks for comments. > > Add support for Plantower PMS7003 particulate matter sensor. > > > > S

[PATCH v2 1/3] iio: chemical: add support for Plantower PMS7003 sensor

2019-01-27 Thread Tomasz Duszynski
Add support for Plantower PMS7003 particulate matter sensor. Signed-off-by: Tomasz Duszynski --- drivers/iio/chemical/Kconfig | 10 + drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/pms7003.c | 343 + 3 files changed, 354 insertions(+) create

[PATCH v2 3/3] dt-bindings: iio: chemical: pms7003: add device tree support

2019-01-27 Thread Tomasz Duszynski
Add device tree support for Plantower PMS7003 particulate matter sensor. Signed-off-by: Tomasz Duszynski --- .../iio/chemical/plantower,pms7003.txt| 19 +++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/chemical/plantower

[PATCH v2 2/3] dt-bindings: add Plantower to the vendor prefixes

2019-01-27 Thread Tomasz Duszynski
Add Plantower to the vendor prefixes. Signed-off-by: Tomasz Duszynski Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree

[PATCH v2 0/3] add support for PMS7003 PM sensor

2019-01-27 Thread Tomasz Duszynski
offset in channel address to simplify reading measurements Tomasz Duszynski (3): iio: chemical: add support for Plantower PMS7003 sensor dt-bindings: add Plantower to the vendor prefixes dt-bindings: iio: chemical: pms7003: add device tree support .../iio/chemical/plantower,pms7003.txt

Re: [PATCH 3/3] dt-bindings: iio: chemical: pms7003: add device tree support

2019-01-27 Thread Tomasz Duszynski
On Fri, Jan 11, 2019 at 04:15:26PM -0600, Rob Herring wrote: > On Sun, Jan 06, 2019 at 06:16:14PM +0100, Tomasz Duszynski wrote: > > Add device tree support for Plantower PMS7003 particulate matter sensor. > > > > Signed-off-by: Tomasz Duszynski > > --- > > ..

Re: [PATCH 1/3] iio: chemical: add support for Plantower PMS7003 sensor

2019-01-23 Thread Tomasz Duszynski
On Sat, Jan 12, 2019 at 05:48:22PM +, Jonathan Cameron wrote: > On Sun, 6 Jan 2019 18:16:12 +0100 > Tomasz Duszynski wrote: > > > Add support for Plantower PMS7003 particulate matter sensor. > > > > Signed-off-by: Tomasz Duszynski > > A few minor bits and

[PATCH v3] iio: chemical: sps30: allow changing self cleaning period

2019-01-15 Thread Tomasz Duszynski
Sensor can periodically trigger self cleaning. Period can be changed by writing a new value to a dedicated attribute. Upon attribute read current period gets returned. Signed-off-by: Tomasz Duszynski --- v3: * fix allowed period range check v2: * return available values formated as a range

Re: [PATCH v3] iio: chemical: sps30: allow changing self cleaning period

2019-01-15 Thread Tomasz Duszynski
On Mon, Jan 14, 2019 at 05:15:39PM -0700, Jeremy Fertic wrote: > On Sun, Jan 13, 2019 at 11:09:12AM +0100, Tomasz Duszynski wrote: > > Sensor can periodically trigger self cleaning. Period can be changed by > > writing a new value to a dedicated attribute. Upon attribute read >

[PATCH v3] iio: chemical: sps30: allow changing self cleaning period

2019-01-13 Thread Tomasz Duszynski
Sensor can periodically trigger self cleaning. Period can be changed by writing a new value to a dedicated attribute. Upon attribute read current period gets returned. Signed-off-by: Tomasz Duszynski --- v3: * add info about used units to attribute docs v2: * return available values formated

[PATCH v2] iio: chemical: sps30: allow changing self cleaning period

2019-01-11 Thread Tomasz Duszynski
Sensor can periodically trigger self cleaning. Period can be changed by writing a new value to a dedicated attribute. Upon attribute read current period gets returned. Signed-off-by: Tomasz Duszynski --- v2: * return available values formated as a range * tweak naming a little (interval

Re: [PATCH 1/3] iio: chemical: add support for Plantower PMS7003 sensor

2019-01-08 Thread Tomasz Duszynski
On Mon, Jan 07, 2019 at 04:35:42PM +0100, Johan Hovold wrote: > On Sun, Jan 06, 2019 at 06:16:12PM +0100, Tomasz Duszynski wrote: > > Add support for Plantower PMS7003 particulate matter sensor. > > > > Signed-off-by: Tomasz Duszynski > > > +static int pms7003_do_c

  1   2   3   >