Skip to contentSkip to conversation

pinctrl: intel: merrifield: Introduce OF device table

PATCH Superseded Andy Shevchenko 2 participants 2 messages Aug 28, 2017 – Sep 21, 2017

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: intel: merrifield: Introduce OF device table

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.

---
 drivers/pinctrl/intel/pinctrl-merrifield.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/pinctrl/intel/pinctrl-merrifield.c +7 -0
index 86c4b3fab7b0..46fe30702a79 100644
@@ -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,
 	},
 };
 
Signature · 1 line
2.14.1
#1 lore raw
Quoted 7 lines · Andy Shevchenko

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 :/

Quoted 4 lines

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

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: [email protected]

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