mfd: Read CUST_ID from the wm8994 device

Read CUST_ID from the device and log it for diagnostics.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Mark Brown
2012-05-07 10:03:22 +01:00
committed by Samuel Ortiz
parent b7b142d9fc
commit cc7a727941
3 changed files with 8 additions and 3 deletions

View File

@@ -57,6 +57,7 @@ struct wm8994 {
enum wm8994_type type;
int revision;
int cust_id;
struct device *dev;
struct regmap *regmap;

View File

@@ -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] */