mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mfd: Add support for Merrifield Basin Cove PMIC
Date: Wed, 26 Jun 2019 14:10:43 +0300	[thread overview]
Message-ID: <20190626111043.GJ9224@smile.fi.intel.com> (raw)
In-Reply-To: <20190626101727.GN21119@dell>

On Wed, Jun 26, 2019 at 11:17:27AM +0100, Lee Jones wrote:
> On Wed, 26 Jun 2019, Andy Shevchenko wrote:
> > On Mon, Jun 24, 2019 at 05:13:48PM +0100, Lee Jones wrote:
> > > On Wed, 12 Jun 2019, Andy Shevchenko wrote:

> > > > Add an MFD driver for Intel Merrifield Basin Cove PMIC.

> > > > +	for (i = 0; i < ARRAY_SIZE(irq_level2_resources); i++) {
> > > > +		ret = platform_get_irq(pdev, i);
> > > 
> > > If you already know the order, define the children's device IDs in the
> > > parent's shared header ('intel_soc_pmic_mrfld.h'?) and retreive them
> > > like:
> > > 
> > >   platform_get_irq(pdev->parent, <SUITABLE_DEFINED_ID>);
> > > 
> > > Then you can skip all of this platform device -> platform device hoop
> > > jumping.
> > 
> > The idea of MFD is to get children to be parent agnostic
> > (at least to some extent). What you are proposing here
> > seems like disadvantage from MFD philosophy. No?
> 
> Not at all.  The idea of MFD is to split up support for monolithic h/w
> such that they can be handled properly by their appropriate
> subsystems, and by extension, maintained by the associated subject
> matter experts.
> 
> Children are often aware of their parents (some siblings are even
> aware of each other!), and many expect and depend on the data-sets
> provided by their parents.

Yes, that's true and that's why I put wording "to some extent" above.

> For instance (this example may come to bite me in the behind, but),
> taken from this very patch, where is this consumed?
> 
>  platform_set_drvdata(pdev, pmic);

Yes. It's used in children. BUT. This structure covers several PMIC chips and
the children driver doesn't know which generation / version of PMIC is serving.

What you are proposing with the change is to strictly link the children driver
to PMIC gen X ver Y, while above example doesn't do that.

So, I'm not convinced it's a good change to have.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2019-06-26 11:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 10:19 Andy Shevchenko
2019-06-24 16:13 ` Lee Jones
2019-06-26  9:26   ` Andy Shevchenko
2019-06-26 10:17     ` Lee Jones
2019-06-26 11:10       ` Andy Shevchenko [this message]
2019-06-27 13:44         ` Lee Jones
2019-07-04 13:54           ` Andy Shevchenko

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=20190626111043.GJ9224@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®