From patchwork Mon Mar 29 16:51:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 89016 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2TGqV3F032370 for ; Mon, 29 Mar 2010 16:52:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754738Ab0C2Qwa (ORCPT ); Mon, 29 Mar 2010 12:52:30 -0400 Received: from mail-in-14.arcor-online.net ([151.189.21.54]:37196 "EHLO mail-in-14.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753972Ab0C2Qw2 (ORCPT ); Mon, 29 Mar 2010 12:52:28 -0400 Received: from mail-in-17-z2.arcor-online.net (mail-in-17-z2.arcor-online.net [151.189.8.34]) by mx.arcor.de (Postfix) with ESMTP id 7E1503B6247; Mon, 29 Mar 2010 18:52:27 +0200 (CEST) Received: from mail-in-09.arcor-online.net (mail-in-09.arcor-online.net [151.189.21.49]) by mail-in-17-z2.arcor-online.net (Postfix) with ESMTP id 526F445CDB0; Mon, 29 Mar 2010 18:52:27 +0200 (CEST) Received: from localhost.localdomain (dslb-188-103-199-168.pools.arcor-ip.net [188.103.199.168]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-09.arcor-online.net (Postfix) with ESMTPA id D3DC11AF6C3; Mon, 29 Mar 2010 18:52:26 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-09.arcor-online.net D3DC11AF6C3 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1269881547; bh=CJ3+rq6BtNToO0Z/NJxq6ye+mEPtxfIXERTEh6BR2bk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=LlEMfIPx/LUWxTEQ8KkqYZZ5LTKUkYtwGmOazcle95Sb0ZSEKfapartwMTf1qXh4/ R5rjfvXhdMWme7kdLW6DJu4cfN2Su1zjJvnTR9sfQZv6tnkjBVYDzRvnUXekeuOuUX ccK7PHPymiaOSeDyVDsuQ+7E6a48WAfeNbKQlexk= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, dheitmueller@kernellabs.com, Stefan Ringel Subject: [PATCH 2/3] tm6000: add gpios to board struct Date: Mon, 29 Mar 2010 18:51:11 +0200 Message-Id: <1269881472-28245-2-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1269881472-28245-1-git-send-email-stefan.ringel@arcor.de> References: <1269881472-28245-1-git-send-email-stefan.ringel@arcor.de> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 29 Mar 2010 16:52:31 +0000 (UTC) diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 1710990..ab187c3 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -195,9 +195,16 @@ struct tm6000_board tm6000_boards[] = { .has_dvb = 1, .has_zl10353 = 1, .has_eeprom = 1, + .has_remote = 1, }, .gpio = { .tuner_reset = TM6010_GPIO_2, + .tuner_on = TM6010_GPIO_3, + .demod_reset = TM6010_GPIO_1, + .demod_on = TM6010_GPIO_4, + .power_led = TM6010_GPIO_7, + .dvb_led = TM6010_GPIO_5, + .ir = TM6010_GPIO_0, }, }, [TM6010_BOARD_BEHOLD_WANDER] = { @@ -248,6 +255,12 @@ struct tm6000_board tm6000_boards[] = { }, .gpio = { .tuner_reset = TM6010_GPIO_2, + .tuner_on = TM6010_GPIO_3, + .demod_reset = TM6010_GPIO_1, + .demod_on = TM6010_GPIO_4, + .power_led = TM6010_GPIO_7, + .dvb_led = TM6010_GPIO_5, + .ir = TM6010_GPIO_0, }, }, [TM6010_BOARD_TWINHAN_TU501] = { @@ -265,6 +278,12 @@ struct tm6000_board tm6000_boards[] = { }, .gpio = { .tuner_reset = TM6010_GPIO_2, + .tuner_on = TM6010_GPIO_3, + .demod_reset = TM6010_GPIO_1, + .demod_on = TM6010_GPIO_4, + .power_led = TM6010_GPIO_7, + .dvb_led = TM6010_GPIO_5, + .ir = TM6010_GPIO_0, }, } }; @@ -382,30 +401,30 @@ int tm6000_cards_setup(struct tm6000_core *dev) case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE: case TM6010_BOARD_TWINHAN_TU501: /* Turn xceive 3028 on */ - tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_3, 0x01); + tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->gpio.tuner_on, 0x01); msleep(15); /* Turn zarlink zl10353 on */ - tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_4, 0x00); + tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->gpio.demod_on, 0x00); msleep(15); /* Reset zarlink zl10353 */ - tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_1, 0x00); + tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->gpio.demod_reset, 0x00); msleep(50); - tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_1, 0x01); + tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->gpio.demod_reset, 0x01); msleep(15); /* Turn zarlink zl10353 off */ - tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_4, 0x01); + tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->gpio.demod_on, 0x01); msleep(15); /* ir ? */ - tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_0, 0x01); + tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->gpio.ir, 0x01); msleep(15); /* Power led on (blue) */ - tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_7, 0x00); + tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->gpio.power_led, 0x00); msleep(15); /* DVB led off (orange) */ - tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_5, 0x01); + tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->gpio.dvb_led, 0x01); msleep(15); /* Turn zarlink zl10353 on */ - tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_4, 0x00); + tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->gpio.demod_on, 0x00); msleep(15); break; default: