mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] ARM: rdu2: fixup touchscreen alias
Date: Tue, 17 Dec 2019 12:28:16 +0100	[thread overview]
Message-ID: <20191217112816.13305-3-l.stach@pengutronix.de> (raw)
In-Reply-To: <20191217112816.13305-1-l.stach@pengutronix.de>

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 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@gmail.com>
@@ -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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2019-12-17 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 11:28 [PATCH 1/3] RDU2: add support to boot from SD card autonomosly Lucas Stach
2019-12-17 11:28 ` [PATCH 2/3] ARM: rdu2: don't reduce i2c frequency for eGalax touch Lucas Stach
2019-12-17 11:28 ` Lucas Stach [this message]
2019-12-18  7:31 ` [PATCH 1/3] RDU2: add support to boot from SD card autonomosly Sascha Hauer

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=20191217112816.13305-3-l.stach@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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