Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308710
b: refs/heads/master
c: cc7a727
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed May 7, 2012
1 parent 2c0771d commit fbdb2aa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b7b142d9fc056e98e6fdef82dca3e87067517340
refs/heads/master: cc7a727941193e3e59be2e9f6522eb78bc7ee909
7 changes: 4 additions & 3 deletions trunk/drivers/mfd/wm8994-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ static __devinit int wm8994_device_init(struct wm8994 *wm8994, int irq)
ret);
goto err_enable;
}
wm8994->revision = ret;
wm8994->revision = ret & WM8994_CHIP_REV_MASK;
wm8994->cust_id = (ret & WM8994_CUST_ID_MASK) >> WM8994_CUST_ID_SHIFT;

switch (wm8994->type) {
case WM8994:
Expand Down Expand Up @@ -553,8 +554,8 @@ static __devinit int wm8994_device_init(struct wm8994 *wm8994, int irq)
break;
}

dev_info(wm8994->dev, "%s revision %c\n", devname,
'A' + wm8994->revision);
dev_info(wm8994->dev, "%s revision %c CUST_ID %02x\n", devname,
'A' + wm8994->revision, wm8994->cust_id);

switch (wm8994->type) {
case WM1811:
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mfd/wm8994/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct wm8994 {

enum wm8994_type type;
int revision;
int cust_id;

struct device *dev;
struct regmap *regmap;
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/mfd/wm8994/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -2212,6 +2212,9 @@
/*
* R256 (0x100) - Chip Revision
*/
#define WM8994_CUST_ID_MASK 0xFF00 /* CUST_ID - [15:8] */
#define WM8994_CUST_ID_SHIFT 8 /* CUST_ID - [15:8] */
#define WM8994_CUST_ID_WIDTH 8 /* CUST_ID - [15:8] */
#define WM8994_CHIP_REV_MASK 0x000F /* CHIP_REV - [3:0] */
#define WM8994_CHIP_REV_SHIFT 0 /* CHIP_REV - [3:0] */
#define WM8994_CHIP_REV_WIDTH 4 /* CHIP_REV - [3:0] */
Expand Down

0 comments on commit fbdb2aa

Please sign in to comment.