[PATCHv6] mtd: gpio-nand: add device tree bindings

Artem Bityutskiy dedekind1 at gmail.com
Sat Oct 15 00:48:20 EST 2011


On Wed, 2011-10-12 at 00:10 +0100, Jamie Iles wrote:
> +#ifdef CONFIG_OF
> +static const struct of_device_id gpio_nand_id_table[] = {
> +	{ .compatible = "gpio-control-nand" },
> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, gpio_nand_id_table);
...
> +#else /* CONFIG_OF */
...
> +#endif /* CONFIG_OF */

I wonder, why it is either OF of platform data? What if I want my kernel
to fall-back to platform data if device tree data is absent? What is the
general policy? Sorry, I am not very well aware of the DT stuff. But off
the top of my head, it is logical when things go like this: I have a
kernel with working platform data, but I can change that dynamically by
feeding it a device tree configuration. Hmm?

-- 
Best Regards,
Artem Bityutskiy



More information about the devicetree-discuss mailing list