Commit 81e19912 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] af9033: style related and minor changes

Fix coding style and other small issues.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent c2feb9ff
This diff is collapsed.
...@@ -13,18 +13,13 @@ ...@@ -13,18 +13,13 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef AF9033_H #ifndef AF9033_H
#define AF9033_H #define AF9033_H
/* /*
* I2C address (TODO: are these in 8-bit format?) * I2C address: 0x1c, 0x1d, 0x1e, 0x1f
* 0x38, 0x3a, 0x3c, 0x3e
*/ */
struct af9033_config { struct af9033_config {
/* /*
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef AF9033_PRIV_H #ifndef AF9033_PRIV_H
...@@ -70,7 +66,7 @@ static const struct clock_adc clock_adc_lut[] = { ...@@ -70,7 +66,7 @@ static const struct clock_adc clock_adc_lut[] = {
{ 12000000, 20250000 }, { 12000000, 20250000 },
}; };
/* pre-calculated coeff lookup table */ /* Pre-calculated coeff lookup table */
static const struct coeff coeff_lut[] = { static const struct coeff coeff_lut[] = {
/* 12.000 MHz */ /* 12.000 MHz */
{ 12000000, 8000000, { { 12000000, 8000000, {
...@@ -189,6 +185,9 @@ static const struct val_snr qam64_snr_lut[] = { ...@@ -189,6 +185,9 @@ static const struct val_snr qam64_snr_lut[] = {
{ 0xffffff, 32 }, { 0xffffff, 32 },
}; };
/*
* Afatech AF9033 demod init
*/
static const struct reg_val ofsm_init[] = { static const struct reg_val ofsm_init[] = {
{ 0x800051, 0x01 }, { 0x800051, 0x01 },
{ 0x800070, 0x0a }, { 0x800070, 0x0a },
...@@ -300,8 +299,10 @@ static const struct reg_val ofsm_init[] = { ...@@ -300,8 +299,10 @@ static const struct reg_val ofsm_init[] = {
{ 0x80fd8b, 0x00 }, { 0x80fd8b, 0x00 },
}; };
/* Infineon TUA 9001 tuner init /*
AF9033_TUNER_TUA9001 = 0x27 */ * Infineon TUA 9001 tuner init
* AF9033_TUNER_TUA9001 = 0x27
*/
static const struct reg_val tuner_init_tua9001[] = { static const struct reg_val tuner_init_tua9001[] = {
{ 0x800046, 0x27 }, { 0x800046, 0x27 },
{ 0x800057, 0x00 }, { 0x800057, 0x00 },
...@@ -342,8 +343,10 @@ static const struct reg_val tuner_init_tua9001[] = { ...@@ -342,8 +343,10 @@ static const struct reg_val tuner_init_tua9001[] = {
{ 0x80f1e6, 0x00 }, { 0x80f1e6, 0x00 },
}; };
/* Fitipower fc0011 tuner init /*
AF9033_TUNER_FC0011 = 0x28 */ * Fitipower FC0011 tuner init
* AF9033_TUNER_FC0011 = 0x28
*/
static const struct reg_val tuner_init_fc0011[] = { static const struct reg_val tuner_init_fc0011[] = {
{ 0x800046, 0x28 }, { 0x800046, 0x28 },
{ 0x800057, 0x00 }, { 0x800057, 0x00 },
...@@ -403,8 +406,10 @@ static const struct reg_val tuner_init_fc0011[] = { ...@@ -403,8 +406,10 @@ static const struct reg_val tuner_init_fc0011[] = {
{ 0x80f1e6, 0x00 }, { 0x80f1e6, 0x00 },
}; };
/* Fitipower FC0012 tuner init /*
AF9033_TUNER_FC0012 = 0x2e */ * Fitipower FC0012 tuner init
* AF9033_TUNER_FC0012 = 0x2e
*/
static const struct reg_val tuner_init_fc0012[] = { static const struct reg_val tuner_init_fc0012[] = {
{ 0x800046, 0x2e }, { 0x800046, 0x2e },
{ 0x800057, 0x00 }, { 0x800057, 0x00 },
...@@ -446,8 +451,10 @@ static const struct reg_val tuner_init_fc0012[] = { ...@@ -446,8 +451,10 @@ static const struct reg_val tuner_init_fc0012[] = {
{ 0x80f1e6, 0x00 }, { 0x80f1e6, 0x00 },
}; };
/* MaxLinear MxL5007T tuner init /*
AF9033_TUNER_MXL5007T = 0xa0 */ * MaxLinear MxL5007T tuner init
* AF9033_TUNER_MXL5007T = 0xa0
*/
static const struct reg_val tuner_init_mxl5007t[] = { static const struct reg_val tuner_init_mxl5007t[] = {
{ 0x800046, 0x1b }, { 0x800046, 0x1b },
{ 0x800057, 0x01 }, { 0x800057, 0x01 },
...@@ -481,8 +488,10 @@ static const struct reg_val tuner_init_mxl5007t[] = { ...@@ -481,8 +488,10 @@ static const struct reg_val tuner_init_mxl5007t[] = {
{ 0x80f1e6, 0x00 }, { 0x80f1e6, 0x00 },
}; };
/* NXP TDA 18218HN tuner init /*
AF9033_TUNER_TDA18218 = 0xa1 */ * NXP TDA18218HN tuner init
* AF9033_TUNER_TDA18218 = 0xa1
*/
static const struct reg_val tuner_init_tda18218[] = { static const struct reg_val tuner_init_tda18218[] = {
{0x800046, 0xa1}, {0x800046, 0xa1},
{0x800057, 0x01}, {0x800057, 0x01},
...@@ -515,7 +524,10 @@ static const struct reg_val tuner_init_tda18218[] = { ...@@ -515,7 +524,10 @@ static const struct reg_val tuner_init_tda18218[] = {
{0x80f1e6, 0x00}, {0x80f1e6, 0x00},
}; };
/* FCI FC2580 tuner init */ /*
* FCI FC2580 tuner init
* AF9033_TUNER_FC2580 = 0x32
*/
static const struct reg_val tuner_init_fc2580[] = { static const struct reg_val tuner_init_fc2580[] = {
{ 0x800046, 0x32 }, { 0x800046, 0x32 },
{ 0x800057, 0x01 }, { 0x800057, 0x01 },
...@@ -553,6 +565,9 @@ static const struct reg_val tuner_init_fc2580[] = { ...@@ -553,6 +565,9 @@ static const struct reg_val tuner_init_fc2580[] = {
{ 0x80f1e6, 0x01 }, { 0x80f1e6, 0x01 },
}; };
/*
* IT9133 AX demod init
*/
static const struct reg_val ofsm_init_it9135_v1[] = { static const struct reg_val ofsm_init_it9135_v1[] = {
{ 0x800051, 0x01 }, { 0x800051, 0x01 },
{ 0x800070, 0x0a }, { 0x800070, 0x0a },
...@@ -664,8 +679,10 @@ static const struct reg_val ofsm_init_it9135_v1[] = { ...@@ -664,8 +679,10 @@ static const struct reg_val ofsm_init_it9135_v1[] = {
{ 0x80fd8b, 0x00 }, { 0x80fd8b, 0x00 },
}; };
/* ITE Tech IT9135 Omega tuner init /*
AF9033_TUNER_IT9135_38 = 0x38 */ * ITE Tech IT9133 AX Omega tuner init
* AF9033_TUNER_IT9135_38 = 0x38
*/
static const struct reg_val tuner_init_it9135_38[] = { static const struct reg_val tuner_init_it9135_38[] = {
{ 0x800043, 0x00 }, { 0x800043, 0x00 },
{ 0x800046, 0x38 }, { 0x800046, 0x38 },
...@@ -881,8 +898,10 @@ static const struct reg_val tuner_init_it9135_38[] = { ...@@ -881,8 +898,10 @@ static const struct reg_val tuner_init_it9135_38[] = {
{ 0x80fd8b, 0x00 }, { 0x80fd8b, 0x00 },
}; };
/* ITE Tech IT9135 Omega LNA config 1 tuner init /*
AF9033_TUNER_IT9135_51 = 0x51 */ * ITE Tech IT9133 AX Omega LNA config 1 tuner init
* AF9033_TUNER_IT9135_51 = 0x51
*/
static const struct reg_val tuner_init_it9135_51[] = { static const struct reg_val tuner_init_it9135_51[] = {
{ 0x800043, 0x00 }, { 0x800043, 0x00 },
{ 0x800046, 0x51 }, { 0x800046, 0x51 },
...@@ -1098,8 +1117,10 @@ static const struct reg_val tuner_init_it9135_51[] = { ...@@ -1098,8 +1117,10 @@ static const struct reg_val tuner_init_it9135_51[] = {
{ 0x80fd8b, 0x00 }, { 0x80fd8b, 0x00 },
}; };
/* ITE Tech IT9135 Omega LNA config 2 tuner init /*
AF9033_TUNER_IT9135_52 = 0x52 */ * ITE Tech IT9133 AX Omega LNA config 2 tuner init
* AF9033_TUNER_IT9135_52 = 0x52
*/
static const struct reg_val tuner_init_it9135_52[] = { static const struct reg_val tuner_init_it9135_52[] = {
{ 0x800043, 0x00 }, { 0x800043, 0x00 },
{ 0x800046, 0x52 }, { 0x800046, 0x52 },
...@@ -1315,6 +1336,9 @@ static const struct reg_val tuner_init_it9135_52[] = { ...@@ -1315,6 +1336,9 @@ static const struct reg_val tuner_init_it9135_52[] = {
{ 0x80fd8b, 0x00 }, { 0x80fd8b, 0x00 },
}; };
/*
* ITE Tech IT9133 BX demod init
*/
static const struct reg_val ofsm_init_it9135_v2[] = { static const struct reg_val ofsm_init_it9135_v2[] = {
{ 0x800051, 0x01 }, { 0x800051, 0x01 },
{ 0x800070, 0x0a }, { 0x800070, 0x0a },
...@@ -1413,8 +1437,10 @@ static const struct reg_val ofsm_init_it9135_v2[] = { ...@@ -1413,8 +1437,10 @@ static const struct reg_val ofsm_init_it9135_v2[] = {
{ 0x80fd8b, 0x00 }, { 0x80fd8b, 0x00 },
}; };
/* ITE Tech IT9135 Omega v2 tuner init /*
AF9033_TUNER_IT9135_60 = 0x60 */ * ITE Tech IT9133 BX Omega tuner init
* AF9033_TUNER_IT9135_60 = 0x60
*/
static const struct reg_val tuner_init_it9135_60[] = { static const struct reg_val tuner_init_it9135_60[] = {
{ 0x800043, 0x00 }, { 0x800043, 0x00 },
{ 0x800046, 0x60 }, { 0x800046, 0x60 },
...@@ -1627,8 +1653,10 @@ static const struct reg_val tuner_init_it9135_60[] = { ...@@ -1627,8 +1653,10 @@ static const struct reg_val tuner_init_it9135_60[] = {
{ 0x80fd8b, 0x00 }, { 0x80fd8b, 0x00 },
}; };
/* ITE Tech IT9135 Omega v2 LNA config 1 tuner init /*
AF9033_TUNER_IT9135_61 = 0x61 */ * ITE Tech IT9133 BX Omega LNA config 1 tuner init
* AF9033_TUNER_IT9135_61 = 0x61
*/
static const struct reg_val tuner_init_it9135_61[] = { static const struct reg_val tuner_init_it9135_61[] = {
{ 0x800043, 0x00 }, { 0x800043, 0x00 },
{ 0x800046, 0x61 }, { 0x800046, 0x61 },
...@@ -1841,8 +1869,10 @@ static const struct reg_val tuner_init_it9135_61[] = { ...@@ -1841,8 +1869,10 @@ static const struct reg_val tuner_init_it9135_61[] = {
{ 0x80fd8b, 0x00 }, { 0x80fd8b, 0x00 },
}; };
/* ITE Tech IT9135 Omega v2 LNA config 2 tuner init /*
AF9033_TUNER_IT9135_62 = 0x62 */ * ITE Tech IT9133 BX Omega LNA config 2 tuner init
* AF9033_TUNER_IT9135_62 = 0x62
*/
static const struct reg_val tuner_init_it9135_62[] = { static const struct reg_val tuner_init_it9135_62[] = {
{ 0x800043, 0x00 }, { 0x800043, 0x00 },
{ 0x800046, 0x62 }, { 0x800046, 0x62 },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment