From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 7043323EA86 for ; Fri, 16 Jan 2026 13:30:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768570259; cv=none; b=ffCRRYNaWtUHzxFdENYpywqlqId9rjEwQZwVHXY0ICSSPmAVO7NI16M0qFi4Nz9sW4wWIam7+x6T3OWGG0G1IP2RcJSu8TJfxoapRRJPvQXgUsNj5jVgs250C5T2iEwsxzOsdFH8XXLdNoN/eCK/NOikoci9P9ooNkZXGGhByP4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768570259; c=relaxed/simple; bh=Wr+L2zSKge+HUINYV3ElAKBUZ5nbNXnnN0RicZ/LmsM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=H2WWeOp13sD8EE3DBDd1S+oXaKxahOj0kSr3mgADOZl8qyA84vnGBF7mLrY4erbQ4QfvB3Syb6MV5EOs1EqAwj7XoyUXj+3jfNsGZjcv/A90JwAG8+eT3Am009K+GxfvjcO+zmdC/7Odwt2J62L6uXctmmkRgtdG8Dp35CmK9BE= 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=QI0eeAE2; arc=none smtp.client-ip=209.85.221.42 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="QI0eeAE2" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-42fbad1fa90so1841819f8f.0 for ; Fri, 16 Jan 2026 05:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768570257; x=1769175057; 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=Wr+L2zSKge+HUINYV3ElAKBUZ5nbNXnnN0RicZ/LmsM=; b=QI0eeAE2jEbsSIJowRsgLEROcmkLGQ2v+3uw/8EWZqd9ep+bMRseem9Ny6mjGJs63w lsJEF+ySuMjWWgaylSon34NzcBTOA7pfR17bMDwzMGOn2+HfHxUmv73bOPs1KyKDSS6x +6xzrL4ftpIzgTejXk5oKcV1RUndXyIQ/31DZtdfhRcTHINMtycCtl3Fl+mePUlHzaWc XVAb4Vx/H86cpJswJ+8tznHQxn5mXSv/pRfvb+s0b0mcvwOWAAG3RO0Ie7jYWw1wvoYi eQPF6GGEZXe7+Dt4YjtLhRhaTKQwjW8N7CGoG7Fio22oFY90l712HXPrESR9rD7ERvNU Qx6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768570257; x=1769175057; 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=Wr+L2zSKge+HUINYV3ElAKBUZ5nbNXnnN0RicZ/LmsM=; b=gOB/1ADIwq0NuSYiX9eEc8fnuHOENriW56uCkrY0lDrJllGmw7NW9+au8Jni12ZDlZ 8XgErojMqiV42cxl1rjoJp388CzZi+BenuAzDkLeHlaMcQgyc6kT4URq6kKBS2Efggs3 67tbApAcnU4IW/ezrnhRb97TRhLaWNr/j4iawEAxDzWThj0hksjUQt8VaqGYBmFCRtmW DOn2+B6mVWusWc4QXatluU5lu6geIcDZktbR5IRCsNgn8SnvsLRhDXsDtqsTvHGaBOpv j6SqwBMGsnWDHZR/Gw2w36Ut4XCWTMAlxd5ycF8ZqShqXtQP+gmjPBnXImuQnVnYw5Mv zLZQ== X-Forwarded-Encrypted: i=1; AJvYcCV3KWJs22ZOBbN5Km3XrsW+UyALuVRv1wB60DUCLdt1xOtlD+ZU50j9WMoPYixSRRYrly89g9LOzHsC02A=@vger.kernel.org X-Gm-Message-State: AOJu0YyPJCWT68sHl4dNoR4fKrZOVJOUeRoMuawDMfcelKd5IjQflTEB vl/n/NvRHYM5mbDx4Z7MlUAub6MY/odvmS49bgZL4pJuBmffSzZzIb2v X-Gm-Gg: AY/fxX5NDaUDzPdX2+wXYKOZ4luWxZomYw92U2a/SlO3KdWcaIaIvn6aUvffrIP0Cnk 3F+Hwb47Cs78/Tq7BTh1oytgduw/nuBu5vzMgLUCBcLfB8uQ1khY+4phJ+uZmX8XexWQW1RG/SI 0pu8ShrwJBshrzbzSZ7O0uTjTO6n8QU6TJ9h60/kuslsI1TMLxNuhGorAAXYdJd7mhNIWOrcXIN rfJWiriKPbln/MBnP+atEQo4WlxAmKCJAiK4UnR0gt+OKhRuMXbj2SzEh7EvN9fs/jyaFmzqlck fYIWkYnqPLTQva19d0WI2OIh4ixmUvcESE8odI1PhsDuOhtH3V1FKIFECjAmbwXjm8nWv++f0zU G1Q7jNBx+uM8c4IK2iPINom8b6HpbPKqTx/r3d9xqC9Pz/xYLnVjceIqU/6klSZxL7O5Mg19hrT qq+Xq2WkhiGIbA28WpsPk= X-Received: by 2002:a05:6000:240e:b0:433:1d30:461 with SMTP id ffacd0b85a97d-43569bc4837mr3480939f8f.32.1768570256414; Fri, 16 Jan 2026 05:30:56 -0800 (PST) Received: from [192.168.1.187] ([161.230.67.253]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43569997f41sm5025335f8f.38.2026.01.16.05.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jan 2026 05:30:56 -0800 (PST) Message-ID: <931160a27cfcfbf55d75bf9662442988c266343f.camel@gmail.com> Subject: Re: [PATCH v3 0/4] iio: adc: ad9467: Support alternative backends From: Nuno =?ISO-8859-1?Q?S=E1?= To: Tomas Melin , Michael Hennerich , Nuno Sa , Lars-Peter Clausen , Jonathan Cameron , David Lechner , Andy Shevchenko , Olivier Moysan Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 16 Jan 2026 13:31:39 +0000 In-Reply-To: <41cac06c-8db2-4a52-854f-659606d89121@vaisala.com> References: <20260114-b4-ad9467-optional-backend-v3-0-d2c84979d010@vaisala.com> <0ad12e16e3fffb4b72a460d7f2b2e627a781b93b.camel@gmail.com> <7ac7033a-2273-4556-a605-1ea0200665a9@vaisala.com> <5896ab55e0d23d235908f9f592c8a7975428dc54.camel@gmail.com> <41cac06c-8db2-4a52-854f-659606d89121@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 Thu, 2026-01-15 at 15:30 +0200, Tomas Melin wrote: > Hi, >=20 > On 15/01/2026 14:04, Nuno S=C3=A1 wrote: > > On Wed, 2026-01-14 at 17:32 +0200, Tomas Melin wrote: > > > Hi Nuno, > > >=20 > > > On 14/01/2026 15:32, Nuno S=C3=A1 wrote: >=20 > > > >=20 > > > > But more importantly, how are your usecase supposed to work with th= is > > > > series? I'm not seeing any new backend being added as part of the s= eries. > > > > Point is, if we are adding all of this, I would expect your usecase= to > > > > have fully upstream support. If I'm not missing nothing, we would a= t least > > > > need a dummy backend providing stubs for enable()/disable() > > > My usecase adds simplistic backend support and registers to the > > > framework via an related driver. So that use case works with that > > > approach. I think it is better to assume there is always some entity > > > that can take on the role of being backend, rather than adding a dumm= y > > > backend. Adding the capabilities are defining role here, as having th= at > >=20 > > Well, I would argue your backend is exactly that. A dummy one :) >=20 > It's kindof ;)=C2=A0 But on general level it handles the stuff a backend > needs to do, just does not have most of the operations or capabilities > available. OTOH having the backend defined means that if some of the > capabilites would be added, there is a natural place to add it. >=20 But there's nothing you can control from Linux right? > >=20 > > > allows for customer integrations with backends that differ but are of= no > > > interest for the mainline. > > >=20 > >=20 > > It would still be nice to have this usecase fully supported upstream=C2= =A0 > > (having a black box backend).=C2=A0 > >=20 > > What I have in mind would be really to do the same as regulators do. If= you call > > regulator_get() then the consumer really assumes a regulator must exist= . But if it > > is something the kernel does not control we get a dummy one with very l= imited > > functionality/stubs. If you call regulator_get_optional(), then the reg= ulator is > > really optional and might not physically exist. Seems very similar to w= hat you have. >=20 > There could perhaps be use for a backend like this too. Is the idea such > that one would still need to define a "iio-backend-simple" node or such > to device tree which would then provide the backend link and compatible? >=20 My idea would be to automatically define one if we fail to find it. Natural= ly if we ever add an optional() get the dummy could not be added. See how regulator_= get() handles it. That's basically what I have in mind. - Nuno S=C3=A1