From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbcIMFgC (ORCPT ); Tue, 13 Sep 2016 01:36:02 -0400 Received: from mga04.intel.com ([192.55.52.120]:62693 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750734AbcIMFgB (ORCPT ); Tue, 13 Sep 2016 01:36:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,327,1470726000"; d="asc'?scan'208";a="1039056693" From: Felipe Balbi To: Guenter Roeck Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Question about suspend/resume clock handling in dwc3-of-simple.c In-Reply-To: <20160912194349.GA14284@roeck-us.net> References: <20160912185629.GA25929@roeck-us.net> <87wpihaqhv.fsf@linux.intel.com> <20160912194349.GA14284@roeck-us.net> User-Agent: Notmuch/0.22.1+63~g994277e (https://notmuchmail.org) Emacs/25.1.3 (x86_64-pc-linux-gnu) Date: Tue, 13 Sep 2016 08:35:16 +0300 Message-ID: <87bmzsl5uz.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, Guenter Roeck writes: >> > Should it be clk_disable_unprepare(), or maybe something like the >> > following >> > >> > if (!pm_runtime_status_suspended(dev)) >> > clk_disable_unprepare(); >> > else >> > clk_unprepare(); >>=20 >> I'm not sure how balanced those calls are, yeah. I don't have HW to test >> PM with. But note that as it is, there is no actual runtime PM support, >> so clk_disable_unprepare() will always be necessary. >>=20 >> Perhaps we will find further issues when someone tries to use runtime PM >> with dwc3-of-simple. ;-) >>=20 > > We are working on code derived from it, so unless I can convince the auth= or > that he can not just use clk_unprepare() I suspect we'll hit the problem. > If so, I'll let you know. Are you sending that upstream? Depending on your requirements, it might be easier to patch dwc3-of-simple.c then adding yet another glue layer :-) =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJX15AUAAoJEMy+uJnhGpkGQPkP/3wDHWBHf6z3zbQR/ncTqRqk 06i6So4rg6qidwdjDXO57gwIemaglRdj0BfCVVSTa8K13C4xKUC8xB2l+JeQ3liy wq/x3qCLlEkicu6RDo4CvInPQz50/O+V+4SymikTDp3wv4KJbLRxWEHQvJ7HWyTc EJwQtYuNviQiGvaqGNZ5mOARIv3EVDmpd1PvL1djQUjp+vhnitF/VawJaopXMvxZ YQPJimIzWU4G2vk6VVD8XihyhlKdnTta3MQEPjXZ4DhSBJnx7tu/NMM406eMGrz+ VPRRsgcf2+WzogN2FjYJJb8BbT6VVpu9YVFRzbTX0raHGIUhuFjsoAKdP/6Sa+ws vDLeNMqde+7iI8Auz32SfKGOPafgTiu+BlYSk+Ydn/B1uHoUi1N3XSVoRqAU5CMv Fb4Z2jpAAKXGlDIm6BWmBsi6a2R7eGq7iEDdf5m/N7iE75ZWoKMKCCaQEXvkbka8 a6wdo1Gbo3Wr1cOKqCwx/vphP6qJu6lHhbXl6EfJEsWsQ7JoxX0YUqzYocimKq9L kSFmpXiSCsvEEOQL8o/pOQlgBKgR2kZ5PXE9p3hByU2ArZbhjd190L281uWZ0DaP bFTxlNcr4Ge43PFtc10WXO/oG3PlOWEdlo/jc3nAarEzQwtrcgfXQFTWwnz4GOnL f4b743qX1wfJOMBqzv3G =o2Gm -----END PGP SIGNATURE----- --=-=-=--