From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 47FDFC4363D for ; Wed, 7 Oct 2020 01:18:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC4F120782 for ; Wed, 7 Oct 2020 01:17:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="TxYZNSrk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727375AbgJGBR6 (ORCPT ); Tue, 6 Oct 2020 21:17:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727168AbgJGBRo (ORCPT ); Tue, 6 Oct 2020 21:17:44 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87F6FC0613D3 for ; Tue, 6 Oct 2020 18:17:44 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id n14so375631pff.6 for ; Tue, 06 Oct 2020 18:17:44 -0700 (PDT) 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=q3b5vsX7ezYRrPD7MIrHHFYiH7Fjfq1VpNyAfa7YYMs=; b=TxYZNSrk4fijdF8OlyZfUbDEsKkWlbTvkerk0i9KIlYHeZ8KC3c63ldolEDrzF8P9G 4u0Sq9sSF2HE9LX4sV+8Qa8zHRRwv/ZIJ8+KRG7YimA8YEkGLvxFMOnUsV3B4Kcdc8Ip tHjD7+ImhdbxCcYUTYz/toLYjccbJYmYYQ9xQ= 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=q3b5vsX7ezYRrPD7MIrHHFYiH7Fjfq1VpNyAfa7YYMs=; b=Ak49utrAXNlFAq96NGfMAaTTH7ttoh4wV3MynODMT4P3IcEOIDXBVCmzZFqHsp0iKk Bzc3gnCxChvNW/urJlDmM4+v4WAiIzuBlbzPPIJTehq2rn2h3uDLT0uzoLY9yi40/87p GFDH+NN/3pqPLfJy+Lf4As4HmjmbQxWwwokhz0DifMUfkkApuDFPIVRY/fwFP81EDhZr vzDCdkVND1oBQVVfgvR0p5+9U+yxYaEAEsPtWCxplNWEXRk6rIOJl1YrmCkRYXB45UWF LITRoD9XULziXdGNItB3Hwezktb8Y0ykDjIElDOTDzWCCglDaYv9LF90Nltnu1xdB81m ot+Q== X-Gm-Message-State: AOAM532T8tP/E3tiNbHd9zOnItj9WrRwcFlwFQLY+WXcs9ZPNf6Gguz5 5tTlLGb2GibPeAPS7tkRmrUBsvefA+EpIg== X-Google-Smtp-Source: ABdhPJxCY7qloRtr55WTd3OKPpExkfS+8Yq9WlyeWs/4TAodbENQfjN9NxBtw5KFtw8YA8PjZL+svA== X-Received: by 2002:a62:301:0:b029:13c:1611:6587 with SMTP id 1-20020a6203010000b029013c16116587mr674460pfd.4.1602033463974; Tue, 06 Oct 2020 18:17:43 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:3e52:82ff:fe6c:83ab]) by smtp.gmail.com with ESMTPSA id z190sm482654pfc.89.2020.10.06.18.17.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Oct 2020 18:17:43 -0700 (PDT) From: Stephen Boyd To: Jonathan Cameron Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Daniel Campello , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , devicetree@vger.kernel.org, Douglas Anderson , Gwendal Grignou , Evan Green Subject: [PATCH v3 5/6] dt-bindings: iio: sx9310: Add various settings as DT properties Date: Tue, 6 Oct 2020 18:17:34 -0700 Message-Id: <20201007011735.1346994-6-swboyd@chromium.org> X-Mailer: git-send-email 2.28.0.806.g8561365e88-goog In-Reply-To: <20201007011735.1346994-1-swboyd@chromium.org> References: <20201007011735.1346994-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to set various bits in the hardware registers for this device to operate properly depending on how it is installed. Add a handful of DT properties to configure these things. Cc: Daniel Campello Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Reviewed-by: Rob Herring Cc: Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Evan Green Signed-off-by: Stephen Boyd --- .../iio/proximity/semtech,sx9310.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml index 5739074d3592..ccfb163f3d34 100644 --- a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml +++ b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml @@ -40,6 +40,63 @@ properties: "#io-channel-cells": const: 1 + semtech,cs0-ground: + description: Indicates the CS0 sensor is connected to ground. + type: boolean + + semtech,combined-sensors: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + List of which sensors are combined and represented by CS3. + Possible values are - + 3 - CS3 (internal) + 0 1 - CS0 + CS1 + 1 2 - CS1 + CS2 (default) + 0 1 2 3 - CS0 + CS1 + CS2 + CS3 + items: + enum: [ 0, 1, 2, 3 ] + minItems: 1 + maxItems: 4 + + semtech,resolution: + description: + Capacitance measure resolution. Refer to datasheet for more details. + enum: + - coarsest + - very-coarse + - coarse + - medium-coarse + - medium + - fine + - very-fine + - finest + + semtech,startup-sensor: + $ref: /schemas/types.yaml#definitions/uint32 + enum: [0, 1, 2, 3] + default: 0 + description: + Sensor used for start-up proximity detection. The combined + sensor is represented by the value 3. This is used for initial + compensation. + + semtech,proxraw-strength: + $ref: /schemas/types.yaml#definitions/uint32 + enum: [0, 2, 4, 8] + default: 2 + description: + PROXRAW filter strength. A value of 0 represents off, and other values + represent 1-1/N. + + semtech,avg-pos-strength: + $ref: /schemas/types.yaml#definitions/uint32 + enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295] + default: 16 + description: + Average positive filter strength. A value of 0 represents off and + UINT_MAX (4294967295) represents infinite. Other values + represent 1-1/N. + required: - compatible - reg @@ -61,5 +118,11 @@ examples: vdd-supply = <&pp3300_a>; svdd-supply = <&pp1800_prox>; #io-channel-cells = <1>; + semtech,cs0-ground; + semtech,combined-sensors = <1 2 3>; + semtech,resolution = "fine"; + semtech,startup-sensor = <1>; + semtech,proxraw-strength = <2>; + semtech,avg-pos-strength = <64>; }; }; -- Sent by a computer, using git, on the internet