From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 5AC12199920 for ; Mon, 2 Feb 2026 12:39:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770035985; cv=none; b=Lg9zqaI2m9RGBOlno5nj7lD2egxui3keBVEYMr7H2Iydl9/XHovZ0TfARk2gJT0FA2BWv+8ywhjSQs/qSPplO5f+aZB3xP3amqPYxHfe80rXLjxzjJnUILAhsfFfnaBUOt64NcL2ashW9DjJyZl7bX9y+cR8sZ0Ib3BCWJN9dLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770035985; c=relaxed/simple; bh=SzpSp+VXA4zWBS9DbIosMysHlaQ8gZEAIvX5KtIuql0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=o2MtrtxDVv0utFy7s9qX9rDmX4XAr/iB3YZcjgLLx2bgJpGB2h9g0bxqajDBV8yc9U80VBd2IrIzh0Cq5n52sP8DfEEDul/6+Kqj7WlUXoC7QxltTouGOvQz+/q8HE3XIkVguPCGuMf45eUsnY4TCYcOG51WLkV7qpkzMhmYNtw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Fa5Me3WT; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fa5Me3WT" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-47ee0291921so41507525e9.3 for ; Mon, 02 Feb 2026 04:39:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770035983; x=1770640783; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=U63mIoeeyh89+/QbADYp0nSmnUBKi2a+w9TzrwbveTE=; b=Fa5Me3WT3eqEl5quuS6p3j9HY8N5CKR3mMxY874vZYkYH/4w9YshLN639wSFLELVPe Aglvsa4D6EswLSAqd79Mx3Lb/r6x+QQKXRYshcu+c/xoV3IqmIDq2/QroGrUMR3LR2vJ e1xfrLpKz3I2Is+BXj9qrTb66dfVxtLHd00XMy+pAIRzAIcZ0H3dDSpnxc4AcQaqWmaz AuZH8Zvb65IOgsR57PoYOd814vlAd5RaJemNIKLZp5TuS8Aee+iumaWaV29BFlP6yuk9 1tXi62hYud7dARX5mwi276yaS6OeDfs0QbskR+GI9wUZUAJDXgDb7GC0uKuD9quqWSy4 PcCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770035983; x=1770640783; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=U63mIoeeyh89+/QbADYp0nSmnUBKi2a+w9TzrwbveTE=; b=nvWS1Th+wKMSxy26cu/fEeopUbcXwYRAXHqUKr66xeFwZMwZ7u+AlmPkQY0+AJrGwf CBvpyBqPpHDh+4L3wr5bVGw/5C4TVYajzaUwwOv07OwzBYSaKbuUPsmWTYWQvS/ZPNcM +4vmjPdnv15fUKVCeX9Q2umUcLT9vhNDk5xwXPyiwaUhiwcUw4n5XJjHU/GdSHJWzFRi /UkgT+/RuFGeGXWfa5cdm0//zCEmugLK+Ks7hjHdbCvwvCHPbupApYEt+Z0T3zHaIErv CRVohUnjwQgjpx0UAJImKON0i7Mv4Q6z424B3UDqemfdKj4A/qPIjj/KWPOLVp3XRl0C hSAw== X-Forwarded-Encrypted: i=1; AJvYcCXWV2pS933uGHn6Yq9HWCRxZS6GbZohc/SEgqk3vbEL4XFAYAW7oBAAARJE8LMJzsbtmPSJoyRp1QOBGhE=@vger.kernel.org X-Gm-Message-State: AOJu0YwgUIqV1EWSUQ9M6EuoC6A3QC2PIPivNZ0lxUrA8SStA2zQZQEY 6UZg5W+weaqh9tCPwhiHaQClXuMVK6wPqiu7VxM3+4MdW7w+q2zylsqB X-Gm-Gg: AZuq6aIQcgZqaIRXOQXIJZB7avOPIrx/C2jK0BYhdbW3HkR8nYX6Op1qiYcsbTh0Ucr o8L0XfFxAlbBahrAP8RTHR2/9QyQhp0Bdslyr8Ey04lRGqdpJyKMKlW6YqaHcRpVcpFhM3TIrnz S/C2NkxjgC3rHHvltDWAgNTQVPJjXsLxR8pEfHmt7P4iLXA9BP8Q5O7CJfS4qrtPoIK60q4/+QX qVMCvXPiFSj4zQ5Yd33ye8YPE5AOn3zPHbQ+KUfGlhaWATbI6WqY2gOm+RgctDTuful14Wh2kDg yLaZVW+NMruZ1Q5DcxFoogqelcMrjq7cKbiq80T09gcbj1eB9P7Jll2y7YKmw0TAJAn4b3340Uw uT1CphHosgwt3Grnrj9nFqQ+UWAzoTE+6VKGU9UtHbkRpnyoWLyiI4k60GhWDuiVaro+kcqK/O2 zuj1Gm1fAYNEmSMd4GDN0= X-Received: by 2002:a05:600c:198f:b0:477:54f9:6ac2 with SMTP id 5b1f17b1804b1-482db444e56mr141922565e9.0.1770035982458; Mon, 02 Feb 2026 04:39:42 -0800 (PST) Received: from [192.168.1.187] ([148.63.225.166]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e10e490esm43778493f8f.9.2026.02.02.04.39.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 04:39:42 -0800 (PST) Message-ID: <177d62446d9c2098bbfe8b0f7fd9418d5afb60fc.camel@gmail.com> Subject: Re: [PATCH v5 1/4] iio: industrialio-backend: support backend capabilities From: Nuno =?ISO-8859-1?Q?S=E1?= To: Tomas Melin , David Lechner , Michael Hennerich , Nuno Sa , Lars-Peter Clausen , Jonathan Cameron , Andy Shevchenko , Olivier Moysan Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 02 Feb 2026 12:40:24 +0000 In-Reply-To: <30cf63eb-50ba-445d-a78b-d6532aacdc8e@vaisala.com> References: <20260130-b4-ad9467-optional-backend-v5-0-7da803ba7326@vaisala.com> <20260130-b4-ad9467-optional-backend-v5-1-7da803ba7326@vaisala.com> <688cbfb1-0944-492a-929d-91ebb9ab22fb@baylibre.com> <812a8c408c2e3a87ebe1ddc983acdc2cebe3b36b.camel@gmail.com> <30cf63eb-50ba-445d-a78b-d6532aacdc8e@vaisala.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2026-02-02 at 13:08 +0200, Tomas Melin wrote: > Hi, >=20 > On 02/02/2026 12:28, Nuno S=C3=A1 wrote: > > On Sat, 2026-01-31 at 14:30 -0600, David Lechner wrote: >=20 > > >=20 > > > Do we actually need this one? Alternative could be, for example: > > >=20 > > > int iio_backend_enable(struct iio_backend *back) > > > { > > > int ret; > > >=20 > > > ret =3D iio_backend_op_call(back, enable); > > > =09 > > > return ret =3D=3D -EOPNOTSUPP ? 0 : ret; > > > } > >=20 > > I would prefer not to assume we can ignore the backend not supporting > > the call. It opens up the question for other operations. > >=20 > > My preferred way for this kind of fundamental operation (enabling/disab= ling) > > would be to check with DT maintainers if we could have some kind of fix= ed-backend > > (fixed in the sense the HW is present but not controlled by Linux) dumm= y device that > > with implement a no-OP enable/disable(). >=20 > There is also use cases for the always_on cap with a configurable > non-dummy backend. Some applications are such that the driver should > leave the enabling/disabling up to the user space consuming the data. > For this case it's great to have the frontend leave the backend enable > alone using this capability. >=20 I would argue the above would be something to take care at the frontend lev= el. The way I see it, the always_on cap is pretty much saying that we can't really cont= rol the on/off state of the backing device and we just assume it's on.=C2=A0 If we can control it but we need it always on (for some specific usecase), = I would say that should be handled at the frontend and just enable the backend once. Also note that= as of now, I think all of the users (or most at least) we have just enable the backend during prob= e and leave it on until we unbind the device. - Nuno S=C3=A1