Re: [PATCH v1] gpio: merrifield: Add support of ACPI enabled platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux