Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347049
b: refs/heads/master
c: 2d4b452
h: refs/heads/master
i:
  347047: 74bbf7b
v: v3
  • Loading branch information
Sebastien Guiriec authored and Wolfram Sang committed Nov 14, 2012
1 parent ff4927f commit 2f6bf64
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d60ece5f010043422c5fbc3609714c4420c7c9bf
refs/heads/master: 2d4b4520a5eaed6701b0c9f7540c8fd99a26e449
13 changes: 13 additions & 0 deletions trunk/drivers/i2c/busses/i2c-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <linux/slab.h>
#include <linux/i2c-omap.h>
#include <linux/pm_runtime.h>
#include <linux/pinctrl/consumer.h>

/* I2C controller revisions */
#define OMAP_I2C_OMAP1_REV_2 0x20
Expand Down Expand Up @@ -213,6 +214,8 @@ struct omap_i2c_dev {
u16 syscstate;
u16 westate;
u16 errata;

struct pinctrl *pins;
};

static const u8 reg_map_ip_v1[] = {
Expand Down Expand Up @@ -1104,6 +1107,16 @@ omap_i2c_probe(struct platform_device *pdev)
dev->dtrev = pdata->rev;
}

dev->pins = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(dev->pins)) {
if (PTR_ERR(dev->pins) == -EPROBE_DEFER)
return -EPROBE_DEFER;

dev_warn(&pdev->dev, "did not get pins for i2c error: %li\n",
PTR_ERR(dev->pins));
dev->pins = NULL;
}

dev->dev = &pdev->dev;
dev->irq = irq;

Expand Down

0 comments on commit 2f6bf64

Please sign in to comment.