From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 57D37500945 for ; Sun, 18 Jan 2026 09:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768728004; cv=none; b=DtdSshn9WFyqcWvr/7jHXEbxrLk6Ku70FXMD5rTEQLJi+TRdmrbwRd3dDsTWaRnDTw3/FI9YTqYCDotz6EWUtn57lkmBcH/Z/2/xDGPQL2kQJHy0NuSZyH2wKAOWDqU5qWrQn3RwupNTsfetH0j/2Vo+P3RfJqLPSnv/Qr8IHRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768728004; c=relaxed/simple; bh=2+oBlpG5mVJXNdT53ppAPxtTD1bVFIcRQaXuzEyQKos=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=UakDHfkmrIM4BxlHbCBtfSe3u4JpfOBwGfR1alRZfh8Ui2ZXekFnrw9o+7npJXHDZtDIB5PkKL1R9tz+0KjlcAbFdkkILCuwBv894RiP+WxES0z8KGlIvXYmhz6+ttIU/e0NFvaidySvt1IoQvUORM/zOru00mTPB3s/UEf8FMg= 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=DxzwUK9T; arc=none smtp.client-ip=209.85.221.46 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="DxzwUK9T" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-42fb2314f52so1745033f8f.0 for ; Sun, 18 Jan 2026 01:20:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768728002; x=1769332802; 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=2+oBlpG5mVJXNdT53ppAPxtTD1bVFIcRQaXuzEyQKos=; b=DxzwUK9T/AEtYmqFxsN5cTQ2ALpcBxu2EnoKPXzum1nbpgAH9kd4LVxW0ZthW79+x4 Ns4vyZ/Bojs5J79X0SjWtYERAd74sCzdSzEtByQwX2Z/e1sje+OHZS/sjBFDkZV1EvP1 0YKia/kOahKJSit/rCaW3f5ipsVgRnJh7xV5WwpQLX9tJGMab0LmUMCUju3GzShVUGQt Aq8GCtC7+WgDjnaFy+U40XTfuIQJsrDg/OwJplNfYyNIEYjvYY+jsrZhVKZcZIYNPxL2 Ci3reulCWJwaiZ0tUURQY9Uuu84w6/BSBLCpzZU948GuUeWuSj2iNX6HdKhYDNmoPPIA LY5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768728002; x=1769332802; 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=2+oBlpG5mVJXNdT53ppAPxtTD1bVFIcRQaXuzEyQKos=; b=nvk93888SsbClc/bk044Sdj0r+MQ59AUcoNh834QdComWLZLBgi8CVzcAakhPAFO3N klab+MaUkvW593sZtJvjMdUZ8hS7P/1l4xdjHeebAxR7CPAuiu29ZHP2JdKX7am2bTeq lpm8zZyB8UXOsLTxhPGHvtvjWfOXWxdw0ZpZrnI8ixwSUqQLQ65dzsAILjn6lkdcOuhN KVQoleYwiGDHPsxaR84RXYWzn3kA4khkkryWJN4/3cfs9uyFR0sVwkkLjRiD2I9qU77I O1SUTdCBxuroRz5jW3uGiZ0VQm6VQQ8tlyp5hUN+Tn2ZgPoHknaj12Bayq24Gkp7VtkW h3bQ== X-Forwarded-Encrypted: i=1; AJvYcCVe5liTvdZfZI+M8BmRJk+TXLYZJncq8bs8mEdk5jqT3t4f4E6aCAIaY21+KZyLbJQ9Z2BpG3kbGesfOTA=@vger.kernel.org X-Gm-Message-State: AOJu0YxGCzfksrpMgqADjNImceRW7t/j8r0UMPYdp4jFRfanm3VjuEBO 3c8g4vZZygl0V9NMGDGt4VueZBt9+ysJdSCZ/DIThnYSBXX7mKl5YaJC X-Gm-Gg: AY/fxX5VKuti9cT18m6GNxp0ZomypK0nnzSuUxoRRcXH1Afia/whKlj01B/o1rpkBhb iZT+LIgSAG7hmsVsdUJp8WhUxJllHbBu2X4oJ5kyORk4bPnrFoReO9ps2yGsXHXhR2+5Y2F8Flg lXhpxVv9fsyFfqWf/JBDb5DQgkBejSAFXUvjp+QYGn5gb53+q1TZ719DxMaaAsKyOWf7DhczC+e V/9WJLTX1A3aht9rlehPQRM8DIFaFtHaDDoyK/RFJpuX2UW2vWvfYD/QVA3hPJ73mSW6LO78gOy V860h1SB2ZiQgYXTSKwoc5MQdwWLcu4L9YfRfyGuU7yzqlYvWW7RttescgStN8QWB88uo1U2A/Y HA8MjXh7leIQsgoqLQJq4HJHcT9eCmFxJyHxN5hra06NaswaEobakC4lX3iRrq7syaKc2c7rWPi Yuln3jEw8FCwWOyfeVh+kVf1PDCINR7iyYDGb4yJ2h4xUgyWm9OOAVYG97/gY= X-Received: by 2002:a05:6000:4026:b0:432:c39d:102d with SMTP id ffacd0b85a97d-43569919c94mr8503587f8f.0.1768728001370; Sun, 18 Jan 2026 01:20:01 -0800 (PST) Received: from ?IPv6:2001:818:ea56:d000:94c4:fb0e:28f:2a8d? ([2001:818:ea56:d000:94c4:fb0e:28f:2a8d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356992681esm15890096f8f.11.2026.01.18.01.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 01:20:00 -0800 (PST) Message-ID: Subject: Re: [PATCH v3 0/4] iio: adc: ad9467: Support alternative backends From: Nuno =?ISO-8859-1?Q?S=E1?= To: Jonathan Cameron Cc: Tomas Melin , Michael Hennerich , Nuno Sa , Lars-Peter Clausen , David Lechner , Andy Shevchenko , Olivier Moysan , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 18 Jan 2026 09:21:05 +0000 In-Reply-To: <20260116183724.18063cec@jic23-huawei> 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> <931160a27cfcfbf55d75bf9662442988c266343f.camel@gmail.com> <20260116183724.18063cec@jic23-huawei> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2026-01-16 at 18:37 +0000, Jonathan Cameron wrote: > On Fri, 16 Jan 2026 13:31:39 +0000 > Nuno S=C3=A1 wrote: >=20 > > 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:=C2=A0=20 > > > > On Wed, 2026-01-14 at 17:32 +0200, Tomas Melin wrote:=C2=A0=20 > > > > > Hi Nuno, > > > > >=20 > > > > > On 14/01/2026 15:32, Nuno S=C3=A1 wrote:=C2=A0=20 > > > =C2=A0=20 > > > > > >=20 > > > > > > But more importantly, how are your usecase supposed to work wit= h this > > > > > > series? I'm not seeing any new backend being added as part of t= he series. > > > > > > Point is, if we are adding all of this, I would expect your use= case to > > > > > > have fully upstream support. If I'm not missing nothing, we wou= ld at > > > > > > least > > > > > > need a dummy backend providing stubs for enable()/disable()=C2= =A0=20 > > > > > 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 ent= ity > > > > > that can take on the role of being backend, rather than adding a = dummy > > > > > backend. Adding the capabilities are defining role here, as havin= g that=C2=A0=20 > > > >=20 > > > > Well, I would argue your backend is exactly that. A dummy one :)=C2= =A0=20 > > >=20 > > > It's kindof ;)=C2=A0 But on general level it handles the stuff a back= end > > > needs to do, just does not have most of the operations or capabilitie= s > > > available. OTOH having the backend defined means that if some of the > > > capabilites would be added, there is a natural place to add it. > > > =C2=A0=20 > >=20 > > But there's nothing you can control from Linux right? > >=20 > > > > =C2=A0=20 > > > > > allows for customer integrations with backends that differ but ar= e of no > > > > > interest for the mainline. > > > > > =C2=A0=20 > > > >=20 > > > > It would still be nice to have this usecase fully supported upstrea= m=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 e= xist. But > > > > if it > > > > is something the kernel does not control we get a dummy one with ve= ry limited > > > > functionality/stubs. If you call regulator_get_optional(), then the= regulator > > > > is > > > > really optional and might not physically exist. Seems very similar = to what > > > > you have.=C2=A0=20 > > >=20 > > > There could perhaps be use for a backend like this too. Is the idea s= uch > > > that one would still need to define a "iio-backend-simple" node or su= ch > > > to device tree which would then provide the backend link and compatib= le? > > > =C2=A0=20 > >=20 > > My idea would be to automatically define one if we fail to find it. Nat= urally if > > we > > ever add an optional() get the dummy could not be added. See how regula= tor_get() > > handles it. That's basically what I have in mind. > >=20 > It's an interesting idea, but I'd like some input from DT folk on this. > The fake regulators thing is kind of legacy from lots of drivers gaining = the > power handling later and it being boring / too late to add all the fixed = regs > to DT.=C2=A0 This is a much less common case and I find it a little unlik= ely there > is nothing useful to know about where the data is going - so how useful > is an autocreated backend? >=20 Not really that useful. This was just something I thought of to have the fu= ll usecase supported in Linux. But, if we can add an explicit fixed/dummy (whatever na= me fits best) backend with a proper compatible that would be preferable, yes. - Nuno S=C3=A1