diff options
author | Anton Sviridenko <anton@corp.bluecherry.net> | 2017-08-02 17:17:02 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-08-09 17:29:51 +0300 |
commit | d3202d1981dc5a5f03f9afc96480619b48b60124 (patch) | |
tree | 74526f3b750e3377399c0b2cec7588734c514b3e /drivers/media/pci/solo6x10/solo6x10.h | |
parent | 2246902264956f099bca967b2b5b5817ca9e35b6 (diff) | |
download | linux-d3202d1981dc5a5f03f9afc96480619b48b60124.tar.xz |
media: solo6x10: export hardware GPIO pins 8:31 to gpiolib interface
24 GPIO pins from 32 available on solo6x10 chips are exported
to gpiolib. First 8 GPIOs are reserved for internal use on capture card
boards, GPIOs in range 8:15 are configured as outputs to control relays,
remaining 16:31 are configured as inputs to read sensor states.
Now with this patch userspace DVR software can switch relays and read
sensor states when GPIO extension cards are attached to Softlogic solo6x10
based video capture cards.
Signed-off-by: Anton Sviridenko <anton@corp.bluecherry.net>
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/solo6x10/solo6x10.h')
-rw-r--r-- | drivers/media/pci/solo6x10/solo6x10.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/pci/solo6x10/solo6x10.h b/drivers/media/pci/solo6x10/solo6x10.h index 3f8da5e8c430..3a1893ae2dad 100644 --- a/drivers/media/pci/solo6x10/solo6x10.h +++ b/drivers/media/pci/solo6x10/solo6x10.h @@ -31,6 +31,7 @@ #include <linux/atomic.h> #include <linux/slab.h> #include <linux/videodev2.h> +#include <linux/gpio/driver.h> #include <media/v4l2-dev.h> #include <media/v4l2-device.h> @@ -199,6 +200,10 @@ struct solo_dev { u32 irq_mask; u32 motion_mask; struct v4l2_device v4l2_dev; +#ifdef CONFIG_GPIOLIB + /* GPIO */ + struct gpio_chip gpio_dev; +#endif /* tw28xx accounting */ u8 tw2865, tw2864, tw2815; |