From patchwork Wed Aug 22 10:45:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volokh Konstantin X-Patchwork-Id: 1359571 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C5DD840B05 for ; Wed, 22 Aug 2012 06:43:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754847Ab2HVGn3 (ORCPT ); Wed, 22 Aug 2012 02:43:29 -0400 Received: from mail.telros.ru ([83.136.244.21]:52585 "EHLO mail.telros.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754409Ab2HVGnU (ORCPT ); Wed, 22 Aug 2012 02:43:20 -0400 Received: from [172.23.0.104] (helo=VPir.telros.ru) by mail.telros.ru with esmtp id 1T44ev-00068x-Sj ; Wed, 22 Aug 2012 10:43:21 +0400 From: Volokh Konstantin To: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, volokh@telros.ru Cc: Volokh Konstantin Subject: [PATCH 09/10] staging: media: go7007: Adlink_MPG24 board initialization fix. Date: Wed, 22 Aug 2012 14:45:18 +0400 Message-Id: <1345632319-23224-9-git-send-email-volokh84@gmail.com> In-Reply-To: <1345632319-23224-1-git-send-email-volokh84@gmail.com> References: <1345632319-23224-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 setting via gpio i2c bus support at every time then init encoder. Signed-off-by: Volokh Konstantin --- 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;