summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/cxd2820r_priv.h
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-07-19 21:10:36 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-27 14:33:58 -0300
commit1e8f31f31726148c27de1ff4692c76c9bcff9860 (patch)
treeb593d16c49ae28aec06f8e3d42ca8b70d08a7ea6 /drivers/media/dvb-frontends/cxd2820r_priv.h
parent75aeafc9d0e21222b876990946ef534b384462f1 (diff)
[media] cxd2820r: use Kernel GPIO for GPIO access
Currently there is LNA behind cxd2820r demodulator GPIO. Use Kernel GPIO interface to access those GPIOs. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends/cxd2820r_priv.h')
-rw-r--r--drivers/media/dvb-frontends/cxd2820r_priv.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/cxd2820r_priv.h b/drivers/media/dvb-frontends/cxd2820r_priv.h
index 9396492119ca..7ff5f60c83e1 100644
--- a/drivers/media/dvb-frontends/cxd2820r_priv.h
+++ b/drivers/media/dvb-frontends/cxd2820r_priv.h
@@ -26,6 +26,7 @@
#include "dvb_frontend.h"
#include "dvb_math.h"
#include "cxd2820r.h"
+#include <linux/gpio.h>
struct reg_val_mask {
u32 reg;
@@ -41,7 +42,11 @@ struct cxd2820r_priv {
bool ber_running;
u8 bank[2];
- u8 gpio[3];
+#define GPIO_COUNT 3
+ u8 gpio[GPIO_COUNT];
+#ifdef CONFIG_GPIOLIB
+ struct gpio_chip gpio_chip;
+#endif
fe_delivery_system_t delivery_system;
bool last_tune_failed; /* for switch between T and T2 tune */
@@ -51,7 +56,7 @@ struct cxd2820r_priv {
extern int cxd2820r_debug;
-int cxd2820r_gpio(struct dvb_frontend *fe);
+int cxd2820r_gpio(struct dvb_frontend *fe, u8 *gpio);
int cxd2820r_wr_reg_mask(struct cxd2820r_priv *priv, u32 reg, u8 val,
u8 mask);