linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: bgolaszewski@baylibre.com (Bartosz Golaszewski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] media: vpif: request enable-gpios
Date: Wed, 22 Feb 2017 14:27:51 +0100	[thread overview]
Message-ID: <1487770071-5157-1-git-send-email-bgolaszewski@baylibre.com> (raw)

This change is needed to make vpif capture work on the da850-evm board
where the capture function must be selected on the UI expander.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/media/platform/davinci/vpif_capture.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index b62a399..7dea358 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/gpio/consumer.h>
 
 #include <media/v4l2-ioctl.h>
 
@@ -1433,6 +1434,7 @@ static __init int vpif_probe(struct platform_device *pdev)
 {
 	struct vpif_subdev_info *subdevdata;
 	struct i2c_adapter *i2c_adap;
+	struct gpio_descs *descs;
 	struct resource *res;
 	int subdev_count;
 	int res_idx = 0;
@@ -1443,6 +1445,11 @@ static __init int vpif_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+	descs = devm_gpiod_get_array_optional(&pdev->dev,
+					      "enable", GPIOD_OUT_HIGH);
+	if (IS_ERR(descs))
+		dev_err(&pdev->dev, "Error requesting enable GPIOs\n");
+
 	vpif_dev = &pdev->dev;
 
 	err = initialize_vpif();
-- 
2.9.3

             reply	other threads:[~2017-02-22 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 13:27 Bartosz Golaszewski [this message]
2017-02-28 16:21 ` [PATCH] media: vpif: request enable-gpios 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=1487770071-5157-1-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).