From: Michael Krufky Date: Tue, 7 Feb 2012 04:22:34 +0000 (-0300) Subject: [media] tuner: add support for Xceive XC5000C X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f21cfaf6381e2330c4e2f619d4cedc72146a8cf7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] tuner: add support for Xceive XC5000C Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/common/tuners/tuner-types.c b/drivers/media/common/tuners/tuner-types.c index e13683bab6b3..2da4440c16ee 100644 --- a/drivers/media/common/tuners/tuner-types.c +++ b/drivers/media/common/tuners/tuner-types.c @@ -1868,6 +1868,10 @@ struct tunertype tuners[] = { .params = tuner_tena_tnf_5337_params, .count = ARRAY_SIZE(tuner_tena_tnf_5337_params), }, + [TUNER_XC5000C] = { /* Xceive 5000C */ + .name = "Xceive 5000C tuner", + /* see xc5000.c for details */ + }, }; EXPORT_SYMBOL(tuners); diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 4059ea178c2d..0628a0ae9da5 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -380,6 +380,21 @@ static void set_type(struct i2c_client *c, unsigned int type, tune_now = 0; break; } + case TUNER_XC5000C: + { + struct xc5000_config xc5000c_cfg = { + .i2c_address = t->i2c->addr, + /* if_khz will be set at dvb_attach() */ + .if_khz = 0, + .fw = XC5000C_DEFAULT_FIRMWARE, + }; + + if (!dvb_attach(xc5000_attach, + &t->fe, t->i2c->adapter, &xc5000c_cfg)) + goto attach_failed; + tune_now = 0; + break; + } case TUNER_NXP_TDA18271: { struct tda18271_config cfg = { diff --git a/include/media/tuner.h b/include/media/tuner.h index 29e1920e7339..926aff9bdf65 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -136,6 +136,7 @@ #define TUNER_TENA_TNF_5337 86 #define TUNER_XC4000 87 /* Xceive Silicon Tuner */ +#define TUNER_XC5000C 88 /* Xceive Silicon Tuner */ /* tv card specific */ #define TDA9887_PRESENT (1<<0)