Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1187873lqb; Sat, 25 May 2024 09:19:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIf76/ROSNwplPssSGXMYIV6uW+PE2LP3woKaHzCCrEIddAoK98DEogXDDjtUdT1ZVX7mExUS7xqn1ekeJaoDECDdLydKcHAEnDKyJMg== X-Google-Smtp-Source: AGHT+IFz++24S8VLvPFVMl1RS0Ujx2HeXFvCnVr2ttsaJ8ZvDtWyPazcSq+z8ErxZGT/UxfhpFmd X-Received: by 2002:a05:620a:72ac:b0:792:bfb8:848b with SMTP id af79cd13be357-794ab0a3237mr634801985a.27.1716653984144; Sat, 25 May 2024 09:19:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716653984; cv=pass; d=google.com; s=arc-20160816; b=YtYKyuMMsgzMtwSaqy6fOwd/qz7ZxwqioshUunCYpkaTSPRnDhvVy4js8+4SJHcwTT +u/+INkGDSvyw46gi2lGRWgClk97TSI4ZtTq5cAzxcLTD4ACrorawrcRCD+uE4V1IARW XYlOhVhfzmc8xh6B9tY3WorrVpzkorQ2h28t+bsRfwVcyFDsd/LWffiRYg+3jaISvwN3 L0qXMhXaiEgQ26nbI34GDFM6WTTjOy51w/YbhpXwaR3g9uLrNqsZbjM1JruoZJXr55Ld 16yN69r8CYC/z0t8Iz8bEZEBvAiUS0afKCysyTB/rsRvXXwprZ14Ty0yTciVOfMReEjq 3X0w== ARC-Message-Signature: i=2; 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=DqBxfVMDTtQnFRu/56CssttbGbxLKTGzD2Ic2RIAcxY=; fh=16jvDeb6Ktf2UXv+rYJNoxP63JaqlB+rSL9h38cJonI=; b=MvF9rmuI8OHwpDC5MgK55HHP4k+PqyM0M++tLmxqQJIjBZMstsOAB+CYl4GwzBfbsy wK5P7nQCGgNYYdKH/ZAX7AC1I0eunKHyMo4HSCptVLWR/2aEYDOzj3Et9MrT7H+iXuru GAvr/kBNOb3vII6DpRcY6DjJVthyRVisASLqetcWMj1ENr1ySs9p12iedKygVKfGe/YA eru2eMU4ubUme7owzx3cYGMiqgVZzh0wvyio4oHxvgpav3Li1MZG/WY5MPrH0CmZYiqQ ziTATbIAKjraBGHS4E+0xTUxeJjut1Mg32FtJSlAFJQpZyhCgwU39J9gCuIxAIxID1a6 /I5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=trIbj26K; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189441-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189441-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794abd3d7a0si400970185a.482.2024.05.25.09.19.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 09:19:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189441-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=trIbj26K; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189441-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189441-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D7C281C20A7A for ; Sat, 25 May 2024 16:19:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 537FC85C77; Sat, 25 May 2024 16:19:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="trIbj26K" 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 74A9058ABC; Sat, 25 May 2024 16:19:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716653976; cv=none; b=oB8gH1uuRqPCF46gPVKTEhv06AwIg5biDIEGDU2RtlLJeP2U5RxlkpI8l6Wn3PZtWOehx3ECwAgGDUZ+INOnmlo1yaHL3yTsxqfDZgSc2iG4qZP61/8WRcukVdxOw7tMizDdg7TRV3u02R4SOZEnjcnnJ5k1KNgrb9n8cm8mr9k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716653976; c=relaxed/simple; bh=DqBxfVMDTtQnFRu/56CssttbGbxLKTGzD2Ic2RIAcxY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=F5eDaiL/j5uKEoJlXvr8CkM7ChWkWvym8Q8Lx0J0yyhyw2jbLRP1ILyFJ9rAuL+o+JfWs2IqW7+Pxxnz0drzV40lsdUzDoa0dXYa0XhBNGygLiKHKy1KdaOnvrxOhxEc84YzAyvsSwclSxmmGu9QMfu9Sokk7uTq1sdyaFz2WpI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=trIbj26K; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3EFAC2BD11; Sat, 25 May 2024 16:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716653976; bh=DqBxfVMDTtQnFRu/56CssttbGbxLKTGzD2Ic2RIAcxY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=trIbj26KDRTFngfSwrAoTXCdJ8vQRM+Kj9EEgvwY3YAawrHomLA5pkmqwYeyKOSPn +kXPIjQ7F55odO6Pt8qUFOT2M0kQNyOOcEJkDkw0wWE/WJ19NqXsrVqfSJ7BDUgncA KwkZQtRB0jqv6wiym5uOsSh2RcTEL9OTnMTAJQGF+1LNbL2aXgcUiGSTk3YMcQFFPr T7QUKQxdpmjTvARY7KvRX/8cZ5akqL+OpFGdrDaCy5XfRpI0ZShoHQRx5oZQQnY7EW s0tuhHWl10ROPiBwk7oKkaD/innTmlG7GBvZgWnpZgkgO7IWDLXgohWnVzM/Wc60s7 pbmAdTOKeG29g== Date: Sat, 25 May 2024 17:19:22 +0100 From: Jonathan Cameron To: Nuno =?UTF-8?B?U8Oh?= Cc: David Lechner , Michael Hennerich , Nuno =?UTF-8?B?U8Oh?= , Julien Stephan , Esteban Blanc , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 0/4] iio: add support for multiple scan types Message-ID: <20240525171922.58974617@jic23-huawei> In-Reply-To: References: <20240507-iio-add-support-for-multiple-scan-types-v1-0-95ac33ee51e9@baylibre.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.42; 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 Tue, 21 May 2024 11:18:24 +0200 Nuno S=C3=A1 wrote: > On Tue, 2024-05-07 at 14:02 -0500, David Lechner wrote: > > Following up from this thread [1]... > >=20 > > Unless I've overlooked something important, I think adding support for > > multiple scan types per channels should be rather trivial, at least in > > the kernel. Userspace tools will need to learn to re-read buffer _type > > attributes though. For example, it looks like libiio caches these value= s. > > I had to restart iiod to get a proper capture with the iio-oscilloscope > > after changing the scan type at runtime. =20 >=20 > No for now but to add more future fun, we may consider in having something > similar as hwmon [1]. Hence, userspace could do things like poll(2) on the > specific file rather than having to read it over and over... >=20 > [1]: https://elixir.bootlin.com/linux/latest/source/drivers/hwmon/hwmon.c= #L649 > - Nuno S=C3=A1 >=20 It would take a well reasoned usecase to convince me sysfs notifications are useful in cases where an explicit userspace action caused the value that would be read from another file to change immediately. Jonathan