diff options
author | Raphaël Poggi <poggi.raph@gmail.com> | 2014-09-08 15:07:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-09-09 08:07:45 +0200 |
commit | 97323085a5c88f7c21b62bac06d41869db59fc57 (patch) | |
tree | 161854a0198f410abaecd979c8ec4ee708c1fbf1 | |
parent | 3546ffe8427a7ff00821deae5a264869cdbef21b (diff) | |
download | barebox-97323085a5c88f7c21b62bac06d41869db59fc57.tar.gz barebox-97323085a5c88f7c21b62bac06d41869db59fc57.tar.xz |
pinctrl: at91: add driver data
This commit adds the driver data for the gpio-at91 driver.
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index e212f7a183..0b5d943c9e 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -606,8 +606,10 @@ static struct gpio_ops at91_gpio_ops = { static struct of_device_id at91_gpio_dt_ids[] = { { .compatible = "atmel,at91rm9200-gpio", + .data = (unsigned long)&at91rm9200_ops, }, { .compatible = "atmel,at91sam9x5-gpio", + .data = (unsigned long)&at91sam9x5_ops, }, { /* sentinel */ }, @@ -624,6 +626,12 @@ static int at91_gpio_probe(struct device_d *dev) at91_gpio = &gpio_chip[alias_idx]; + ret = dev_get_drvdata(dev, (unsigned long *)&at91_gpio->ops); + if (ret) { + dev_err(dev, "dev_get_drvdata failed: %d\n", ret); + return ret; + } + clk = clk_get(dev, NULL); if (IS_ERR(clk)) { ret = PTR_ERR(clk); @@ -662,8 +670,10 @@ static int at91_gpio_probe(struct device_d *dev) static struct platform_device_id at91_gpio_ids[] = { { .name = "at91rm9200-gpio", + .driver_data = (unsigned long)&at91rm9200_ops, }, { .name = "at91sam9x5-gpio", + .driver_data = (unsigned long)&at91sam9x5_ops, }, { /* sentinel */ }, |