Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp983528pxb; Tue, 9 Feb 2021 18:55:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJywdGNk5B34UVKvBrCDHaI3Fq3dkREiYBz2m1YhrRyCpvN2Z/TfP6l3GLLK8S1+HAVgB8+y X-Received: by 2002:aa7:d297:: with SMTP id w23mr1143128edq.173.1612925711559; Tue, 09 Feb 2021 18:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612925711; cv=none; d=google.com; s=arc-20160816; b=Q90rrMTNzLdSlnK24tiQAknYVDES1azfgV4y5unz5znxJ3j39PAb9St1xklU4qtn6h x3jtGEQxsVNAJjFoa/5cJ5NduB44oYZBF4b8XHaEnKeJuRyzIt4uu/mhXRt5AAxgMCmf XslV1sJLfiHfEvPFWwzaBOSwxA1oyfX5jPhL0XAvrHzgtZmstB21SWWYhJdoDdd5UILY MwTU4Y4vdl4jludGyzaQImvn3yY7kg300Xj+VPmupxUAyCcQyWKEaMgzQkv4vXVUh67Y fbHVLcFuAo6rjMyszfEyB8hwNwn7WnwMjro0fhLS1HzJHvF5j0UKiXWRcLTguIDHS4Cr Frbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mKEUl/8BfdEmVEI/D43kxjMasV/xJ4YnCz8a7+JpFhc=; b=aARONYfjtiwIbwrRvfeumO8WEdB6Yw/v0yp1uHu7wVbGYIjFrJpidW3F9n7QByoCy/ jWk+HyPQLY7iEBmRT+QjOyxmxuXPC77g3QRFE2ErM2xsFlYQV9NmylrIC418iQ00Ic1y UO+NtSKKiGM7GZWMlCxVSIvYcuDf3pFFhJEGCSmCRkHgmVhbneuZU7tsDdU/mZ9gSQV8 Yg9DveUVaQpiPuZLNll7dX5OisRnScP9mfg1l69dVU+Oi71yVL/+2Igmc3YVBIcwiEsi z+jzcjMtYd/E9CE/dKBxChk3XVcsYRvmlHN5esGeO1+7VNlBhJKs164pNsminfdYibV4 Pl9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IBIh8xct; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r5si433030edv.548.2021.02.09.18.54.48; Tue, 09 Feb 2021 18:55:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IBIh8xct; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233691AbhBJCw5 (ORCPT + 99 others); Tue, 9 Feb 2021 21:52:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233341AbhBJCwt (ORCPT ); Tue, 9 Feb 2021 21:52:49 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E6D2C06178B for ; Tue, 9 Feb 2021 18:51:47 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id u143so326460pfc.7 for ; Tue, 09 Feb 2021 18:51:47 -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=mKEUl/8BfdEmVEI/D43kxjMasV/xJ4YnCz8a7+JpFhc=; b=IBIh8xct6WRtScFuZLWzPcHM+PoI1PpgUCgwUTBvQvEqhAZoFWkqIxcFJJPVevvxEh PrXiuDjPNYndkjzIAZsR+gzH7fOvREb+b8MkxBFZg/cm7WS2FSwtXD+2s6JnYKMGaX86 KDyxRPYLhOPjcy9qR2bZP/dvdyY1h5Re2TXtI= 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=mKEUl/8BfdEmVEI/D43kxjMasV/xJ4YnCz8a7+JpFhc=; b=B5rQdE1bRLAFRj/5Qgree7puH1Ad055fUkuYbDA/Hp16u3hPJwulJgSXInukqLmLGN HqYZOwoe/WYG1qyX1lY70Wt/iHBS8g8s1izMTGywL8Ols02YroG4wrFz+Ao1ehJqzj3i nRY03K7kOsS1R7y5fU6UorFYNEt/jiiIGrBS8BUkd/xgal1gAeUK0Sbq43LFDaV6Ry9w NikR8VTfAS6P6DsYQ9nEHPCvD8x0qkHa6ab4I0gfyP4LO2cvDx09EkmxvTeV5qLFY4oz hVlScCTQ694xTTpkhZVD0owM2dGWiRZVlL7BNvfiVUV1NnX3HBfUUklU55J3sDL2DRLt idBQ== X-Gm-Message-State: AOAM5320GqJKdmcSaOjD+aMLlfE/5ETUIGNgc1eBQXQ+V4QYhZkSYY17 IbWaRRJPP2TtD7moLUVDLOtgp8ztbMgZTw== X-Received: by 2002:a62:3247:0:b029:1dc:5a62:c367 with SMTP id y68-20020a6232470000b02901dc5a62c367mr1095093pfy.3.1612925507153; Tue, 09 Feb 2021 18:51:47 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:58e2:748e:a316:9823]) by smtp.gmail.com with ESMTPSA id r13sm139420pfc.198.2021.02.09.18.51.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 18:51:46 -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 , Enric Balletbo i Serra Subject: [PATCH v5 2/3] dt-bindings: iio: Add cros ec proximity yaml doc Date: Tue, 9 Feb 2021 18:51:41 -0800 Message-Id: <20210210025142.3609708-3-swboyd@chromium.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog In-Reply-To: <20210210025142.3609708-1-swboyd@chromium.org> References: <20210210025142.3609708-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 Cc: Enric Balletbo i Serra Signed-off-by: Stephen Boyd --- Changes from v4: * Reduced example in iio binding and moved to mfd * Dropped unevaluatedProperties .../google,cros-ec-mkbp-proximity.yaml | 37 +++++++++++++++++++ .../bindings/mfd/google,cros-ec.yaml | 7 ++++ 2 files changed, 44 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..099b4be927d4 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/proximity/google,cros-ec-mkbp-proximity.yaml @@ -0,0 +1,37 @@ +# 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 + +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..4dfa70a013ae 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 @@ -180,6 +183,10 @@ examples: interrupts = <99 0>; interrupt-parent = <&gpio7>; spi-max-frequency = <5000000>; + + proximity { + compatible = "google,cros-ec-mkbp-proximity"; + }; }; }; -- https://chromeos.dev