Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752424AbbBKJnH (ORCPT ); Wed, 11 Feb 2015 04:43:07 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:50041 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752092AbbBKJnE (ORCPT ); Wed, 11 Feb 2015 04:43:04 -0500 Date: Wed, 11 Feb 2015 10:42:59 +0100 From: Sascha Hauer To: Lee Jones Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, eddie.huang@mediatek.com, Mark Brown Subject: Re: Recommendations for a new MFD device driver? Message-ID: <20150211094259.GL12209@pengutronix.de> References: <20150206101006.GK12209@pengutronix.de> <20150210072039.GC8020@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150210072039.GC8020@x1> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 10:37:41 up 118 days, 20:51, 163 users, load average: 0.04, 0.08, 0.06 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1790 Lines: 41 On Tue, Feb 10, 2015 at 03:20:39PM +0800, Lee Jones wrote: > On Fri, 06 Feb 2015, Sascha Hauer wrote: > > > Hi All, > > > > We are adding support for a new pretty typical MFD device, the MediaTek > > MT6397. Initial patches are already posted. It's a PMIC which among other > > things has regulators and a RTC. The same RTC is reused on another PMIC, > > but with another register offset and another interrupt. > > > > Now the question is where shall we put the register/irq resource > > information? > > > > 1) Put it into the RTC device driver. > > 2) Put it into the .resource field of struct mfd_cell > > 3) Put it into the device tree using standard reg, interrupt properties and > > a) Let the RTC driver interpret these > > b) Let the MFD driver create resources in the .resource field of struct > > mfd_cell > > c) Let the MFD core create the resources > > I have no problem with 2, if that's the route you'd like to take. Ok, thanks Lee and Mark for the input. I think we should go with option 2 then. While it's convenient to put the resources into the device tree in the first place, it probably becomes cumbersome when Linux gets a different idea how the subdevices of the PMIC should be arranged. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- 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/