Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp950281pxb; Fri, 22 Apr 2022 15:08:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC100kEyPs2JPVdkAkCH5viAD2HTZ7+RT8RI0jFwKTuczSpdY4RuZzAMwMQvMh6sGFWk4d X-Received: by 2002:a17:902:d709:b0:155:d473:2be0 with SMTP id w9-20020a170902d70900b00155d4732be0mr6425474ply.151.1650665305386; Fri, 22 Apr 2022 15:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650665305; cv=none; d=google.com; s=arc-20160816; b=hNfPFR0cSv3X8uucqO5pjCxibIH+CbA3UIrarwygDLVSQaQ+n6zfX16DLTZaxnMuDO 1GLsX9WpPtQWoXGOA5m/9Y6QLAT33VTBg0pT4e52pskp7eNL98cHI+zOfVWDGSssAR9H 4l05sgn1qZL2CDMYLfj3JROja5eGT5gYei8yj5XgBpnIxRgOVVHB1ZySV8c/Y5oWqF3a hv+unO5K6T8cjo1/dTkfVhXiN8swTPSMv9Tk0/wLRAbLC1CjeRne8xbYB5BK7XW/ZIb4 H31tsTEY5OapEG1Hgbkrh4LyZ9OYwV7CCENLCrrhtBxWuBP4QHFE81vhVQCNnfAKheyK wfBA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=teXW4xdgkAsYmm+88R9KHBtBFBQ+oR5jmMbVl5zQFMw=; b=KIIXMYJv79uGEbel7eAm/K9Bi+XaDaPnmssCdWeR9sucmVPcehr+eFhyJy0VI4iq3h 6Gi/Kr9v4If29OJcxzMEXSHIBm6dmBWNu1RVsV96Kryq6fZpPPvkVmvRR+l9qdMkGn2V Z6akFEU5m/29ravq8UrIQsozAPbPyBcAfOqLzkZRVjXa11RMxCYcLteOiJsg2BCs6MLG 5eVZkTu5TXZcL8qeP/yQm6pFI0UR2iorzJ/zvX+Ew3IzWAB0leKfckj0gv82pkql60Kx Rjxb/ClfCykh4Aei2bticgkln1p9EZTRQJyfvYlS8JX1JXjATnKM5wmKOgDevC9ht3u2 FH6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Adw6DJNb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y185-20020a638ac2000000b003aa694f5150si8490713pgd.412.2022.04.22.15.08.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:08:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Adw6DJNb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 086A438F2CF; Fri, 22 Apr 2022 13:14:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378071AbiDTL3S (ORCPT + 99 others); Wed, 20 Apr 2022 07:29:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243801AbiDTL3R (ORCPT ); Wed, 20 Apr 2022 07:29:17 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 550385F5E; Wed, 20 Apr 2022 04:26:31 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aferraris) with ESMTPSA id EF9941F4375C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650453989; bh=rX1tVK7ElPPUIHgX3PTzATWhJeReOOFh/dlM7zKsaWc=; h=From:To:Cc:Subject:Date:From; b=Adw6DJNbRcKHqoz0H3Lu9eOX3fdVCGVjjHt3kQE0hRV0VjBG2JeTAsxe0cTPyfoN/ OXdvNv35FZIxave1Ur61fp7YzsWmaPfLxE+H4QwQjdlxzXZc/Bc+4Q5iw9RvimBW0q ZvCaRQPDE8MDuaKlpZVqpsX8u9w8v+XpLzoJjMz5KT/+aRDrHMwQZCYXHOTZNng8Qb 9ULogIQpQzBI7vfGIcNrKtIeZwDmEmzJ2LwudB7ruPZziwzCnlqADvUe6Sfy1wvWW3 SFBzK6DEDQeGyxlG/8lJOZO3hoX3IvuRxDdQDKH5T2JCo/d46cwEC1eek7VzjCN6+w sywogCirFVrKA== From: Arnaud Ferraris To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH v2 0/2] iio: stk3310: Export near level property for proximity sensor Date: Wed, 20 Apr 2022 13:25:38 +0200 Message-Id: <20220420112540.91907-1-arnaud.ferraris@collabora.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Userspace tools like iio-sensor-proxy need to be instructed the value from which they should consider an object is "near". This threshold can be exported through the sysfs ABI based on the "proximity-near-level" device-tree property. This patchset implements this property for the stk3310 driver and adds the necessary bits to export its value to userspace. It is based on similar changes applied to the vcnl4000 and ltr501 drivers. Changes in v2: - drop zero-assignment as the variable won't be modified if DT property is missing Arnaud Ferraris (2): dt-bindings: iio: light: stk33xx: Add proximity-near-level iio: stk3310: Export near level property for proximity sensor .../bindings/iio/light/stk33xx.yaml | 6 +++++ drivers/iio/light/stk3310.c | 25 +++++++++++++++++++ 2 files changed, 31 insertions(+) -- 2.35.1