[v1] pinctrl: intel: merrifield: Introduce OF device table

Message ID 20170828134227.65736-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series
  • [v1] pinctrl: intel: merrifield: Introduce OF device table
Related show

Commit Message

Andy Shevchenko Aug. 28, 2017, 1:42 p.m.
On Intel Merrifield the pin control device is a separate IP block
without any PCI or ACPI ID assigned. We need some means to allow the
device be enumerated in ACPI environment (*).

To achieve this without allocation special ACPI ID, which is really long
and pretty much unachievable procedure, we just re-use special ACPI ID
and standard compatible string.

(*) ACPI is enabled via second bootloader, i.e. U-Boot,
    firmware is still left untouched and being SFI enabled.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-merrifield.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Linus Walleij Sept. 21, 2017, 11:08 a.m. | #1
On Mon, Aug 28, 2017 at 3:42 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> On Intel Merrifield the pin control device is a separate IP block
> without any PCI or ACPI ID assigned. We need some means to allow the
> device be enumerated in ACPI environment (*).
>
> To achieve this without allocation special ACPI ID, which is really long
> and pretty much unachievable procedure, we just re-use special ACPI ID
> and standard compatible string.

Unfortunately device tree has some bureaucracy too :/

> (*) ACPI is enabled via second bootloader, i.e. U-Boot,
>     firmware is still left untouched and being SFI enabled.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

I'm fine with this, please just add the following file:
Documentation/devicetree/bindings/pinctrl/intel.txt

And kind of just list the compatible string in it, with
Cc: devicetree@vger.kernel.org

That is the procedure they have asked me to follow.

Then they need some week to have a chance to look at it.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/pinctrl/intel/pinctrl-merrifield.c b/drivers/pinctrl/intel/pinctrl-merrifield.c
index 86c4b3fab7b0..46fe30702a79 100644
--- a/drivers/pinctrl/intel/pinctrl-merrifield.c
+++ b/drivers/pinctrl/intel/pinctrl-merrifield.c
@@ -931,10 +931,17 @@  static int mrfld_pinctrl_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id mrfld_of_table[] = {
+	{ .compatible = "intel,merrifield-pinctrl" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, mrfld_of_table);
+
 static struct platform_driver mrfld_pinctrl_driver = {
 	.probe = mrfld_pinctrl_probe,
 	.driver = {
 		.name = "pinctrl-merrifield",
+		.of_match_table = mrfld_of_table,
 	},
 };