[PATCH 3/3] ARM: rdu2: fixup touchscreen alias

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

 



Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
---
 arch/arm/boards/zii-imx6q-rdu2/board.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/zii-imx6q-rdu2/board.c b/arch/arm/boards/zii-imx6q-rdu2/board.c
index c06c5ebd9a7c..d41609bfae8a 100644
--- a/arch/arm/boards/zii-imx6q-rdu2/board.c
+++ b/arch/arm/boards/zii-imx6q-rdu2/board.c
@@ -1,3 +1,4 @@
+
 /*
  * Copyright (C) 2016 Zodiac Inflight Innovation
  * Author: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
@@ -161,7 +162,7 @@ device_initcall(rdu2_devices_init);
 
 static int rdu2_fixup_egalax_ts(struct device_node *root, void *context)
 {
-	struct device_node *np;
+	struct device_node *np, *aliases;
 
 	/*
 	 * The 32" unit has a EETI eGalax touchscreen instead of the
@@ -181,6 +182,12 @@ static int rdu2_fixup_egalax_ts(struct device_node *root, void *context)
 
 	of_device_enable(np);
 
+	aliases = of_find_node_by_path_from(root, "/aliases");
+	if (!aliases)
+		return -ENODEV;
+
+	of_property_write_string(aliases, "touchscreen0", np->full_name);
+
 	return 0;
 }
 
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux