From patchwork Wed Jul 3 18:05:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 11030017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6ACFE1580 for ; Wed, 3 Jul 2019 18:06:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DDDB28680 for ; Wed, 3 Jul 2019 18:06:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51EE12886A; Wed, 3 Jul 2019 18:06:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB75428680 for ; Wed, 3 Jul 2019 18:06:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727074AbfGCSGy (ORCPT ); Wed, 3 Jul 2019 14:06:54 -0400 Received: from mail.z3ntu.xyz ([128.199.32.197]:59172 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726762AbfGCSGy (ORCPT ); Wed, 3 Jul 2019 14:06:54 -0400 Received: from localhost.localdomain (80-110-121-20.cgn.dynamic.surfer.at [80.110.121.20]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id CA390C54AE; Wed, 3 Jul 2019 18:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1562177211; bh=rFoC5qULgkgZLGx9OtZLKlFFvNlr0AhFTgrrSrhAbls=; h=From:To:Cc:Subject:Date; b=LTdRQA0HWQbe/oCEDkrpK8V3Ntcka6iyW8oHFAVzCj415zOkGB3oyqa78KMU2QbtI 4k2+dk2eKHVm6z4ycEOg68aEuch199qnxDNxXZvky+KNWwra/+d5RJSLIgl/56UHOz viG/4UDB3qPlvOYqKxyjVp+vfVuCWG/D52Wq7zII= From: Luca Weiss To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Luca Weiss , Maxime Ripard , Mauro Carvalho Chehab , Hans Verkuil , Fabrizio Castro , "Angus Ainslie (Purism)" , Vivek Unune , Hannes Schmelzer , Greg Kroah-Hartman , Thomas Gleixner , Allison Randal , Martijn Braam , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~martijnbraam/pmos-upstream@lists.sr.ht, Chris Paterson , Michael Tretter Subject: [PATCH 1/3] dt-bindings: Add vendor prefix for sensortek Date: Wed, 3 Jul 2019 20:05:57 +0200 Message-Id: <20190703180604.9840-1-luca@z3ntu.xyz> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sensortek Technology Corp. produces Proximity Sensors with ALS and Accelerometers. Signed-off-by: Luca Weiss --- 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,.*": From patchwork Wed Jul 3 18:05:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 11030019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 841E61398 for ; Wed, 3 Jul 2019 18:07:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75FF028680 for ; Wed, 3 Jul 2019 18:07:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6890728852; Wed, 3 Jul 2019 18:07:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06EF828680 for ; Wed, 3 Jul 2019 18:07:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727134AbfGCSG7 (ORCPT ); Wed, 3 Jul 2019 14:06:59 -0400 Received: from mail.z3ntu.xyz ([128.199.32.197]:59196 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726762AbfGCSG6 (ORCPT ); Wed, 3 Jul 2019 14:06:58 -0400 Received: from localhost.localdomain (80-110-121-20.cgn.dynamic.surfer.at [80.110.121.20]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id A0722C55AD; Wed, 3 Jul 2019 18:06:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1562177216; bh=kogtn/O296w1GSoKnB+SwvfVRWMRr1dQ7m1eOkn1I0I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OoJZ1GPQCIGeUanjuy4vyz9IWqFfk6yxHwOx7sOtxVAjBdjbihK+spNkLUg5Bv4Pq bIXxuckqAztvUu3ScK8I3zV2dHIBjsK9NBE5LHVZbMzZeRyIPjkARqDWZPEVTBTDWT IhDtWZx4EQrvVg0auiHbTi4U0fzTTHwHebb8Y/GQ= From: Luca Weiss To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Luca Weiss , Maxime Ripard , Mauro Carvalho Chehab , Hans Verkuil , Fabrizio Castro , "Angus Ainslie (Purism)" , Vivek Unune , Hannes Schmelzer , Greg Kroah-Hartman , Thomas Gleixner , Allison Randal , Martijn Braam , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~martijnbraam/pmos-upstream@lists.sr.ht Subject: [PATCH 2/3] dt-bindings: iio: light: add stk33xx Date: Wed, 3 Jul 2019 20:05:58 +0200 Message-Id: <20190703180604.9840-2-luca@z3ntu.xyz> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190703180604.9840-1-luca@z3ntu.xyz> References: <20190703180604.9840-1-luca@z3ntu.xyz> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add binding documentation for the stk33xx family of ambient light sensors. Signed-off-by: Luca Weiss Reviewed-by: Rob Herring --- .../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 + +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 + + i2c { + + #address-cells = <1>; + #size-cells = <0>; + + stk3310@48 { + compatible = "sensortek,stk3310"; + reg = <0x48>; + interrupt-parent = <&gpio1>; + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; + }; + }; +... From patchwork Wed Jul 3 18:05:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 11030021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B00421398 for ; Wed, 3 Jul 2019 18:07:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A317128814 for ; Wed, 3 Jul 2019 18:07:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9675B2886A; Wed, 3 Jul 2019 18:07:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47B2A28814 for ; Wed, 3 Jul 2019 18:07:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726430AbfGCSHC (ORCPT ); Wed, 3 Jul 2019 14:07:02 -0400 Received: from mail.z3ntu.xyz ([128.199.32.197]:59254 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727153AbfGCSHB (ORCPT ); Wed, 3 Jul 2019 14:07:01 -0400 Received: from localhost.localdomain (80-110-121-20.cgn.dynamic.surfer.at [80.110.121.20]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 7B752C6432; Wed, 3 Jul 2019 18:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1562177219; bh=aPToY7twoPc/frU4dp+Z2DD+iPJlG9FAsZ0bAsYXf04=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=j8ufLMJqJsEuP/4OP3alP0ja620IMh7DMJe4xw6oONMHuHLt9efUqnYTvwaRxyW/g +lFZFu1QHNrqzi4x4vazeTCYph2ZnAx/ba4Awljv/zJpN6FtgAy+sw5jCN0HjgnW+n 6ul7a+hJiSbByBjHqXrPu2Dxg3lVRTUBQ4AnpTjM= From: Luca Weiss To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Luca Weiss , Maxime Ripard , Mauro Carvalho Chehab , Hans Verkuil , Fabrizio Castro , "Angus Ainslie (Purism)" , Vivek Unune , Hannes Schmelzer , Greg Kroah-Hartman , Thomas Gleixner , Allison Randal , Martijn Braam , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~martijnbraam/pmos-upstream@lists.sr.ht, Kate Stewart Subject: [PATCH 3/3] iio: light: stk3310: Add device tree support Date: Wed, 3 Jul 2019 20:05:59 +0200 Message-Id: <20190703180604.9840-3-luca@z3ntu.xyz> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190703180604.9840-1-luca@z3ntu.xyz> References: <20190703180604.9840-1-luca@z3ntu.xyz> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add device tree support for the stk33xx family of ambient light sensors. Tested-by: Martijn Braam Signed-off-by: Luca Weiss --- 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), },