Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752622AbbBFLyd (ORCPT ); Fri, 6 Feb 2015 06:54:33 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:53018 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbbBFLyb (ORCPT ); Fri, 6 Feb 2015 06:54:31 -0500 Date: Fri, 6 Feb 2015 11:54:18 +0000 From: Mark Brown To: Sascha Hauer Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, eddie.huang@mediatek.com, Lee Jones Message-ID: <20150206115418.GV21293@sirena.org.uk> References: <20150206101006.GK12209@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FIpBojRBCUhZnPnV" Content-Disposition: inline In-Reply-To: <20150206101006.GK12209@pengutronix.de> X-Cookie: My LESLIE GORE record is BROKEN ... User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: Recommendations for a new MFD device driver? X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2089 Lines: 51 --FIpBojRBCUhZnPnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Feb 06, 2015 at 11:10:06AM +0100, Sascha Hauer wrote: > 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 a tendency to 3, but I'm afraid that the resource informations > are duplicated too much in the device tree source files, because every > user would have to carry a full description of the mfd device. Maybe > that duplication could be reduced with some CPP magic, I don't know. > Maybe this is a solved problem and I'm just not picking a good example > from drivers/mfd. The wm831x drivers take option 2 but are pre-DT, it still seems the most sensible thing to me though - no need for the user to have to repeat this information in every DT and easy to add new stuff if we need it. You could use a .dtsi like we use for SoCs to reduce the duplication required if you do decide to put things in the DT. --FIpBojRBCUhZnPnV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU1KtpAAoJECTWi3JdVIfQ/40H/22vPQCoi47imO04n7TCFDy8 0L3oftZ79CxxBaJ+TWif7uBDWWAEhT4yFAKppaDPugL6FLzZYVLYF1YvxeLWTIBX 7qzS/5RQNyYEw3P9WaNRP1ajHz6+LVBQMuRnMzWktVkFqQEGoPXGr1+CAFpCDxxf 5+TWd6/+4TxLkx5ZKIYEGrNUQGuWKr07BTIXHNQ84WbxhNR1mID4HAmD9JG8xXry fLnnsV9dZsr30GExOnh5AWM1uWB1Xgjiu3W+RDsFjS5eRBLQahE4EKSKrt/pSOA1 F9idIM6ZN5Qyp1okGSrMl/L5TkvaiXSM93/k+vW2kDjyx9WNbrY/PT6/feqKPhk= =1R/R -----END PGP SIGNATURE----- --FIpBojRBCUhZnPnV-- -- 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/