~martijnbraam/pmos-upstream

dt-bindings: Add vendor prefix for sensortek v1 APPLIED

Luca Weiss: 3
 dt-bindings: Add vendor prefix for sensortek
 dt-bindings: iio: light: add stk33xx
 iio: light: stk3310: Add device tree support

 3 files changed, 60 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~martijnbraam/pmos-upstream/patches/6521/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH 1/3] dt-bindings: Add vendor prefix for sensortek Export this patch

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

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
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

[PATCH 2/3] dt-bindings: iio: light: add stk33xx Export this patch

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

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 .../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 <jic23@kernel.org>

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

[PATCH 3/3] iio: light: stk3310: Add device tree support Export this patch

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

Tested-by: Martijn Braam <martijn@brixit.nl>
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 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