From patchwork Wed Feb 22 14:13:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9586907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 10E80602A7 for ; Wed, 22 Feb 2017 14:17:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07B5828645 for ; Wed, 22 Feb 2017 14:17:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0211286A1; Wed, 22 Feb 2017 14:17:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 73EE128645 for ; Wed, 22 Feb 2017 14:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=zzmqDfXLIfS1iSoc8BHWCR2flOBj+TvpoX1DsuKQuT0=; b=AwlHIKfldEJUcsT/wn4gENP1mH LEQevJ/d1yLK8kKt2cT6VE5r6HoP+h7QcKXA3orIo1tnjDDEOn7QNmNxTr2Zv6d18ROg82vT3WZs2 /IY6wvvC/nddGclC+ciwbr2xMLH46Uj3SQFkWr6T6Eu3tZbyr78k8Flv191KOFqHyYb0N13e2o63x 7dLHHAs0rwnudd0SjjV9NQcIhd0HGKxStj+G5Tg+FV/eliS+A3adjxRyREKFEorqT6xaHKCaweqMt JFCfcImr3tnXbYy6mncvEPT3he/nHB1Y7knDwoOO9uYVmBaX4lxcA/O9bRh+B7HbasBpB6gGsPBGV QOZmi6Pw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cgXjn-0004iy-VG; Wed, 22 Feb 2017 14:17:47 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cgXgA-0000pf-8a for linux-arm-kernel@lists.infradead.org; Wed, 22 Feb 2017 14:14:06 +0000 Received: by mail-wm0-x22a.google.com with SMTP id i186so11590282wmf.1 for ; Wed, 22 Feb 2017 06:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ouY5CUPx/iWqZ1u0sC+Jj8HZGsfygaiWBdp69oK668U=; b=aGxVDNr8miGV6fub4sqtmxVWQ68lcTpt3gWr9Vj3B7dg7/fDz21rCUBfjJksBy/jqk UL0KDTV35EflbRW3LEucyodP/f3t+qoOz4wH0pQrAvh9twxinyQvR1OuPH/fT5KdhmDv pSRmklo71ZlBfxJtRQJBq1O4ejWlef3qzgsv+RyF/CGs58gs9d2kH6sOCNnkUoh+jX7e bAqayGntXe2aBjWhLoWSBNvdp/GjF8pZEDmbTc3smQah0bVOm2W+rew2GjArysA2I4e+ GDsACtfiis1jctx28/bH8uFwEuHfG+viFLTYVYVkkXe8UdR9r2drwsGFCrmj30Ey4Brh 7gdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ouY5CUPx/iWqZ1u0sC+Jj8HZGsfygaiWBdp69oK668U=; b=bQLTp+DF0upVHronzRdT/uk4GO1YW9dggPaRLZ/aGSmqj5QxZpCKU4AZEwoRQGtzmt /rPO93wtAfFmVnmsrrV7O86yeRTOQQnR4sueSkjuj9Aa+QnynFz0rnezNY7Fa7bSAhGV iKTr6X99ZCeIoNT6vkU+ytKgUIVwCByVjJy8wZ9N/YdljanMqL7ZZ5Go87t5myocQ8Y8 asWeBlrL3Ga0xubk5A6LA3AuYJt6//IYj2KaoNJ/rr580sPVVBIknjo5Ffnjgefar+ww TIXKzalcUMcCDCiIFmeeZx4N/S4WYwkJgU8pFDvBV7xJzpU2AwvYbuKJeibhQ1od+3/N wrwQ== X-Gm-Message-State: AMke39kb5i3xBH5gpntcfEU0Vxzf/teCiwK/8Y3G1IN+4hB2xKgIckcBypDYncrLvfnP0tv2 X-Received: by 10.28.143.204 with SMTP id r195mr2729137wmd.32.1487772820177; Wed, 22 Feb 2017 06:13:40 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id f50sm1889573wrf.69.2017.02.22.06.13.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Feb 2017 06:13:39 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , David Lechner , Kevin Hilman , Michael Turquette , Patrick Titiano , Laurent Pinchart , Russell King Subject: [PATCH v3 6/6] ARM: davinci: add enable GPIOs for vpif capture to pdata-quirks Date: Wed, 22 Feb 2017 15:13:25 +0100 Message-Id: <1487772805-19021-7-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1487772805-19021-1-git-send-email-bgolaszewski@baylibre.com> References: <1487772805-19021-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170222_061402_689594_A6BDB32F X-CRM114-Status: GOOD ( 11.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On the da850-evm board we need to select the UI expander video capture function to make vpif capture work. Add the relevant GPIOs to the pdata-quirks. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/pdata-quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-davinci/pdata-quirks.c b/arch/arm/mach-davinci/pdata-quirks.c index e2160ce..b60f422 100644 --- a/arch/arm/mach-davinci/pdata-quirks.c +++ b/arch/arm/mach-davinci/pdata-quirks.c @@ -9,6 +9,7 @@ */ #include #include +#include #include #include @@ -120,6 +121,20 @@ static void __init da850_vpif_capture_legacy_init(void) __func__, ret); } +static struct gpiod_lookup_table vpif_capture_enable_gpios = { + .dev_id = "vpif_capture", + .table = { + GPIO_LOOKUP_IDX("tca6416", 7, "enable", 0, GPIO_ACTIVE_HIGH), + GPIO_LOOKUP_IDX("tca6416", 6, "enable", 1, GPIO_ACTIVE_HIGH), + GPIO_LOOKUP_IDX("tca6416", 5, "enable", 2, GPIO_ACTIVE_LOW), + }, +}; + +static void __init da850_vpif_capture_gpio_sel_init(void) +{ + gpiod_add_lookup_table(&vpif_capture_enable_gpios); +} + static struct adv7343_platform_data adv7343_pdata = { .mode_config = { .dac = { 1, 1, 1 }, @@ -199,6 +214,7 @@ static struct pdata_init pdata_quirks[] __initdata = { { "ti,da850-lcdk", da850_vpif_capture_legacy_init, }, { "ti,da850-evm", da850_vpif_display_legacy_init, }, { "ti,da850-evm", da850_vpif_capture_legacy_init, }, + { "ti,da850-evm", da850_vpif_capture_gpio_sel_init, }, { /* sentinel */ }, };