of_get_named_gpio on non-dt systems

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

 



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

-- 
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux