From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752596AbcHKSZM (ORCPT ); Thu, 11 Aug 2016 14:25:12 -0400 Received: from muru.com ([72.249.23.125]:45330 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbcHKSZK convert rfc822-to-8bit (ORCPT ); Thu, 11 Aug 2016 14:25:10 -0400 Date: Thu, 11 Aug 2016 11:25:06 -0700 From: Tony Lindgren To: Andreas Kemnade Cc: Discussions about the Letux Kernel , Linux USB Mailing List , LKML , Greg Kroah-Hartman , linux-omap , Bin Liu Subject: Re: [Letux-kernel] [PATCH v2] musb: omap2430: do not assume balanced enable()/disable() Message-ID: <20160811182506.GN28140@atomide.com> References: <1470238731-32358-1-git-send-email-andreas@kemnade.info> <20160804142919.GG28140@atomide.com> <20160804183129.2e0cac71@aktux> <20160804184402.73963e8a@aktux> <20160805135501.GJ28140@atomide.com> <20160805172039.6dac0aeb@aktux> <20160806062134.GK28140@atomide.com> <20160809073559.287d0a59@aktux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20160809073559.287d0a59@aktux> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andreas Kemnade [160808 22:36]: > Calls to musb_platform_enable() occur at only 1 place. > musb_platform_disable() is called at 4 places. > > about balancing: > There is musb_start() and musb_stop(). They are called from > musb_gadget_start/stop() > These call musb_platform_enable() and musb_platform_disable(). > Looks ok. > > There is musb_suspend() and musb_resume(): > > musb_suspend() calls musb_platform_disable() > musb_resume() calls musb_plaform_enable() via musb_start() > looks balanced but why don't we use musb_stop() in musb_suspend()? Hmm let's try adding musb_stop() to musb_suspend() too. > Now the odd things: > musb_platform_disable() in musb_remove() called upon module removal > musb_platform_disable() in musb_init_controller() called from > musb_probe() > > This looks clearly unbalanced. Sure would be nice to get those balanced. I think the only reason why musb_platform_disable() is called is to disable interrupts. Care to post a patch and let's see what happens? I can now easily test the PM with musb. Regards, TOny