media: cec-gpio: use GPIOD_OUT_HIGH_OPEN_DRAIN
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 20 Apr 2018 08:13:53 +0000 (04:13 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 9 May 2018 20:15:06 +0000 (16:15 -0400)
This driver needs a pull up output GPIO, but devm_gpiod_get() is called
with GPIOD_IN. This apparently works fine for the RPi3 where the DT
correctly specifies a pull up GPIO, but on the i.MX6 it also needs to
be specified with devm_gpiod_get().

Reported-by: Henrik Mau <Henrik.Mau@linn.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/cec-gpio/cec-gpio.c

index f1f28cf5c75157da5bd8103527818bd79830e3f0..69f8242209c223dba20e7736658c53ec4bd831c8 100644 (file)
@@ -158,7 +158,7 @@ static int cec_gpio_probe(struct platform_device *pdev)
 
        cec->dev = dev;
 
-       cec->cec_gpio = devm_gpiod_get(dev, "cec", GPIOD_IN);
+       cec->cec_gpio = devm_gpiod_get(dev, "cec", GPIOD_OUT_HIGH_OPEN_DRAIN);
        if (IS_ERR(cec->cec_gpio))
                return PTR_ERR(cec->cec_gpio);
        cec->cec_irq = gpiod_to_irq(cec->cec_gpio);