Add Fitipower fc0011 tuner driver
PATCH 1/1 Add Fitipower fc0011 tuner driver
This adds a driver for the Fitipower fc0011 DVB-t tuner.
Signed-off-by Michael Buesch <[email protected]>
---
The driver is tested with the af903x driver.
Mauro Carvalho Chehab, I'm actually aiming on getting this driver merged into the media-tree now.
Hans-Frieder Vogt, what are your plans on getting af903x merged? As the driver does actually work, we should focus on merging it ASAP. That would help further development a _lot_.
drivers/media/common/tuners/Kconfig +7 -0
@@ -204,6 +204,13 @@ help NXP TDA18218 silicon tuner driver. +config MEDIA_TUNER_FC0011 + tristate "Fitipower FC0011 silicon tuner" + depends on VIDEO_MEDIA && I2C + default m if MEDIA_TUNER_CUSTOMISE + help + Fitipower FC0011 silicon tuner driver. + config MEDIA_TUNER_TDA18212 tristate "NXP TDA18212 silicon tuner" depends on VIDEO_MEDIA && I2C
drivers/media/common/tuners/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_MEDIA_TUNER_MAX2165) += max2165.o obj-$(CONFIG_MEDIA_TUNER_TDA18218) += tda18218.o obj-$(CONFIG_MEDIA_TUNER_TDA18212) += tda18212.o +obj-$(CONFIG_MEDIA_TUNER_FC0011) += fc0011.o ccflags-y += -I$(srctree)/drivers/media/dvb/dvb-core ccflags-y += -I$(srctree)/drivers/media/dvb/frontends
drivers/media/common/tuners/fc0011.c new file +495 -0
495 lines not on this page · raw message
drivers/media/common/tuners/fc0011.h new file +28 -0
@@ -0,0 +1,28 @@ +#ifndef LINUX_FC0011_H_ +#define LINUX_FC0011_H_ + +#include "dvb_frontend.h" + +#if defined(CONFIG_MEDIA_TUNER_FC0011 ) ||\ + defined(CONFIG_MEDIA_TUNER_FC0011_MODULE ) +struct dvb_frontend *fc0011_attach (struct dvb_frontend *fe, +struct i2c_adapter *i2c, +u8 i2c_address, +int (*tuner_reset)(unsigned long ,unsigned long ), +unsigned long tuner_reset_arg0, +unsigned long tuner_reset_arg1); +#else +static inline +struct dvb_frontend *fc0011_attach (struct dvb_frontend *fe, +struct i2c_adapter *i2c, +u8 i2c_address, +int (*tuner_reset)(unsigned long ,unsigned long ), +unsigned long tuner_reset_arg0, +unsigned long tuner_reset_arg1) +{ +dev_err (&i2c->dev,"fc0011 driver disabled in Kconfig\n" ); +return NULL ; +} +#endif + +#endif /* LINUX_FC0011_H_ */
MAINTAINERS +7 -0
@@ -2692,6 +2692,13 @@ F: Documentation/hwmon/f71805f F: drivers/hwmon/f71805f.c +FC0011 TUNER DRIVER +M: Michael Buesch <[email protected]> +L: [email protected] +S: Maintained +F: drivers/media/common/tuners/fc0011.h +F: drivers/media/common/tuners/fc0011.c + FANOTIFY M: Eric Paris <[email protected]> S: Maintained
Signature · 3 lines
Greetings, Michael. PGP encryption is encouraged / 908D8B0E
Quoted 1 line · On Thu, 29 Mar 2012 02:01:34 +0200 Michael Büsch <[email protected]> wrote:
The driver is tested with the af903x driver.
For reference, here goes the af903x/fc0011 glue:
Signed-off-by Michael Buesch <[email protected]>
drivers/media/dvb/dvb-usb/Kconfig +1 -0
@@ -342,6 +342,7 @@ config DVB_USB_AF903X tristate "Afatech AF903X DVB-T USB2.0 support" depends on DVB_USB && EXPERIMENTAL + select MEDIA_TUNER_FC0011 if !MEDIA_TUNER_CUSTOMISE select MEDIA_TUNER_FC0012 if !MEDIA_TUNER_CUSTOMISE select MEDIA_TUNER_MXL5007T if !MEDIA_TUNER_CUSTOMISE help
drivers/media/dvb/dvb-usb/af903x-devices.c +4 -0
@@ -260,6 +260,7 @@ }extern struct tuner_desc tuner_af9007; +extern struct tuner_desc tuner_fc0011;extern struct tuner_desc tuner_fc0012;extern struct tuner_desc tuner_mxl5007t;
@@ -273,6 +274,9 @@case TUNER_AF9007 : ctx->tuner_desc = &tuner_af9007;break ; +case TUNER_FC0011 : + ctx->tuner_desc = &tuner_fc0011; +break ;case TUNER_FC0012 : ctx->tuner_desc = &tuner_fc0012;break ;
drivers/media/dvb/dvb-usb/af903x-fe.c +11 -0
@@ -28,6 +28,7 @@#include "af903x-fe.h" #include "af903x-fe-priv.h" #include "dvb_frontend.h" +#include "fc0011.h" #include "fc0012.h" #include "mxl5007t.h"
@@ -1967,6 +1968,8 @@ } }; +extern int af903x_fc0011_reset (unsigned long arg0,unsigned long arg1); +static struct dvb_frontend_ops af903x_ops;struct dvb_frontend *af903x_fe_attach (struct i2c_adapter *i2c_adap,int id,struct af903x_dev_ctx *ctx)
@@ -1990,6 +1993,14 @@switch (ctx->tuner_desc->tunerId) {case TUNER_AF9007 :break ; +case TUNER_FC0011 : + ret =dvb_attach (fc0011_attach, frontend, i2c_adap, + id ==0 ? ctx->tuner_desc->tuner_addr : + ctx->tuner_desc->tuner_addr +1 , + af903x_fc0011_reset, + (unsigned long )ctx, (unsigned long )id) + ==NULL ? -ENODEV :0 ; +break ;case TUNER_FC0012 : ret = dvb_attach(fc0012_attach, frontend, i2c_adap, id == 0 ? ctx->tuner_desc->tuner_addr :
drivers/media/dvb/dvb-usb/af903x-tuners.c +101 -0
113 lines not on this page · raw message
Signature · 3 lines
Greetings, Michael. PGP encryption is encouraged / 908D8B0E