From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754144AbaIXRxK (ORCPT ); Wed, 24 Sep 2014 13:53:10 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:40715 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752763AbaIXRxH (ORCPT ); Wed, 24 Sep 2014 13:53:07 -0400 Date: Wed, 24 Sep 2014 19:53:02 +0200 From: Pavel Machek To: Krzysztof Kozlowski Cc: Russell King , Dan Williams , Vinod Koul , linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, Ulf Hansson , Grant Likely , Lars-Peter Clausen , Michal Simek , "Rafael J. Wysocki" , Len Brown , Randy Dunlap , Alan Stern , linux-doc@vger.kernel.org, linux-pm@vger.kernel.org, Kyungmin Park , Marek Szyprowski , Bartlomiej Zolnierkiewicz Subject: Re: [PATCH v7 1/5] PM / Runtime: Add getter for quering the IRQ safe option Message-ID: <20140924175302.GB1231@amd> References: <1411566612-32277-1-git-send-email-k.kozlowski@samsung.com> <1411566612-32277-2-git-send-email-k.kozlowski@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1411566612-32277-2-git-send-email-k.kozlowski@samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2014-09-24 15:50:08, Krzysztof Kozlowski wrote: > Add a simple getter pm_runtime_is_irq_safe() for quering whether runtime > PM IRQ safe was set or not. > > Various bus drivers implementing runtime PM may use choose to suspend > differently based on IRQ safeness status of child driver (e.g. do not > unprepare the clock if IRQ safe is not set). > > Signed-off-by: Krzysztof Kozlowski > Reviewed-by: Ulf Hansson Are you sure this is good interface? "Tell me if another function works this or that way". That's certainly not traditional interface, and it seems dangerous to me. Callbacks now have different semantic requirements based on value of some flag... Would it be possible to have two sets of callbacks, one irq safe and one not? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html