Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754220Ab3JKKct (ORCPT ); Fri, 11 Oct 2013 06:32:49 -0400 Received: from mail-ie0-f173.google.com ([209.85.223.173]:60923 "EHLO mail-ie0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752182Ab3JKKcq (ORCPT ); Fri, 11 Oct 2013 06:32:46 -0400 MIME-Version: 1.0 In-Reply-To: <5257BD3E.5000707@ti.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> Date: Fri, 11 Oct 2013 12:32:45 +0200 Message-ID: Subject: Re: [PATCH 4/6] pinctrl: single: Add support for wake-up interrupts From: Linus Walleij To: Roger Quadros Cc: Tony Lindgren , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , Grygorii Strashko , "linux-kernel@vger.kernel.org" , Peter Ujfalusi , Prakash Manjunathappa , Haojian Zhuang , =?ISO-8859-1?Q?Beno=EEt_Cousson?= , Linux-OMAP Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1326 Lines: 31 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? 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. Yours, Linus Walleij -- 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/