From d9a5536b70c5d3974538a2120dcc10fa149a8a29 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 17 Jun 2013 17:18:14 +0200 Subject: media: adv7180: add 48-lead and 32-lead device identification Previously only 64-lead and 40-lead models were identified. This patch adds 48-lead and 32-lead device identification as well. Please note that due to missing parameter negotiation functions one might get the following message with a subsequent crash: WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not get parameters on device '/dev/video0' This can be avoided by explicitly specifying the format as follows: gst-launch v4l2src ! deinterlace tff=1 method=4 ! 'video/x-raw-yuv, width=(int)720, height=(int)576, format=(fourcc)I420' ! nv_omx_videomixer ! nv_gl_eglimagesink --- drivers/media/video/adv7180.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/adv7180.c b/drivers/media/video/adv7180.c index a69c8536b07f..8b5c80fb22a7 100644 --- a/drivers/media/video/adv7180.c +++ b/drivers/media/video/adv7180.c @@ -72,7 +72,8 @@ #define ADV7180_STATUS1_AUTOD_SECAM_525 0x70 #define ADV7180_IDENT_REG 0x11 -#define ADV7180_ID_7180 0x1C +#define ADV7180_ID_7180 0x1C /* 64-lead and 40-lead models only */ +#define ADV7180_ID2_7180 0x1E /* 48-lead and 32-lead devices only */ #define ADV7180_ICONF1_ADI 0x40 #define ADV7180_ICONF1_ACTIVE_LOW 0x01 @@ -402,7 +403,7 @@ static __devinit int adv7180_probe(struct i2c_client *client, } ident = i2c_smbus_read_byte_data(client, ADV7180_IDENT_REG); - WARN_ON(ident != ADV7180_ID_7180); + WARN_ON((ident != ADV7180_ID_7180) && (ident != ADV7180_ID2_7180)); v4l_info(client, "ident reg is 0x%02x\n", ident); state->irq = client->irq; -- cgit v1.2.3