From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Subject: Re: [PATCH 1/1] gpio: omap: Fix PM runtime issue and remove most BANK_USED macros Date: Wed, 22 Apr 2015 09:20:02 -0500 Message-ID: <20150422142002.GA22596@saruman.tx.rr.com> References: <1429632533-23285-1-git-send-email-tony@atomide.com> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Return-path: Received: from arroyo.ext.ti.com ([192.94.94.40]:36798 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932122AbbDVOVz (ORCPT ); Wed, 22 Apr 2015 10:21:55 -0400 Content-Disposition: inline In-Reply-To: <1429632533-23285-1-git-send-email-tony@atomide.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Tony Lindgren Cc: Linus Walleij , Alexandre Courbot , linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Felipe Balbi , Grygorii Strashko , Javier Martinez Canillas , Nishanth Menon --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 21, 2015 at 09:08:53AM -0700, Tony Lindgren wrote: > Looks like omap_gpio_irq_type can return early at several places > leaving a GPIO bank enabled without doing pm_runtime_put if wrong > GPIO arguments are passed. >=20 > Instead of adding more complicated BANK_USED macros, let's fix the > issue properly. We can pass is_irq flag to omap_enable_gpio_module > and omap_disble_gpio_module. And with that we can remove all the > similar code elsewhere to get rid of most BANK_USED macros. >=20 > Note that the reason for the BANK_USED macro is that we need to manage > PM runtime on per GPIO bank basis. In the long run we want to move to > using PM runtime counts for each GPIO line to determine if a GPIO > bank is used. Once we have a solution for omap_enable_gpio_module > and omap_disable_gpio_module, we can remove the remaining BANK_USED > macros. >=20 > Cc: Felipe Balbi > Cc: Grygorii Strashko > Cc: Javier Martinez Canillas > Cc: Nishanth Menon > Signed-off-by: Tony Lindgren looks ok to my eyes. Reviewed-by: Felipe Balbi --=20 balbi --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVN64SAAoJEIaOsuA1yqRE3f8P/1SK95u0gCkfieFT5CG9wnuh mzXaBs0zLJO9IGuu2vv89CPgGwdtm5q8kv/0WYmwBN9NTkIApMfxyzIZ1Ao8H5aI ZX6uM46yRwrpbaeVsWUn7sB99XJEIz1CDYq4awRl51J2EQlfF2oUfOAzqD4EMOPq XEj2cdBx2yE/gQWFClUY2mxCgqSGQhvHcT5Q8KABE+hMVu21cS6gitZ4ge7X+9EO e0cceLGSVyhOiPUR0Yt6uCcmwLz9Q7+4koCyTvnSPuH8rzcaNV2Mm40gFr0ItFEd RDWoigsGjMSjYsOOkaWN2jKKW8V7VSchodefgD8HoLjej5LfsxdCs1yJFbSVr6sX LWqf1fZMJyMrtHtl4pN5yHrKU4usFQIQYpbdLksON9U3LmYWE2WPZMJ3U0cZZ0fn yw3t0u+UXbqRLDNofVgcbQs17Zvb0qlWfWGtFyjV/cmpc8bsnf1Ov/ERBdhEpA8w yJ7g3Oy22tyPynGDno82Bdp4bxvtxMsuTJTTgkREkdH3Btsl0Yf0qqm1rBzaND0S Stuy4R1qA7YFBrXNRryI3ymNPZvqFvD+YYBQsQU67c11Lp0gTpgmNq5qxmnb9vGh aldWn2u8tIY4691OglEnLG6rMBa/7LkmcwS26oVOryOMwoy7C651kEm9Hjw5Qk2+ B0Lgv8qDJpZ00knko7k6 =4tDk -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: balbi@ti.com (Felipe Balbi) Date: Wed, 22 Apr 2015 09:20:02 -0500 Subject: [PATCH 1/1] gpio: omap: Fix PM runtime issue and remove most BANK_USED macros In-Reply-To: <1429632533-23285-1-git-send-email-tony@atomide.com> References: <1429632533-23285-1-git-send-email-tony@atomide.com> Message-ID: <20150422142002.GA22596@saruman.tx.rr.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Apr 21, 2015 at 09:08:53AM -0700, Tony Lindgren wrote: > Looks like omap_gpio_irq_type can return early at several places > leaving a GPIO bank enabled without doing pm_runtime_put if wrong > GPIO arguments are passed. > > Instead of adding more complicated BANK_USED macros, let's fix the > issue properly. We can pass is_irq flag to omap_enable_gpio_module > and omap_disble_gpio_module. And with that we can remove all the > similar code elsewhere to get rid of most BANK_USED macros. > > Note that the reason for the BANK_USED macro is that we need to manage > PM runtime on per GPIO bank basis. In the long run we want to move to > using PM runtime counts for each GPIO line to determine if a GPIO > bank is used. Once we have a solution for omap_enable_gpio_module > and omap_disable_gpio_module, we can remove the remaining BANK_USED > macros. > > Cc: Felipe Balbi > Cc: Grygorii Strashko > Cc: Javier Martinez Canillas > Cc: Nishanth Menon > Signed-off-by: Tony Lindgren looks ok to my eyes. Reviewed-by: Felipe Balbi -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: