Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753540AbbBMQBh (ORCPT ); Fri, 13 Feb 2015 11:01:37 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:46361 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753127AbbBMQBg (ORCPT ); Fri, 13 Feb 2015 11:01:36 -0500 Date: Fri, 13 Feb 2015 10:01:23 -0600 From: Felipe Balbi To: Heikki Krogerus CC: David Cohen , Felipe Balbi , Greg Kroah-Hartman , Baolu Lu , , , Kishon Vijay Abraham I Subject: Re: [PATCH 8/8] phy: add driver for TI TUSB1210 ULPI PHY Message-ID: <20150213160123.GC22238@saruman.tx.rr.com> Reply-To: References: <1422025978-178336-1-git-send-email-heikki.krogerus@linux.intel.com> <1422025978-178336-9-git-send-email-heikki.krogerus@linux.intel.com> <20150213015242.GD21337@psi-dev26.jf.intel.com> <20150213123516.GB27695@kuha.fi.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+nBD6E3TurpgldQp" Content-Disposition: inline In-Reply-To: <20150213123516.GB27695@kuha.fi.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3745 Lines: 95 --+nBD6E3TurpgldQp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 13, 2015 at 02:35:16PM +0200, Heikki Krogerus wrote: > Hi, >=20 > On Thu, Feb 12, 2015 at 05:52:42PM -0800, David Cohen wrote: > > Hi Heikki, > >=20 > > Sorry I am starting a new branch on this thread. > > I need to go back to another topic on this same patch. > >=20 > > On Fri, Jan 23, 2015 at 05:12:58PM +0200, Heikki Krogerus wrote: > > > TUSB1210 ULPI PHY has vendor specific register for eye > > > diagram tuning. On some platforms the system firmware has > > > set optimized value to it. In order to not loose the > > > optimized value, the driver stores it during probe and > > > restores it every time the PHY is powered back on. > > >=20 > > > Signed-off-by: Heikki Krogerus > > > Cc: Kishon Vijay Abraham I > > > --- > >=20 > > [snip] > >=20 > > > + /* Store initial eye diagram optimisation value */ > > > + ret =3D ulpi_read(ulpi, TUSB1210_VENDOR_SPECIFIC2); > >=20 > > We can't rely on eye diagram optimization value here. It's possible the > > phy went through reset (e.g. module unloading/loading). > > We need a more consistent method. Could we use _DSD instead? That would > > be more compatible with DT too. >=20 > I'm don't have any problem with getting the value from a property. > Sounds like the correct thing to do. Are you thinking about putting > that _DSD method to the ACPI device object for the dwc3? The correct > place would probable be separate device object for the PHY, but if we > do that we need to consider how that object is bound to the ulpi > device. There are few ways we can do that, so it requires some > thinking. >=20 > In any case this driver we can already implement so that it expects to > get the value from property. We just need the name for it. >=20 > The register has actually separate fields for High speed output > impedance configuration and High speed output driver strength > configuration for eye diagram tuning, plus control bit for DP/DM swap. >=20 > Maybe we should actually get them from three separate properties: >=20 > device_property_read_u8(dev, "datapolarity", &val); > ... > device_property_read_u8(dev, "zhsdrv", &val); > ... > device_property_read_u8(dev, "ihstx", &val); > ... >=20 > What do you think? it's probably better to pass each value and let the driver calculate the register contents like this. --=20 balbi --+nBD6E3TurpgldQp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU3h/TAAoJEIaOsuA1yqRE+JcP/RenUi7mUy7somBMebnhTheF 9WAwpwtRzrWuJRv9y8vjNnf7HELhFEYnlAAj8X2d3zHkJ1wog6q+yR5uxCOFev2G YpIjPgYjCONlwQWm5bVHl//mtmCBm1tD1LQptLoQCIkmoR+APqN5VvG0A1dk2EaB 3lfKY5f6xpKexYwIgXvAY2St+gwYE3u2W2id0HHUjAhnOQCDs6e1GjmKS6x31udt C5uycL8T+Q63+OVmZrIa0n2klSFqswqD/3HPmrg15YTvP7HeT5PV8DTO34xbvw1p LJ7k53gltti4LpXTd0/BFgKmoihM80klbn63Kwl9hNJRss31JSHhKAJR5Fih47J2 kr6gBprCughK5g137Hyw4jLBEryIMKEGQY76sfbFsq/qYWYiE/2475QL1dCw0Y50 Sff2PP3B6hQ7ZWi1fotrY0ILzGChyVBl19jRCoTlfiV+ly2OyIUFFKz3759JYJGn 18sqxGR+AHRHWvEqs9brD2CrOtAThcFqcbZxukXDtxcXfwMtxJv4rGy5Ie+J6Edg Csl0yhxR9n4uWMgPvOMsnkzY0Hr44rIvT/GmuUvfyTpi8AvMMWZO2oGRDU+ar+f9 ToAKg31HUt7vOgxZZvdsHGoQnSPVBpvPi5o5dZXeLz6xAxCYjCwyVPAKw32ZnccC QWZPUSUR4mxDRfFH56gD =V/pR -----END PGP SIGNATURE----- --+nBD6E3TurpgldQp-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/