From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932769AbdBVOOp (ORCPT ); Wed, 22 Feb 2017 09:14:45 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35473 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932644AbdBVONm (ORCPT ); Wed, 22 Feb 2017 09:13:42 -0500 From: Bartosz Golaszewski To: Sekhar Nori , David Lechner , Kevin Hilman , Michael Turquette , Patrick Titiano , Laurent Pinchart , Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski 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> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */ }, }; -- 2.9.3