From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932930AbcIENkH convert rfc822-to-8bit (ORCPT ); Mon, 5 Sep 2016 09:40:07 -0400 Received: from smtp-out6.electric.net ([192.162.217.181]:51213 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932541AbcIENkF (ORCPT ); Mon, 5 Sep 2016 09:40:05 -0400 From: David Laight To: "'Randy Li'" , "linux-usb@vger.kernel.org" CC: "felipe.balbi@linux.intel.com" , "John.Youn@synopsys.com" , "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" , "kishon@ti.com" , "randy.li@rock-chips.com" Subject: RE: [PATCH v7 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform Thread-Topic: [PATCH v7 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform Thread-Index: AQHSBi3i6s9qwlHxT0uXqVZu69EOQaBq59IQ Date: Mon, 5 Sep 2016 13:35:56 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DB00F483E@AcuExch.aculab.com> References: <1472939729-15187-1-git-send-email-ayaka@soulik.info> <1472939729-15187-4-git-send-email-ayaka@soulik.info> In-Reply-To: <1472939729-15187-4-git-send-email-ayaka@soulik.info> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Li > Sent: 03 September 2016 22:55 ... > + if (of_device_is_compatible(np, "rockchip,rk3288-usb") > + && (NULL != hsotg->phy->ops->reset)) > + hsotg->phy->ops->reset(hsotg->phy); > + Is this the only place ops->reset() is called? Probably much better to check it first. if (hsotg->phy->ops->reset && of_device_is_compatible(np, "rockchip,rk3288-usb") hsotg->phy->ops->reset(hsotg->phy); David From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Subject: RE: [PATCH v7 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform Date: Mon, 5 Sep 2016 13:35:56 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DB00F483E@AcuExch.aculab.com> References: <1472939729-15187-1-git-send-email-ayaka@soulik.info> <1472939729-15187-4-git-send-email-ayaka@soulik.info> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1472939729-15187-4-git-send-email-ayaka-xPW3/0Ywev/iB9QmIjCX8w@public.gmane.org> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: 'Randy Li' , "linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" Cc: "mark.rutland-5wv7dgnIgG8@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org" , "felipe.balbi-VuQAYsv1563Yd54FQh9/CA@public.gmane.org" , "gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org" , "randy.li-TNX95d0MmH7DzftRWevZcw@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org" , "linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "kishon-l0cyMroinI0@public.gmane.org" List-Id: devicetree@vger.kernel.org From: Randy Li > Sent: 03 September 2016 22:55 ... > + if (of_device_is_compatible(np, "rockchip,rk3288-usb") > + && (NULL != hsotg->phy->ops->reset)) > + hsotg->phy->ops->reset(hsotg->phy); > + Is this the only place ops->reset() is called? Probably much better to check it first. if (hsotg->phy->ops->reset && of_device_is_compatible(np, "rockchip,rk3288-usb") hsotg->phy->ops->reset(hsotg->phy); David