Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758394Ab3JKPn7 (ORCPT ); Fri, 11 Oct 2013 11:43:59 -0400 Received: from mho-03-ewr.mailhop.org ([204.13.248.66]:35101 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754792Ab3JKPn5 (ORCPT ); Fri, 11 Oct 2013 11:43:57 -0400 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 50.131.214.131 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18pMT2mo+dA5PjOphmd7iOX Date: Fri, 11 Oct 2013 08:43:53 -0700 From: Tony Lindgren To: Linus Walleij Cc: Roger Quadros , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , Grygorii Strashko , "linux-kernel@vger.kernel.org" , Peter Ujfalusi , Prakash Manjunathappa , Haojian Zhuang , =?utf-8?Q?Beno=C3=AEt?= Cousson , Linux-OMAP Subject: Re: [PATCH 4/6] pinctrl: single: Add support for wake-up interrupts Message-ID: <20131011154352.GO29913@atomide.com> References: <20131003054104.8941.88857.stgit@localhost> <20131003054221.8941.87801.stgit@localhost> <5256AA7F.8030005@ti.com> <20131010160018.GA29913@atomide.com> <20131010162015.GC29913@atomide.com> <5257BD3E.5000707@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1801 Lines: 42 * Linus Walleij [131011 03:40]: > On Fri, Oct 11, 2013 at 10:56 AM, Roger Quadros wrote: > > > The register handling is fine. But how do we deal with resource handling? > > e.g. the block that has the deep-core registers might need to be clocked or powered > > before the registers can be accessed. > > Yeah I saw this in the code there. > > In this case it seems syscon-type regmap access can be used to > read/write the registers, so maybe the pin controller also need to > get a handle on some clock etc? Uhh, let's not go there.. The resource availability needs to be handled transparently in regmap code and the reg provider hardware module driver using runtime PM. > The general idea is however that large monolitic "drivers" for a > certain IO-range such as arch/arm/mach-omap2/prm3xxx.c > doesn't scale - we saw this with the Ux500 PRCMU driver in > mfd/* to the point that our patches to extend it were NACK:ed > until we refactor it. This stuff in mach-omap2 is in the same bad > design pattern, and need to get out of it. > > The approach chosen for the Ux500 PRCMU was to distribute > out the driver into the places where it's actually used, like the > clock driver etc. The accessor functions to do some stuff over > in the PRCMU was just adding a layer of cruft. Yes I'm all in favor of having a minimal PRM core driver that manages resources and provides register access services in a controlled way to it's client drivers. As long as the emphasis is "in a controlled way". Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/