Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2377418rdd; Fri, 12 Jan 2024 07:42:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEdFAo6Q5DKNlE77YW1R/BlBFBS44MGyhlLN6s1FvtgcQVvtX10ByKS9+QkhcCFGtg1BsD X-Received: by 2002:a05:6808:2019:b0:3bd:3dba:5ee with SMTP id q25-20020a056808201900b003bd3dba05eemr1425297oiw.62.1705074157397; Fri, 12 Jan 2024 07:42:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705074157; cv=none; d=google.com; s=arc-20160816; b=lEYkHgc3T0GCGOYBf15Wupmi9jnooumuMGzErlh++bmT83JUN/OSpCUVNKM3Y5jk5M hdwVn3SburBqrl/vYz9w/NbQAPKIKG/OPEXVKb4qPQwr2yO1xs/+Opw6Ra02lCDaBqHY dP+vg9MA3QeOag6dmYywzgOrd+3kgo6EvZ1HCKWnyQNWxzNzoTK3oqaEaaBcnBOXnnM6 M2TsKbbO2YQ41qoCHmWjQbaVj3lbQfYyujaZykpdZB5/eUrOXRwm4bPI3CjdhVP2DXdJ XZV+BnqszBtVtwtplP/y62gzRoADlMKPHKPfTaqOfr33Z7lyuNJv7v7xjxNXWYhk/moJ xUfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=AaVw5UCNPa/eBnU3IdbP9nG5gQESTbpoML4+9XQsGiA=; fh=IzlvqyVGOmz32KAzelt1TX6goL869L7x7kjlGm57LCQ=; b=o1t2oFOXJLbaPtOEiH68jKhEQaPs5bx7aDR3Xg83ri3AMFamGPqI0Xzux4UqwA8dni 4S3T9O5iWQoMyhsMkoFTsmQszMhoWIYPNkG6ldM5KHrTyUAhS0AuUGMxwt8fuac2phaG MSe+WVYEZ5Bv93/u7MGc0FM7sMJ255x3u7gzIL9L/9dU0WpqIi+ZZE9RvMcc1hARvgtz oRlUxKsqlycn4fdIJoD43OxCY++5E+Z1bknXOPMlZCAoVkG1OBg6dOGaHrC0vBHlt1aA KnLZ6kRPBEN8n2W9GdkEsDJ3jNgvWM3elB00oPWyZwpvTH56+9+s4U5LM0CerinEaZiK P59A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=k8nu2ViQ; spf=pass (google.com: domain of linux-kernel+bounces-24816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24816-linux.lists.archive=gmail.com@vger.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 k11-20020a0cf28b000000b0067f97ce2557si3002451qvl.522.2024.01.12.07.42.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 07:42:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24816-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=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=k8nu2ViQ; spf=pass (google.com: domain of linux-kernel+bounces-24816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24816-linux.lists.archive=gmail.com@vger.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 1EEC51C21C72 for ; Fri, 12 Jan 2024 15:42:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CF5A6EB73; Fri, 12 Jan 2024 15:42:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="k8nu2ViQ" Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A730C6A019 for ; Fri, 12 Jan 2024 15:42:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2cca8eb0509so81590911fa.3 for ; Fri, 12 Jan 2024 07:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1705074143; x=1705678943; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AaVw5UCNPa/eBnU3IdbP9nG5gQESTbpoML4+9XQsGiA=; b=k8nu2ViQ6nqFK2cdO51lezAvvzZ+Zd/L6DFLtOMoUlmCC0ra9VpapmyQ6qh6Bml0g2 yZcP+eipX54D9kGoFKPlzEy7ISe4KkItdBlPruLa5CTfdtm+EhG8HJRhoTQmm0mVKN19 nGe+2gnCtOsM/SJDctKuRADj6SweyiJREgq/Jrwum6rdRdRmcGGxXJ40MRt7VtfLadxM WYi3WlQevwSSGmvG0FDssxm5kCD7i0BucBd79BHI3+gh45qiiuuvKCqoiuQGNstqw9gA EJTiRFrqwu8B4Y5og8XVSa2iaIh/no/2+mTh/tYXJrzYjb/vkKWElSQmjkaIR3IG0kXe cfpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705074143; x=1705678943; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AaVw5UCNPa/eBnU3IdbP9nG5gQESTbpoML4+9XQsGiA=; b=D9eQj8tjWP1NO+XrNNfNuSznvtF6ATHnBTOKSn9kjeX/kd73NYqL9fPnpWxSg4iDVY RIfJ6OdLedly/N7I+yRiCdZ5KkcMb5/4jyn3XipmqRDfSswxN0xRjOYqT9lyMUo98ofU /YZZFHCXzcFYfHZB2YC8GIlzAYRe0jzAjpF5nNtxdGU9DvAWJtIzMC2DBHLXBleiGpVa AvW7uHZQGudSCefqVBpNYv518BoNNTRSPpiwBjHNb4hqac1fVxpy5gxpaT3vIct+x0Rf irJoUyPfQ/3yy4X1fqIOIKJoIGCyPKuipXHxkX0a50wTk+QPRdjkDliC8RerfFyknbDt W4Hg== X-Gm-Message-State: AOJu0YzuC0oVEyTv72fnDGiIe+tF0Hcgr14bY5wQ+qnydpwPdc3XKGVC 6N6HwYAGIGMm6a7mf4R6m4mBdNO8cDV2NoLJsS9UWcEhqFCAOw== X-Received: by 2002:a2e:9bd2:0:b0:2cc:db7e:aac2 with SMTP id w18-20020a2e9bd2000000b002ccdb7eaac2mr753538ljj.58.1705074142783; Fri, 12 Jan 2024 07:42:22 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240109-axi-spi-engine-series-3-v1-0-e42c6a986580@baylibre.com> <20240109-axi-spi-engine-series-3-v1-6-e42c6a986580@baylibre.com> <20240112123711.0000422a@Huawei.com> In-Reply-To: <20240112123711.0000422a@Huawei.com> From: David Lechner Date: Fri, 12 Jan 2024 09:42:12 -0600 Message-ID: Subject: Re: [PATCH 06/13] iio: buffer: add hardware triggered buffer support To: Jonathan Cameron Cc: Mark Brown , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Hennerich , =?UTF-8?B?TnVubyBTw6E=?= , Frank Rowand , Thierry Reding , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Jonathan Corbet , linux-spi@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 12, 2024 at 6:37=E2=80=AFAM Jonathan Cameron wrote: > > On Wed, 10 Jan 2024 13:49:47 -0600 > David Lechner wrote: > > > This adds a new mode INDIO_HW_BUFFER_TRIGGERED to the IIO subsystem. > > > > This mode is essentially the hardware version of INDIO_BUFFER_TRIGGERED > > where the trigger has the semantics of INDIO_HARDWARE_TRIGGERED and the > > buffer has the semantics of INDIO_BUFFER_HARDWARE. > > > > So basically INDIO_HW_BUFFER_TRIGGERED is the same as > > INDIO_BUFFER_HARDWARE except that it also enables the trigger when the > > buffer is enabled. > > If the trigger isn't routeable to multiple devices we normally don't > make it visible at all. > > I'm not yet understanding what a trigger actually means in this case. > Why do you need it to be userspace configurable? > > J > It looks like this question was answered in another thread (we need to configure the sampling frequency from userspace). But there you mentioned that adding a trigger for that seemed overkill. So you would you suggest to add the sampling_frequency sysfs attribute to the iio:deviceX instead and just forget about the trigger part? It seems a bit odd to me to have an attribute that may or may not be there depending other hardware external to the ADC chip. But if that is a normal acceptable thing to do, then it does seem like the simpler thing to do.