linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Shawn Guo <shawn.guo@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v4] pinctrl: qcom: sc8180x: add ACPI probe support
Date: Wed, 10 Mar 2021 10:53:13 -0600	[thread overview]
Message-ID: <YEj5eXKALP43Cf0F@builder.lan> (raw)
In-Reply-To: <YEi3D2fCBh/azOnb@smile.fi.intel.com>

On Wed 10 Mar 06:09 CST 2021, Andy Shevchenko wrote:

> On Wed, Mar 10, 2021 at 07:12:10PM +0800, Shawn Guo wrote:
> > It adds ACPI probe support for pinctrl-sc8180x driver.  We have one
> > problem with ACPI table, i.e. GIO0 (TLMM) block has one single memory
> > resource to cover 3 tiles defined by SC8180X.  To follow the hardware
> > layout of 3 tiles which is already supported DT probe, it adds one
> > function to replace the original single memory resource with 3 named
> > ones for tiles.  With that, We can map memory for ACPI in the same way
> > as DT.
> 
> You are reinventing a wheel, i.e. MFD framework. Can you simple utilize
> devm_mfd_add_devices()?
> 

But wouldn't such driver need to do exactly this, and then set up the
mfd cell and register it? So the new wheel would still be there, just
wrapped in more code?

> Basically you may write an new pure MFD driver (drivers/mfd) that will
> instantiate properly the pin control driver.
> 

In contrast to typical MFDs this would still be a single mfd_cell, just
with different set of resources, derived from the mfd device itself.

Regards,
Bjorn

  reply	other threads:[~2021-03-10 16:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 11:12 [PATCH v4] pinctrl: qcom: sc8180x: add ACPI probe support Shawn Guo
2021-03-10 12:09 ` Andy Shevchenko
2021-03-10 16:53   ` Bjorn Andersson [this message]
2021-03-10 16:59     ` Andy Shevchenko
2021-03-10 19:24 ` Bjorn Andersson
2021-03-11  1:29   ` Shawn Guo

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=YEj5eXKALP43Cf0F@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=shawn.guo@linaro.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).