Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx> --- arch/arm/boards/zii-imx8mq-dev/board.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c index 0be68423d9bf..76d499a37094 100644 --- a/arch/arm/boards/zii-imx8mq-dev/board.c +++ b/arch/arm/boards/zii-imx8mq-dev/board.c @@ -44,7 +44,7 @@ device_initcall(zii_imx8mq_dev_init); static int zii_imx8mq_dev_fixup_egalax_ts(struct device_node *root, void *ctx) { - struct device_node *np; + struct device_node *np, * aliases; /* * The 27" unit has a EETI eGalax touchscreen instead of the @@ -64,6 +64,12 @@ static int zii_imx8mq_dev_fixup_egalax_ts(struct device_node *root, void *ctx) 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; } @@ -109,7 +115,8 @@ static int zii_imx8mq_dev_fixup_deb_internal(void) static int zii_imx8mq_dev_fixup_deb(struct device_node *root, void *ctx) { - struct device_node *np; + struct device_node *np, *aliases; + struct property *pp; /* * In the kernel DT remove all devices from the DEB, which isn't @@ -127,6 +134,16 @@ static int zii_imx8mq_dev_fixup_deb(struct device_node *root, void *ctx) of_device_disable(np); + aliases = of_find_node_by_path_from(root, "/aliases"); + if (!aliases) + return -ENODEV; + + pp = of_find_property(aliases, "ethernet-switch0", NULL); + if (!pp) + return -ENODEV; + + of_delete_property(pp); + return 0; } -- 2.20.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox