From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756588AbcH2Hvj (ORCPT ); Mon, 29 Aug 2016 03:51:39 -0400 Received: from mga04.intel.com ([192.55.52.120]:23126 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756125AbcH2Hvh (ORCPT ); Mon, 29 Aug 2016 03:51:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,595,1464678000"; d="asc'?scan'208";a="872102809" From: Felipe Balbi To: John Youn , Randy Li , John Youn , Randy Li , "linux-usb\@vger.kernel.org" Cc: "mark.rutland\@arm.com" , "devicetree\@vger.kernel.org" , "heiko\@sntech.de" , "gregkh\@linuxfoundation.org" , "linux-kernel\@vger.kernel.org" , "linux-rockchip\@lists.infradead.org" , "robh+dt\@kernel.org" , "eddie.cai\@rock-chips.com" , "kishon\@ti.com" Subject: Re: [RESEND PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform In-Reply-To: References: <4c931176-a09a-546c-d2b6-ea74028c78a2@cogentembedded.com> <1471807905-11323-1-git-send-email-ayaka@soulik.info> <49d2baf7-5f81-fc20-a805-f7a378d67a5e@synopsys.com> <76f0ffdb-a3c6-f1e6-8177-b254ff5badaa@rock-chips.com> User-Agent: Notmuch/0.22.1+63~g994277e (https://notmuchmail.org) Emacs/25.1.1 (x86_64-pc-linux-gnu) Date: Mon, 29 Aug 2016 10:51:15 +0300 Message-ID: <87fupodnd8.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, John Youn writes: [...] >>>> + */ >>>> + if (of_device_is_compatible(np, "rockchip,rk3288-usb")) >>>> + hsotg->phy->ops->reset(hsotg->phy); >>>> + >>> >>> You should probably check for NULL before calling the reset() >>> callback. >> Sure. >>> >>> Also, I'd rather see a generic quirk property that you set for your >>> platform. >>> >>> Something like "phy_reset_on_wakeup_quirk". >> But Rob Herring want me to implied by the SoC specific compatible=20 >> string. I agree with him. It is certainly bug in RK3288 platform. >> It is no found no the other platform. > > Ok, I missed that before. > > Based on the drivers I'm familiar with (like dwc3), you would > typically add a "quirk" anyways. > > Felipe, > > Do you have some policy or preference on this? if it's not a dwc2-generic feature, then let's do it via compatible flag, sure. What we don't want is for things like: if (is_compatible('synopsys') || is_compatible('rockchip') || is_compatible('foobar') ... ) For that, we'd be better of adding a generic quirk flag which several can use. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJXw+lzAAoJEIaOsuA1yqRE4SUP/A3MJ1Yw79yme/0ZA7j6z8Qg qD6RTfAH8MWzWs1WLEEQcrrJxsJqqORE11umYRnUyXryuwD3M+s0cDE/+OF3h/D8 PfgIJHY5eVF69NpPp9XM954ZeKHCvrFVknKcaBDyAO6obFxTRPj+oJ++his1NZml bkzGJBoyjp4Pb9QeuSC8zM1NnPbQ0JZs5aI97QEGPhHySDOhWe/L+J+DY7m1gsU3 ELvLBChwDhCs0azU5hiQ+lHCuZcCiOtygaWr0kKtDxxMWQ4PU2R8gguBRrtYUTEm lGAypkq8okLlsVZRqNa9uyeakh7rua1tM0EhZN+OQcRHUpfWGdvXqhjk4IDkWH4X 5ku06bwjX5AQ13JFF1Rv9uwz9H8clBIR/hbity++2jjGATwZpAwzQnAzpklrw+Ys e4eXgpBMox5AC5+8SaWm/mkXJWq7f7ZTZMKVxcSUXzewaEgZMUVlcwbpS7caMc9s OAN18VqFbggGHZYYRmaekUZGe8TAQcPEne2jFdGKzua9Oq9SpWWkd2TEKWnlF5uc FLY6cQ74LSJeTb5UWXTbaH3Ttr3pg2ZaDfq/w82VDbIBQJBCispTQsZpK6C1er2t Dj57RYgdJe7Z0fkSTvErtwuo6pIqchg2NP5leC2GnT1Uj6QqusaH+mmmlRss6dM4 E4wiVX7oQf2KAArNjjsX =RJOM -----END PGP SIGNATURE----- --=-=-=--