From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 9EA7419EEC2 for ; Mon, 27 Oct 2025 14:54:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761576892; cv=none; b=FPvcQp9B58shQgsb/E3h8nMzqniDObkhbB07j6o7DXfNOOkkpvA2waTeJHCGMJf+NzurFdG3DHFNngEZAbpfu4eFy3Wr5k75Uun0U9U2uR9KFoUR+sIUDxl+QdROheKiTfwWp0HnOTDI299ryl87bhAObdVK/v3eSKeVokrVZeU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761576892; c=relaxed/simple; bh=3FWHWFetZy4UIuonaqOW5S7qbAY00gfm4vdAgIDwra8=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=BImVNTHo2HrQx1gefOYoCisZN1FeOezDNKwRoJP432LGeWN0LZK8YKw/QAwNnrFecq6LkjRASjvIns10f64afLVsmnX+stkpLBe/0vEbEI22dPfRM9XlUC7NeY1yWcm0bx99vT5S4RKW8WPNUMUZyrNyB94QXm8LLb/Zl9uxW7g= 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=UihYwL3k; arc=none smtp.client-ip=209.85.128.44 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="UihYwL3k" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-47118259fd8so35810455e9.3 for ; Mon, 27 Oct 2025 07:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761576889; x=1762181689; 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=+a7Kw6HwvdHWgVIAMQBV9GIUz+DeV6/r2H9pvIEbTsc=; b=UihYwL3kIHMdgBeuxm6HFz+RVLsOJjFiRZ8S5BZMIT/IFFTk4xugrfpBnhhHJkFQB8 NcBj3OqvqYLp+xXuZxbiWCxlriFFahau9v1ZZFJoV/LV7BZiAi37fBUYo9MI52XU1VA/ 6n+Um1Gn6ekM04ysXajxbuLxpwmMsMFjzeSpsYobzQcSeT89UDS9XkvEeGHuReP9FQUK Phb2EF0rDFObrxYIZeHxWtuX3+MiMs1qNXxolKT2kHOo5THYDsOc5z/+FZC39pX6FbkP P2LPqaTuarK2zviqWnC29i9P+f3itwh/vGwdNDvrXv8ygmfpmcgui9i5ePHfmKTf43D8 i4cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761576889; x=1762181689; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+a7Kw6HwvdHWgVIAMQBV9GIUz+DeV6/r2H9pvIEbTsc=; b=cdS5VGBmCJttRQpLSRcne6/YxpGn4Qwcojdx4+aWv1FzPuZpkE1v3gUGOt+YwhL6r7 IB4xNN8+PTiY3HGj1MSmx9QeX3rvHbvxCeYJO1V1lCUWw6+KlAW5SprICGLPBZTcvZS4 mLgRvP3PBfmlgXLO3KKIdKz9fK3SPHtXpeTr1STLEa4CklXhLShhQ7J9VSZIbxIV9g2q eaMzrAnP3KjiEgsXpeXVAy2GxNg3v7tnLNacrnFjS0eRHd9w12VMbE1AkpDUG+l7u4Tf YmSVerV/YXhF4sawcd3pXWxlu1mfsz9P1JKxi0Vi9KUv/yfAlpk+MQ7AtCOAVbsixQXV +o0w== X-Forwarded-Encrypted: i=1; AJvYcCWAgDR9ZYNvsc5qBDFu4zyJ500vxuqlZ/isAyNhAP2kMGfPrbojFnle21Mk8BXLg5R8tC8tb78Tavt+@vger.kernel.org X-Gm-Message-State: AOJu0YxIYFHSIzLj5JM99MCJk4ORGvugNJGFSNOyqdB/U6rO2BdejJwd KJf1Yp+19YH0JuovM+k1hdSwo3Fv35HooxTdrktxwKYAVS/N3wvdQhw8As19cA== X-Gm-Gg: ASbGncvwOHsws/yArjbGDtGTuRgL4bRGBhraR0veVnxO7CdfUuLeIRRtG46fxtU9bDT /pGHxvZPtNYoG9hRCtVVz8HI/GIYtcHHIWQaxLFbh0BR4V4B4aIPWyDlQ5iZ0K/Nfg3/8GPvvi/ /YPcxf0gitk2L65Df0lVHwwAOUdcLVXxPnjDNmdg+yeGAL01lUPNZY6qQ/LIV5WQ0HLJ06ytcnt u9iVaqw2B9f/dJSoFlJbB5ei8T2p5WBaIxgSKUPUZAqbVJby79wUpIUblyhg89u1E6eb8OIqnx2 XiUwbRXNk0PIskdyJYibZoxtB5Ip5E0ouO2K90uYDvrntoTnyh79icAxckedi/xAXs5lZKQG1YT dU3DpZ/ItKEVCehbi/fQ0a5WdpzmINJysBpJ+0IPazFTj5PbO9qDC7zN3Lvrqq1YPUrzSdf29/H gBo0GVMjIRu6rA1PJgy7U= X-Google-Smtp-Source: AGHT+IHIkp8fJ+ChBTVARCx5KpqVLzlnAhiTNDeEGgm3dSo10rCw74/XEJnL2Wbcoa+EtdJjRWt0rA== X-Received: by 2002:a05:600c:450a:b0:46e:442c:f5e1 with SMTP id 5b1f17b1804b1-4711791cb1fmr287778345e9.35.1761576888865; Mon, 27 Oct 2025 07:54:48 -0700 (PDT) Received: from [192.168.1.187] ([161.230.67.253]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-475dd05098dsm67472255e9.5.2025.10.27.07.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Oct 2025 07:54:48 -0700 (PDT) Message-ID: <457d739b237bfdcf26361b3e4d5a39398468afd1.camel@gmail.com> Subject: Re: [PATCH v2 2/3] iio: dac: ad5456: Add missing DT compatibles From: Nuno =?ISO-8859-1?Q?S=E1?= To: Jonathan Cameron , Nuno =?ISO-8859-1?Q?S=E1?= Cc: Michael Hennerich , Jonathan Cameron , David Lechner , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Date: Mon, 27 Oct 2025 14:55:22 +0000 In-Reply-To: <20251023181321.00001511@huawei.com> References: <20251023-ad5446-bindings-v2-0-27fab9891e86@analog.com> <20251023-ad5446-bindings-v2-2-27fab9891e86@analog.com> <20251023181321.00001511@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.1 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2025-10-23 at 18:13 +0100, Jonathan Cameron wrote: > On Thu, 23 Oct 2025 14:01:38 +0300 > Nuno S=C3=A1 wrote: >=20 > I'd retitle this to say it's adding explicit DT compatibles >=20 > Missing made me thing one or two were missing rather than it relying > on the fallback path to use the i2c_device_id / spi_device_id paths. >=20 > I'm not particularly keen on only get the drvdata from those other > tables as that's fragile to the two remaining precisely in sync. Until > we fix that better to not add these tables at all. >=20 > The cleanup will need to switch to pointers rather than enum entries > and then use generic fetchers to get those pointers which ever type > of firmware we have. >=20 > Not trivial but also fairly mechanical change to make so I don't > feel too mean asking that you do that as part of this patch series. > If nothing else looking at just this series, someone might think a fallba= ck > compatible would be fine given the differences between parts aren't > visible. >=20 For such an old part I was trying to get away without having to refactor th= at much eheh :). But fair enough, I'll do the above and look for some more obv= ious improvements (like i2c and spi dedicated files). Should also note that I do= n't really have HW with me so I'll really stick to obvious stuff. - Nuno S=C3=A1 >=20 >=20 > > Add missing of_device_id compatibles for the i2c and spi drivers. > >=20 > > Signed-off-by: Nuno S=C3=A1 > > --- > > =C2=A0drivers/iio/dac/ad5446.c | 41 +++++++++++++++++++++++++++++++++++= ++++++ > > =C2=A01 file changed, 41 insertions(+) > >=20 > > diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c > > index ad304b0fec08..b6967f3b9386 100644 > > --- a/drivers/iio/dac/ad5446.c > > +++ b/drivers/iio/dac/ad5446.c > > @@ -445,6 +445,35 @@ static const struct spi_device_id ad5446_spi_ids[]= =3D { > > =C2=A0MODULE_DEVICE_TABLE(spi, ad5446_spi_ids); > > =C2=A0 > > =C2=A0static const struct of_device_id ad5446_of_ids[] =3D { > > + { .compatible =3D "adi,ad5300" }, > > + { .compatible =3D "adi,ad5310" }, > > + { .compatible =3D "adi,ad5320" }, > > + { .compatible =3D "adi,ad5444" }, > > + { .compatible =3D "adi,ad5446" }, > > + { .compatible =3D "adi,ad5450" }, > > + { .compatible =3D "adi,ad5451" }, > > + { .compatible =3D "adi,ad5452" }, > > + { .compatible =3D "adi,ad5453" }, > > + { .compatible =3D "adi,ad5512a" }, > > + { .compatible =3D "adi,ad5541a" }, > > + { .compatible =3D "adi,ad5542a" }, > > + { .compatible =3D "adi,ad5543" }, > > + { .compatible =3D "adi,ad5553" }, > > + { .compatible =3D "adi,ad5600" }, > > + { .compatible =3D "adi,ad5601" }, > > + { .compatible =3D "adi,ad5611" }, > > + { .compatible =3D "adi,ad5621" }, > > + { .compatible =3D "adi,ad5641" }, > > + { .compatible =3D "adi,ad5620-2500" }, > > + { .compatible =3D "adi,ad5620-1250" }, > > + { .compatible =3D "adi,ad5640-2500" }, > > + { .compatible =3D "adi,ad5640-1250" }, > > + { .compatible =3D "adi,ad5660-2500" }, > > + { .compatible =3D "adi,ad5660-1250" }, > > + { .compatible =3D "adi,ad5662" }, > > + { .compatible =3D "ti,dac081s101" }, > > + { .compatible =3D "ti,dac101s101" }, > > + { .compatible =3D "ti,dac121s101" }, > > =C2=A0 { .compatible =3D "ti,dac7512" }, > > =C2=A0 { } > > =C2=A0}; > > @@ -547,9 +576,21 @@ static const struct i2c_device_id ad5446_i2c_ids[]= =3D { > > =C2=A0}; > > =C2=A0MODULE_DEVICE_TABLE(i2c, ad5446_i2c_ids); > > =C2=A0 > > +static const struct of_device_id ad5446_i2c_of_ids[] =3D { > > + { .compatible =3D "adi,ad5301" }, > > + { .compatible =3D "adi,ad5311" }, > > + { .compatible =3D "adi,ad5321" }, > > + { .compatible =3D "adi,ad5602" }, > > + { .compatible =3D "adi,ad5612" }, > > + { .compatible =3D "adi,ad5622" }, > > + { } > > +}; > > +MODULE_DEVICE_TABLE(OF, ad5446_i2c_of_ids); > > + > > =C2=A0static struct i2c_driver ad5446_i2c_driver =3D { > > =C2=A0 .driver =3D { > > =C2=A0 =C2=A0=C2=A0 .name =3D "ad5446", > > + =C2=A0=C2=A0 .of_match_table =3D ad5446_i2c_of_ids, > > =C2=A0 }, > > =C2=A0 .probe =3D ad5446_i2c_probe, > > =C2=A0 .id_table =3D ad5446_i2c_ids, > >=20