lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1487772805-19021-7-git-send-email-bgolaszewski@baylibre.com>
Date:   Wed, 22 Feb 2017 15:13:25 +0100
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Sekhar Nori <nsekhar@...com>, David Lechner <david@...hnology.com>,
        Kevin Hilman <khilman@...libre.com>,
        Michael Turquette <mturquette@...libre.com>,
        Patrick Titiano <ptitiano@...libre.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Russell King <linux@...linux.org.uk>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: [PATCH v3 6/6] ARM: davinci: add enable GPIOs for vpif capture to pdata-quirks

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 <bgolaszewski@...libre.com>
---
 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 <linux/kernel.h>
 #include <linux/of_platform.h>
+#include <linux/gpio/machine.h>
 
 #include <media/i2c/tvp514x.h>
 #include <media/i2c/adv7343.h>
@@ -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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ