Received: by 2002:a05:7412:8d08:b0:f9:2d0a:d759 with SMTP id bj8csp149556rdb; Sun, 17 Dec 2023 06:11:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHH2nxJE4SWBePK56BUIivQ9ZY2ywKtWOm9NAz6ZIOOuhpbcm0eYW3HV0E1+SstIvqdaXl X-Received: by 2002:a50:d698:0:b0:553:1cdb:f6ef with SMTP id r24-20020a50d698000000b005531cdbf6efmr1044363edi.45.1702822288006; Sun, 17 Dec 2023 06:11:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702822287; cv=none; d=google.com; s=arc-20160816; b=g7mmHZd0sVFwOvb5h9ZyRlumkn8FtYklmgkGknIhoFess3YkfHOo76/1iC3XZHTadU qYi82hNSlbykXfANz3DdppTSCkhZio+8hoBasB4w+tJ1OtAorChlDClFLqiIZ2Zwp5yr Kl/ca8pIhsyIs+gnKikfac3NdF+wFttlme3T6KRLyxeRxaiugRnJT4GQHTYDwx8OPOGt vTYF93Z/NOFur8W190iHN1Hk3yZONAlbzSIzu+MNlQXjNXq9Xj3E/OXV2ID+ogGU2GSZ RCB3fIcv3X7fhVkdY9fGrBH31RIE1GoJWXL/x1RMcV4CUmZ3PSskHGDoJjLB/MK5ix7n 0SFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=6bKJJTe61HZ9zBNkJJq2czSuLnuxSEQ5zswYyl82YdU=; fh=t0pLqYUISCBb7OxoWeDuLD/opiSSQpVahUm+ZDTl+/Q=; b=FQbW57iLKQ45f2KjVMMDtNN6kjJBnDYofEAWohYEZIIobL6CPTmv7hbYwI4bmfwo2H 6DkSL66KPH1dD72pSv5jyAhT6wPPsBoym9zGe9iRMEGkqTfZn0HypYJ8CJ+xNzeXx9s4 wZYdMzk0xMtjw6Yj+s064j1t2XI0PtfKHECfeIzGICatRwtc5vNmwBHGKnleU+LayZU2 kcTXd2CNmBHdEVrk3vb1v2+ND5KE2yJml5bX2Zfz1tH8z3ZnsFEE6lmDutzIFT605gH1 Z07S81LkMGmzUWzzJmxgsGBxvIk42X79w7ppULaoO8g4wAtj4UK/d/yD9tJlGYmzOM0S zZcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZxKILIAX; spf=pass (google.com: domain of linux-kernel+bounces-2622-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2622-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y20-20020a056402271400b0054b7047bea4si9657736edd.399.2023.12.17.06.11.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 06:11:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2622-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZxKILIAX; spf=pass (google.com: domain of linux-kernel+bounces-2622-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2622-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BCFFF1F2286D for ; Sun, 17 Dec 2023 14:11:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B1444439C; Sun, 17 Dec 2023 14:11:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZxKILIAX" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A3B14437D; Sun, 17 Dec 2023 14:11:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00E69C433C7; Sun, 17 Dec 2023 14:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702822260; bh=232ebC+aydld8uM75OIYPmde9ImqL+FqL1VcnhiVjpA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZxKILIAXFzTlwS/4DOuv/wVlUowtJedCGqk2s6NXk5X6ZwwsngBhdQjpPO4MmiE+W cBZGf9wwdaTOiz8W/f1LSEwmUvnUJQJGB/WRG4+g+87rsghCcHY1yvaPAkLMa6r41w Tzm/QL+xffCiokGQSDu/h83abPBC6zZDYcuELYJ+l3rHuzSvbE5DWajtVIlmRjYYxj LnZeDJAIKEAH8Pnos0xFiElP2jXkN/bBhMJkhmN7v8/ywc5H5xT5UWzRqz0RivpfzB LIEBhRZphWR00Bo0aOM8G80GLku81bwcgQ09FuPMbv9G34CyC0uuP8pu3rwYem2BgH 7enq8KH7SpTLw== Date: Sun, 17 Dec 2023 14:10:46 +0000 From: Jonathan Cameron To: =?UTF-8?B?TcOlcnRlbg==?= Lindahl Cc: Lars-Peter Clausen , , , Subject: Re: [PATCH 0/2] Introduce new iio resolution standard attribute Message-ID: <20231217141046.4cf3e34e@jic23-huawei> In-Reply-To: <20231212-vcnl4000-ps-hd-v1-0-1c62a95828c0@axis.com> References: <20231212-vcnl4000-ps-hd-v1-0-1c62a95828c0@axis.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 15 Dec 2023 13:43:03 +0100 M=C3=A5rten Lindahl wrote: > This patch introduces a new IIO standard attribute to set the bit > resolution of the data *_raw readings dynamically using sysfs. >=20 > The VCNL4040/4200 proximity/ambient light sensors support 12-bit > (default) and 16-bit ADC resolutions. This can be dynamically changed, > so to support this with the standard iio channel configuration a new iio > attribute should be added. >=20 > The VCNL4040 devices will use this for setting proximity high definition > (16-bit resolution). >=20 > Signed-off-by: M=C3=A5rten Lindahl Hi M=C3=A5rten, What is the use case? We've had lots of devices capable of doing this sort of resolution change, but never yet come up with a reason to do so for the sysfs interfaces on the basis the overhead of the sysfs interfaces is high enough the best bet is almost always to use the highest available reso= lution and don't worry that the read takes a little longer. Jonathan > --- > M=C3=A5rten Lindahl (2): > iio: core: Introduce resolution standard attribute > iio: light: vcnl4000: Add ps high definition for vcnl4040 >=20 > drivers/iio/industrialio-core.c | 1 + > drivers/iio/light/vcnl4000.c | 87 +++++++++++++++++++++++++++++++++++= +++++- > include/linux/iio/types.h | 1 + > 3 files changed, 87 insertions(+), 2 deletions(-) > --- > base-commit: a39b6ac3781d46ba18193c9dbb2110f31e9bffe9 > change-id: 20231212-vcnl4000-ps-hd-38d42abf9095 >=20 > Best regards,