diff options
author | Per Persson <per.xb.persson@stericsson.com> | 2011-09-29 08:25:07 +0200 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-09-30 13:45:02 +0200 |
commit | 71c7c1a28ed2c99ff0437bba374ca8cf4dc2c4cc (patch) | |
tree | 4b92ec8add8ada1fc80cc64e6ec6f3b094df3c31 /drivers/video/av8100 | |
parent | 46144729b375850c24820ad96fcb90113b40db7b (diff) |
video: av8100: Debug new chip version
New chip cut version 3.0 is detected.
ST-Ericsson ID: 364509
ST-Ericsson Linux next: Not tested
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ieee8066728ff57d244c349bc470d743196c372a7
Signed-off-by: Per Persson <per.xb.persson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32432
Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com>
Diffstat (limited to 'drivers/video/av8100')
-rw-r--r-- | drivers/video/av8100/av8100.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/video/av8100/av8100.c b/drivers/video/av8100/av8100.c index 106f6c3fb31..4b3fee2ff3c 100644 --- a/drivers/video/av8100/av8100.c +++ b/drivers/video/av8100/av8100.c @@ -36,7 +36,11 @@ #include <linux/firmware.h> #define AV8100_FW_FILENAME "av8100.fw" - +#define CUT_STR_0 "2.1" +#define CUT_STR_1 "2.2" +#define CUT_STR_3 "2.3" +#define CUT_STR_30 "3.0" +#define CUT_STR_UNKNOWN "" #define AV8100_DEVNR_DEFAULT 0 /* Interrupts */ @@ -2517,6 +2521,8 @@ int av8100_download_firmware(enum interface_type if_type) release_firmware(fw_file); if (adev->chip_version != 1) { + char *cut_str; + /* Get cut version */ retval = read_single_byte(i2c, AV8100_CUTVER_OFFSET, &val); if (retval) { @@ -2525,19 +2531,23 @@ int av8100_download_firmware(enum interface_type if_type) } switch (val) { - case 0: - dev_dbg(adev->dev, "Cut ver 0 (2.1)\n"); + case 0x00: + cut_str = CUT_STR_0; + break; + case 0x01: + cut_str = CUT_STR_1; break; - case 1: - dev_dbg(adev->dev, "Cut ver 1 (2.2)\n"); + case 0x03: + cut_str = CUT_STR_3; break; - case 3: - dev_dbg(adev->dev, "Cut ver 3 (2.3)\n"); + case 0x30: + cut_str = CUT_STR_30; break; default: - dev_dbg(adev->dev, "Cut ver %d\n", val); + cut_str = CUT_STR_UNKNOWN; break; } + dev_dbg(adev->dev, "Cut ver %d %s\n", val, cut_str); } av8100_set_state(adev, AV8100_OPMODE_IDLE); |