@@ -83,7 +83,8 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id,
gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources),
- &gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config), NULL);
+ &gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config),
+ gpmc_cfg->of_node);
if (!pdev) {
pr_err("Unable to register platform device\n");
gpio_free(gpmc_cfg->gpio_reset);
@@ -107,6 +108,8 @@ int gpmc_smsc911x_init_dt(struct device_node *node)
if (WARN_ON(!node))
return -ENODEV;
+ gpmc_cfg.of_node = node;
+
if (of_property_read_u32(node, "gpmc,cs", &gpmc_cfg.cs)) {
pr_err("Unable to get GPMC smsc911x chip select\n");
return -EINVAL;
@@ -19,6 +19,7 @@ struct omap_smsc911x_platform_data {
int gpio_irq;
int gpio_reset;
u32 flags;
+ struct device_node *of_node;
};
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
The smsc911x driver needs the GPMC smsc911x associated device node to set the OMAP mux pins using the pinctrl framework. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> --- arch/arm/mach-omap2/gpmc-smsc911x.c | 5 ++++- arch/arm/mach-omap2/gpmc-smsc911x.h | 1 + 2 files changed, 5 insertions(+), 1 deletions(-)