From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v3 1/3] phy: Add exynos-simple-phy driver Date: Thu, 15 May 2014 09:42:04 +0200 Message-ID: <20140515074203.GD5952@ulmo> References: <1400095043-685-1-git-send-email-rahul.sharma@samsung.com> <1400095043-685-2-git-send-email-rahul.sharma@samsung.com> <20140514221423.GC6215@mithrandir> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2004639824==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Rahul Sharma Cc: Tomasz Stanislawski , "devicetree@vger.kernel.org" , linux-samsung-soc , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Kishon Vijay Abraham I , Andrzej Hajda , Kyungmin Park , Rob Herring , Grant Likely , Kukjin Kim , Sylwester Nawrocki , sunil joshi List-Id: devicetree@vger.kernel.org --===============2004639824== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tNQTSEo8WG/FKZ8E" Content-Disposition: inline --tNQTSEo8WG/FKZ8E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 15, 2014 at 10:49:37AM +0530, Rahul Sharma wrote: > Hi Thierry, >=20 > On 15 May 2014 03:44, Thierry Reding wrote: > > On Thu, May 15, 2014 at 12:47:21AM +0530, Rahul Sharma wrote: [...] > >> +#define HDMI_PHY 0 > >> +#define DAC_PHY 1 > >> +#define ADC_PHY 2 > >> +#define PCIE_PHY 3 > >> +#define SATA_PHY 4 > > > > Perhaps these should be namespaced somehow to avoid potential conflicts > > with other PHY providers? >=20 > How about XXX_SIMPLE_PHY? The indices are specific to the Exynos PHY device, so why not PHY_EXYNOS_SIMPLE_XXX (or any variation thereof)? > >> +#define PHY_NR 5 > > > > I'm not sure that this belongs here either. It's not a value that will > > ever appear in a DT source file. >=20 > I want it to grow along with new additions in the phy list else > catastrophic. This will look unrelated in driver. But this is in no way growing automatically as it is. Whoever adds a new type of PHY will need to manually increment this define. Furthermore the driver will need to be updated to cope with this anyway. I think this is even a reason to have this only in the driver. Otherwise you could have a situation where somebody upgrades the binding (and this file along with it) but not update the driver with the necessary support. But the driver will still pick up the PHY_NR change and will accept the new PHY type as valid, even though it has no code to handle it. If you have this in the driver, however, then as long as the driver has not yet been updated it will reject requests for the new PHY type. And that's exactly what it should be doing since it doesn't know how to handle it. Thierry --tNQTSEo8WG/FKZ8E Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTdG/LAAoJEN0jrNd/PrOhxcsP/RdR01ceQtmbqBx/1om+YSe9 0ekVajz9CMbe4n4nc6/TlxLoNJlDQXNoLYrLyj9sNz9K0uZNkjaW0RStKETYtgl2 e0/m0MVRo53rT4iosefV3qsPCBeU1eAwHdCbGrnmb00z+fE+K1rPd+oMqs3ZS05a uFgzt/3s3E9Kg6HdDrGMg7YGj00fSQhw+1otnmLN+t+pP0w6A9Z2mAMhLihXY1FR sB1P9NmYZdwKDdRS5423355hH5eNAE8xXv/EzA/mb+WPLGTtyjlNMxgFzso3bww1 3n9l/ZscwXlq+XjHekZHXra50YlM4J4SBeHbbrArObkTGFWEjzm0pJ8An9hssh1l lMiGeZ61FUplxTtXnYI/0C8alxJGG/1tS3BlPtBL9Wqog1XV0OIQdUByU8APCNzU CVW68BVu8gteKJjtzGTAWHWMq4BDU7vDOqTIhThLnxTtxQAW0H4L4TCZXJ0GdqL2 QFlormg5wW2x8ArSJYc8HlRKr2FbD86mr+FMOZiPh7wIg2L5McvQl4r/fVUF7PID pUemvq9TbH02yvFPuyyV3bcKJjMDcEW5+mJsBqjcbJurM0GuKU1WgTUWSDGRlup5 CUKDbn0iavAosRn8muzQeH+Gy9rA9MFhoY0nG7tmHOV+xMWlr3smSFuxMi6pQBnx sqWv6AENtahVIWeL32ze =vRlj -----END PGP SIGNATURE----- --tNQTSEo8WG/FKZ8E-- --===============2004639824== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============2004639824==--