From patchwork Wed Jan 16 13:00:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volokh Konstantin X-Patchwork-Id: 1987841 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2D81EDF2A2 for ; Wed, 16 Jan 2013 13:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757262Ab3APNI1 (ORCPT ); Wed, 16 Jan 2013 08:08:27 -0500 Received: from mail-la0-f42.google.com ([209.85.215.42]:53405 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757261Ab3APNI0 (ORCPT ); Wed, 16 Jan 2013 08:08:26 -0500 Received: by mail-la0-f42.google.com with SMTP id fe20so1371189lab.1 for ; Wed, 16 Jan 2013 05:08:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=PjVwx1+YQawAhDo6Vb/BDp5TJk0jnfQpqAydMKZOhh4=; b=Fl9HRBk5/U+kyP0/oJuWCcu/bXRhSJ9apR4viyA6Lv4stGA1FZIAGyJ/te+Tb+mKJR QUcbsnV40YrRVwQys3+K0CceGad0tRg6zRiwoC8CUJWvHjPdSLQ7MNMsWbbr98oiANjc /ikCV0r5DPioHYfZvJz0vaCkWPaewZR0E4YzckywPmVRZe/dmxNvnS8/PQ5DoPqk2KKG QZQzvT/lJjDNBrUkr2DMEvdoO/Zp1S1gdJKRjel+JO52uFgUOduvehwc1CKy1G83beHk zLeEVzvAjk2k/CDqu4NetidQNoZNXAmbA+3xclE6Im1ONr2oDscQYxFME0nPJVDAYv1F TB9g== X-Received: by 10.112.44.229 with SMTP id h5mr644817lbm.12.1358341704635; Wed, 16 Jan 2013 05:08:24 -0800 (PST) Received: from localhost.localdomain (host-24-157-66-217.spbmts.ru. [217.66.157.24]) by mx.google.com with ESMTPS id q4sm919179lbj.15.2013.01.16.05.08.06 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 16 Jan 2013 05:08:23 -0800 (PST) From: Volokh Konstantin To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, gregkh@linuxfoundation.org, volokh84@gmail.com, dhowells@redhat.com, rdunlap@xenotime.net, hans.verkuil@cisco.com, justinmattock@gmail.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] staging: media: go7007: i2c GPIO initialization Reset i2c stuff for GO7007_BOARDID_ADLINK_MPG24 need reset GPIO always when encoder initialize Date: Wed, 16 Jan 2013 17:00:50 +0400 Message-Id: <1358341251-10087-3-git-send-email-volokh84@gmail.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1358341251-10087-1-git-send-email-volokh84@gmail.com> References: <1358341251-10087-1-git-send-email-volokh84@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Volokh Konstantin Reviewed-by: Dan Carpenter --- drivers/staging/media/go7007/go7007-driver.c | 5 +++++ drivers/staging/media/go7007/go7007-usb.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/go7007/go7007-driver.c b/drivers/staging/media/go7007/go7007-driver.c index a66e339..c0ea312 100644 --- a/drivers/staging/media/go7007/go7007-driver.c +++ b/drivers/staging/media/go7007/go7007-driver.c @@ -173,6 +173,11 @@ static int go7007_init_encoder(struct go7007 *go) go7007_write_addr(go, 0x3c82, 0x0001); go7007_write_addr(go, 0x3c80, 0x00fe); } + if (go->board_id == GO7007_BOARDID_ADLINK_MPG24) { + /* set GPIO5 to be an output, currently low */ + go7007_write_addr(go, 0x3c82, 0x0000); + go7007_write_addr(go, 0x3c80, 0x00df); + } return 0; } diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c index a6cad15..9dbf5ec 100644 --- a/drivers/staging/media/go7007/go7007-usb.c +++ b/drivers/staging/media/go7007/go7007-usb.c @@ -1110,9 +1110,6 @@ static int go7007_usb_probe(struct usb_interface *intf, } else { u16 channel; - /* set GPIO5 to be an output, currently low */ - go7007_write_addr(go, 0x3c82, 0x0000); - go7007_write_addr(go, 0x3c80, 0x00df); /* read channel number from GPIO[1:0] */ go7007_read_addr(go, 0x3c81, &channel); channel &= 0x3;