linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: Recommendations for a new MFD device driver?
Date: Wed, 11 Feb 2015 10:42:59 +0100	[thread overview]
Message-ID: <20150211094259.GL12209@pengutronix.de> (raw)
In-Reply-To: <20150210072039.GC8020@x1>

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 |

      reply	other threads:[~2015-02-11  9:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 10:10 Recommendations for a new MFD device driver? Sascha Hauer
2015-02-06 11:54 ` Mark Brown
2015-02-06 12:55   ` Yingjoe Chen
2015-02-06 13:52     ` Mark Brown
2015-02-10  7:20 ` Lee Jones
2015-02-11  9:42   ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150211094259.GL12209@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).