linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* of_get_named_gpio on non-dt systems
@ 2016-07-29 19:05 Uwe Kleine-König
  0 siblings, 0 replies; only message in thread
From: Uwe Kleine-König @ 2016-07-29 19:05 UTC (permalink / raw)
  To: linux-gpio; +Cc: kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-29 19:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-29 19:05 of_get_named_gpio on non-dt systems Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).