2019-07-03 18:07:40

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 1/3] dt-bindings: Add vendor prefix for sensortek

Sensortek Technology Corp. produces Proximity Sensors with ALS and
Accelerometers.

Signed-off-by: Luca Weiss <[email protected]>
---
This patch series depends on "iio: light: stk3310: Add support for
stk3335", that's curerntly in linux-next.

Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 342bb23e0a73..d197c9609ea7 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -813,6 +813,8 @@ patternProperties:
description: Semtech Corporation
"^sensirion,.*":
description: Sensirion AG
+ "^sensortek,.*":
+ description: Sensortek Technology Corporation
"^sff,.*":
description: Small Form Factor Committee
"^sgd,.*":
--
2.22.0


2019-07-03 18:07:57

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: iio: light: add stk33xx

Add binding documentation for the stk33xx family of ambient light
sensors.

Signed-off-by: Luca Weiss <[email protected]>
---
.../bindings/iio/light/stk33xx.yaml | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/light/stk33xx.yaml

diff --git a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
new file mode 100644
index 000000000000..aae8a6d627c9
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/stk33xx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: |
+ Sensortek STK33xx I2C Ambient Light and Proximity sensor
+
+maintainers:
+ - Jonathan Cameron <[email protected]>
+
+description: |
+ Ambient light and proximity sensor over an i2c interface.
+
+properties:
+ compatible:
+ enum:
+ - sensortek,stk3310
+ - sensortek,stk3311
+ - sensortek,stk3335
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ stk3310@48 {
+ compatible = "sensortek,stk3310";
+ reg = <0x48>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+ };
+ };
+...
--
2.22.0

2019-07-03 18:09:17

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 3/3] iio: light: stk3310: Add device tree support

Add device tree support for the stk33xx family of ambient light sensors.

Tested-by: Martijn Braam <[email protected]>
Signed-off-by: Luca Weiss <[email protected]>
---
drivers/iio/light/stk3310.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index b955183edfe8..185c24a75ae6 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -679,9 +679,18 @@ static const struct acpi_device_id stk3310_acpi_id[] = {

MODULE_DEVICE_TABLE(acpi, stk3310_acpi_id);

+static const struct of_device_id stk3310_of_match[] = {
+ { .compatible = "sensortek,stk3310", },
+ { .compatible = "sensortek,stk3311", },
+ { .compatible = "sensortek,stk3335", },
+ {}
+};
+MODULE_DEVICE_TABLE(of, stk3310_of_match);
+
static struct i2c_driver stk3310_driver = {
.driver = {
.name = "stk3310",
+ .of_match_table = stk3310_of_match,
.pm = STK3310_PM_OPS,
.acpi_match_table = ACPI_PTR(stk3310_acpi_id),
},
--
2.22.0

2019-07-05 16:46:15

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: iio: light: add stk33xx

On Wed, Jul 3, 2019 at 12:06 PM Luca Weiss <[email protected]> wrote:
>
> Add binding documentation for the stk33xx family of ambient light
> sensors.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> .../bindings/iio/light/stk33xx.yaml | 49 +++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/light/stk33xx.yaml

Reviewed-by: Rob Herring <[email protected]>

2019-07-14 15:24:35

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: iio: light: add stk33xx

On Fri, 5 Jul 2019 10:23:11 -0600
Rob Herring <[email protected]> wrote:

> On Wed, Jul 3, 2019 at 12:06 PM Luca Weiss <[email protected]> wrote:
> >
> > Add binding documentation for the stk33xx family of ambient light
> > sensors.
> >
> > Signed-off-by: Luca Weiss <[email protected]>
> > ---
> > .../bindings/iio/light/stk33xx.yaml | 49 +++++++++++++++++++
> > 1 file changed, 49 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/light/stk33xx.yaml
>
> Reviewed-by: Rob Herring <[email protected]>

Hmm. Not totally sure it makes sense to list me as the maintainer,
but I don't suppose it really matters as I think the author has moved
onto other things and it'll fall back on me.

Anyone who wants to pick up this one is most welcome!

Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.

Thanks,

Jonathan

2019-07-14 15:25:01

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: Add vendor prefix for sensortek

On Wed, 3 Jul 2019 20:05:57 +0200
Luca Weiss <[email protected]> wrote:

> Sensortek Technology Corp. produces Proximity Sensors with ALS and
> Accelerometers.
>
> Signed-off-by: Luca Weiss <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> ---
> This patch series depends on "iio: light: stk3310: Add support for
> stk3335", that's curerntly in linux-next.
>
> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 342bb23e0a73..d197c9609ea7 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -813,6 +813,8 @@ patternProperties:
> description: Semtech Corporation
> "^sensirion,.*":
> description: Sensirion AG
> + "^sensortek,.*":
> + description: Sensortek Technology Corporation
> "^sff,.*":
> description: Small Form Factor Committee
> "^sgd,.*":

2019-07-14 15:26:04

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 3/3] iio: light: stk3310: Add device tree support

On Wed, 3 Jul 2019 20:05:59 +0200
Luca Weiss <[email protected]> wrote:

> Add device tree support for the stk33xx family of ambient light sensors.
>
> Tested-by: Martijn Braam <[email protected]>
> Signed-off-by: Luca Weiss <[email protected]>
Applied,

Thanks,

Jonathan

> ---
> drivers/iio/light/stk3310.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
> index b955183edfe8..185c24a75ae6 100644
> --- a/drivers/iio/light/stk3310.c
> +++ b/drivers/iio/light/stk3310.c
> @@ -679,9 +679,18 @@ static const struct acpi_device_id stk3310_acpi_id[] = {
>
> MODULE_DEVICE_TABLE(acpi, stk3310_acpi_id);
>
> +static const struct of_device_id stk3310_of_match[] = {
> + { .compatible = "sensortek,stk3310", },
> + { .compatible = "sensortek,stk3311", },
> + { .compatible = "sensortek,stk3335", },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, stk3310_of_match);
> +
> static struct i2c_driver stk3310_driver = {
> .driver = {
> .name = "stk3310",
> + .of_match_table = stk3310_of_match,
> .pm = STK3310_PM_OPS,
> .acpi_match_table = ACPI_PTR(stk3310_acpi_id),
> },