of_get_named_gpio on non-dt systems
Hello,
I have a non-dt i.MX35 system here using 4.6.4-rt and it oopses when the i2c-imx driver is loaded. That happes because i2c_imx_init_recovery_info calls:
rinfo->sda_gpio = of_get_named_gpio(pdev->dev.of_node, "sda-gpios", 0);
with pdev->dev.of_node == NULL. In this end this stumbles over:
pr_debug("%s: can't parse '%s' property of node '%s[%d]'\n",
__func__, propname, np->full_name, index);in of_get_named_gpiod_flags() because np == pdev->dev.of_node.
For now I disabled CONFIG_DEBUG_GPIO but this obviously isn't the right fix.
My question now is: is it allowed to call of_get_named_gpio with np=NULL? Depending on the answer to this question either i2c-imx or of_get_named_gpiod_flags should be fixed.
Best regards
Uwe
Signature · 6 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html