diff options
-rw-r--r-- | drivers/mfd/wm8994-core.c | 7 | ||||
-rw-r--r-- | include/linux/mfd/wm8994/core.h | 1 | ||||
-rw-r--r-- | include/linux/mfd/wm8994/registers.h | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 9d7ca1e978fa..60e617549edd 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -500,7 +500,8 @@ static __devinit int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
500 | ret); | 500 | ret); |
501 | goto err_enable; | 501 | goto err_enable; |
502 | } | 502 | } |
503 | wm8994->revision = ret; | 503 | wm8994->revision = ret & WM8994_CHIP_REV_MASK; |
504 | wm8994->cust_id = (ret & WM8994_CUST_ID_MASK) >> WM8994_CUST_ID_SHIFT; | ||
504 | 505 | ||
505 | switch (wm8994->type) { | 506 | switch (wm8994->type) { |
506 | case WM8994: | 507 | case WM8994: |
@@ -553,8 +554,8 @@ static __devinit int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
553 | break; | 554 | break; |
554 | } | 555 | } |
555 | 556 | ||
556 | dev_info(wm8994->dev, "%s revision %c\n", devname, | 557 | dev_info(wm8994->dev, "%s revision %c CUST_ID %02x\n", devname, |
557 | 'A' + wm8994->revision); | 558 | 'A' + wm8994->revision, wm8994->cust_id); |
558 | 559 | ||
559 | switch (wm8994->type) { | 560 | switch (wm8994->type) { |
560 | case WM1811: | 561 | case WM1811: |
diff --git a/include/linux/mfd/wm8994/core.h b/include/linux/mfd/wm8994/core.h index 9eff2a351ec5..d41bc7b8a86a 100644 --- a/include/linux/mfd/wm8994/core.h +++ b/include/linux/mfd/wm8994/core.h | |||
@@ -57,6 +57,7 @@ struct wm8994 { | |||
57 | 57 | ||
58 | enum wm8994_type type; | 58 | enum wm8994_type type; |
59 | int revision; | 59 | int revision; |
60 | int cust_id; | ||
60 | 61 | ||
61 | struct device *dev; | 62 | struct device *dev; |
62 | struct regmap *regmap; | 63 | struct regmap *regmap; |
diff --git a/include/linux/mfd/wm8994/registers.h b/include/linux/mfd/wm8994/registers.h index 86e6a032a078..053548961c15 100644 --- a/include/linux/mfd/wm8994/registers.h +++ b/include/linux/mfd/wm8994/registers.h | |||
@@ -2212,6 +2212,9 @@ | |||
2212 | /* | 2212 | /* |
2213 | * R256 (0x100) - Chip Revision | 2213 | * R256 (0x100) - Chip Revision |
2214 | */ | 2214 | */ |
2215 | #define WM8994_CUST_ID_MASK 0xFF00 /* CUST_ID - [15:8] */ | ||
2216 | #define WM8994_CUST_ID_SHIFT 8 /* CUST_ID - [15:8] */ | ||
2217 | #define WM8994_CUST_ID_WIDTH 8 /* CUST_ID - [15:8] */ | ||
2215 | #define WM8994_CHIP_REV_MASK 0x000F /* CHIP_REV - [3:0] */ | 2218 | #define WM8994_CHIP_REV_MASK 0x000F /* CHIP_REV - [3:0] */ |
2216 | #define WM8994_CHIP_REV_SHIFT 0 /* CHIP_REV - [3:0] */ | 2219 | #define WM8994_CHIP_REV_SHIFT 0 /* CHIP_REV - [3:0] */ |
2217 | #define WM8994_CHIP_REV_WIDTH 4 /* CHIP_REV - [3:0] */ | 2220 | #define WM8994_CHIP_REV_WIDTH 4 /* CHIP_REV - [3:0] */ |