From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>, linux-gpio@vger.kernel.org
Subject: Re: [PATCH v1] gpio: merrifield: Add support of ACPI enabled platforms
Date: Thu, 04 Jan 2018 14:38:39 +0200 [thread overview]
Message-ID: <1515069519.7000.664.camel@linux.intel.com> (raw)
In-Reply-To: <20180104093604.GL27654@lahna.fi.intel.com>
On Thu, 2018-01-04 at 11:36 +0200, Mika Westerberg wrote:
> On Wed, Jan 03, 2018 at 07:32:40PM +0200, Andy Shevchenko wrote:
> > The driver needs the pin control device name for ACPI.
> >
> > We are looking through ACPI namespace and return first found device
> > based on ACPI HID for Intel Merrifield FLIS.
> > +static const struct acpi_device_id mrfld_pinctrl_acpi_ids[] = {
> > + {"INTC1002"},
> > + {}
> > +};
...
> > +static const char *mrfld_acpi_get_pinctrl_dev_name(const char
> > *fallback)
> > +{
> > + const char *pinctrl_dev_name = fallback;
> > +
> > + acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
> > + ACPI_UINT32_MAX,
> > mrfld_acpi_find_pinctrl, NULL,
> > + &pinctrl_dev_name, NULL);
> > + return pinctrl_dev_name;
> > +}
>
> I wonder if there is a better way to "connect" these things without
> need
> to walk ACPI namespace in GPIO drivers?
I would lovely use that if there is any.
> How does DT handle handle
> separated GPIO and pinctrl drivers? Maybe there is a binding that we
> could reuse in ACPI side.
Do they need it?
The problem here is in GPIO <-> pin mapping which requires instance name
of the device to be supplied.
AFAIU (perhaps missed something) in DT pinctrl device directly has this
mapping in the DTS, so, no need to call gpiochip_add_pin_range().
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2018-01-04 12:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 17:32 [PATCH v1] gpio: merrifield: Add support of ACPI enabled platforms Andy Shevchenko
2018-01-04 9:36 ` Mika Westerberg
2018-01-04 12:38 ` Andy Shevchenko [this message]
2018-01-04 16:32 ` 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=1515069519.7000.664.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/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).