From: bgolaszewski@baylibre.com (Bartosz Golaszewski)
To: linux-arm-kernel@lists.infradead.org
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 [thread overview]
Message-ID: <1487772805-19021-7-git-send-email-bgolaszewski@baylibre.com> (raw)
In-Reply-To: <1487772805-19021-1-git-send-email-bgolaszewski@baylibre.com>
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@baylibre.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
next prev parent reply other threads:[~2017-02-22 14:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 14:13 [PATCH v3 0/6] ARM: davinci: vpif capture & display support Bartosz Golaszewski
2017-02-22 14:13 ` [PATCH v3 1/6] ARM: davinci: da8xx: allow having multiple pdata-quirks Bartosz Golaszewski
2017-02-28 18:00 ` Kevin Hilman
2017-02-22 14:13 ` [PATCH v3 2/6] ARM: davinci: board-da850-evm: add I2C ID for VPIF Bartosz Golaszewski
2017-02-22 14:13 ` [PATCH v3 3/6] ARM: davinci: da8xx: add pdata-quirks for VPIF capture Bartosz Golaszewski
2017-02-28 8:57 ` Sekhar Nori
2017-02-22 14:13 ` [PATCH v3 4/6] ARM: da850-evm: add a fixed regulator for the UI board IO expander Bartosz Golaszewski
2017-02-22 14:13 ` [PATCH v3 5/6] ARM: davinci: add pdata-quirks for da850-evm vpif display Bartosz Golaszewski
2017-02-22 14:13 ` Bartosz Golaszewski [this message]
2017-02-28 8:49 ` [PATCH v3 6/6] ARM: davinci: add enable GPIOs for vpif capture to pdata-quirks Sekhar Nori
2017-02-28 9:42 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487772805-19021-7-git-send-email-bgolaszewski@baylibre.com \
--to=bgolaszewski@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).