Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / media / dvb / frontends / xc5000.h
index 9286a03822c19003100fd97277abbf74416517e8..b890883a0cdc224a8f888000564b7eb4f63635bc 100644 (file)
@@ -28,23 +28,34 @@ struct dvb_frontend;
 struct i2c_adapter;
 
 struct xc5000_config {
-       u8  i2c_address;
-       u32 if_khz;
-       int (*request_firmware)(struct dvb_frontend *fe,
-               const struct firmware **fw, char *name);
-       int (*tuner_reset)(struct dvb_frontend* fe);
+       u8   i2c_address;
+       u32  if_khz;
+
+       /* For each bridge framework, when it attaches either analog or digital,
+        * it has to store a reference back to its _core equivalent structure,
+        * so that it can service the hardware by steering gpio's etc.
+        * Each bridge implementation is different so cast priv accordingly.
+        * The xc5000 driver cares not for this value, other than ensuring
+        * it's passed back to a bridge during tuner_callback().
+        */
+       void *priv;
+       int  (*tuner_callback) (void *priv, int command, int arg);
 };
 
-#if defined(CONFIG_DVB_TUNER_XC5000) || defined(CONFIG_DVB_TUNER_XC5000_MODULE)
+/* xc5000 callback command */
+#define XC5000_TUNER_RESET             0
+
+#if defined(CONFIG_DVB_TUNER_XC5000) || \
+    (defined(CONFIG_DVB_TUNER_XC5000_MODULE) && defined(MODULE))
 extern struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe,
                                          struct i2c_adapter *i2c,
                                          struct xc5000_config *cfg);
 #else
 static inline struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe,
                                                 struct i2c_adapter *i2c,
-                                                struct xc5000_config *cfg);
+                                                struct xc5000_config *cfg)
 {
-       printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
+       printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
        return NULL;
 }
 #endif // CONFIG_DVB_TUNER_XC5000