From patchwork Tue Jan 26 02:01:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 370850 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1877C433E0 for ; Tue, 26 Jan 2021 04:51:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFFBC22B3B for ; Tue, 26 Jan 2021 04:51:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728418AbhAZEtz (ORCPT ); Mon, 25 Jan 2021 23:49:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732130AbhAZCFz (ORCPT ); Mon, 25 Jan 2021 21:05:55 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65150C061222 for ; Mon, 25 Jan 2021 18:01:24 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id p15so816391pjv.3 for ; Mon, 25 Jan 2021 18:01:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wm686hw4j5jBSqd7g6ladOMIGoWP5gBh2lB4YQM5T54=; b=LTws3vDgcnnJwh5i3qvu2kkI6RqoXRxND4JDktxQgM3yKiZwheDz/EISwEaEyXjHOO pTAAv3jZW66k1+tHiC+BvlfIQHUaVp1mMe1Ag4ElqDk47Yc3ZzKA3QihhRJAx3j6CgZd vHI42ETF7GrSMq4ljzQOCkSPzYSenTxNcj1IE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wm686hw4j5jBSqd7g6ladOMIGoWP5gBh2lB4YQM5T54=; b=GIl4gm9layc+4qZ5jyzacQlT7pyCKwumK7kOXhbbzyH7/QKpALQWwVBtIZYh/GzUqI mudcB9YqrzRcqTzv1UKpArD1dXb4N9l8DVLYq+gTkA7Bwtv0F7N/xYX28TUlikkHcZ99 A4JiSebZpnYhppAsaFjA8WlsnOmH+zwnBoglihUsWjSi561wIU0LEZOsbXBjKb/5IUNG VGLs8d1jW3sDgBFZ5pSw1F+xEzSrW0GzXkqL5KutKc7eFni+rMTdi6a8hETh4al562DX yzrNZKAZ4scIx2t+z6fQya48zewWN0YVjn08huT8jTw9PZnbQdsuwgSYgzWLTYOAjTLz gzlg== X-Gm-Message-State: AOAM5315sRx2vKYFmwGQM1fmeE5feW91HpCZG/O+0A4iHhPR5Pyrsb/p Bk4nUhdPfkUdHFHQg+zjWBpeCQ== X-Google-Smtp-Source: ABdhPJywNUMbEQHIkLbDUwVCpu2O5SfY8LRfgGxByPbyXBlYnbqvlcNqMMo9n/A3xciukAOe2vuWyw== X-Received: by 2002:a17:90a:2f44:: with SMTP id s62mr3315525pjd.182.1611626484024; Mon, 25 Jan 2021 18:01:24 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:1066:b437:97cd:2278]) by smtp.gmail.com with ESMTPSA id n2sm16975028pfu.42.2021.01.25.18.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 18:01:23 -0800 (PST) From: Stephen Boyd To: Jonathan Cameron Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Dmitry Torokhov , Benson Leung , Guenter Roeck , Douglas Anderson , Gwendal Grignou , devicetree@vger.kernel.org, Rob Herring Subject: [PATCH v2 2/3] dt-bindings: iio: Add cros ec proximity yaml doc Date: Mon, 25 Jan 2021 18:01:16 -0800 Message-Id: <20210126020117.2753615-4-swboyd@chromium.org> X-Mailer: git-send-email 2.30.0.280.ga3ce27912f-goog In-Reply-To: <20210126020117.2753615-1-swboyd@chromium.org> References: <20210126020117.2753615-1-swboyd@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some cros ECs support a front proximity MKBP event via 'EC_MKBP_FRONT_PROXIMITY'. Add a DT binding to document this feature via a node that is a child of the main cros_ec device node. Devices that have this ability will describe this in firmware. Cc: Dmitry Torokhov Cc: Benson Leung Cc: Guenter Roeck Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Cc: Rob Herring Signed-off-by: Stephen Boyd --- Changes from v1: * Added additionalProperties * Included proximity in cros-ec yaml .../google,cros-ec-mkbp-proximity.yaml | 38 +++++++++++++++++++ .../bindings/mfd/google,cros-ec.yaml | 3 ++ 2 files changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/proximity/google,cros-ec-mkbp-proximity.yaml diff --git a/Documentation/devicetree/bindings/iio/proximity/google,cros-ec-mkbp-proximity.yaml b/Documentation/devicetree/bindings/iio/proximity/google,cros-ec-mkbp-proximity.yaml new file mode 100644 index 000000000000..c3141c2be286 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/proximity/google,cros-ec-mkbp-proximity.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/iio/proximity/google,cros-ec-mkbp-proximity.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ChromeOS EC MKBP Proximity Sensor + +maintainers: + - Stephen Boyd + - Benson Leung + - Enric Balletbo i Serra + +description: | + Google's ChromeOS EC sometimes has the ability to detect user proximity. + This is implemented on the EC as near/far logic and exposed to the OS + via an MKBP switch bit. + +properties: + compatible: + const: google,cros-ec-mkbp-proximity + + label: + description: Name for proximity sensor + +required: + - compatible + +unevaluatedProperties: false +additionalProperties: false + +examples: + - | + proximity { + compatible = "google,cros-ec-mkbp-proximity"; + label = "proximity-wifi-lte"; + }; diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index 76bf16ee27ec..479a9f15de32 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -94,6 +94,9 @@ properties: keyboard-controller: $ref: "/schemas/input/google,cros-ec-keyb.yaml#" + proximity: + $ref: "/schemas/iio/proximity/google,cros-ec-mkbp-proximity.yaml#" + codecs: type: object additionalProperties: false