Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] au8522 Remove 0x4 bit for register reads

The second highest bit in the register value is an indicator to do
a register read, so remove it since now au8522_regread() inserts
the bit automatically.

Also remove a stray instance where we were actually trying to write
to the I2C status register, which was actually a read.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Devin Heitmueller and committed by
Mauro Carvalho Chehab
6211d28e d6f79a91

+7 -8
+7 -8
drivers/media/dvb-frontends/au8522_dig.c
··· 284 284 u16 data; 285 285 } VSB_mod_tab[] = { 286 286 { 0x0090, 0x84 }, 287 - { 0x4092, 0x11 }, 288 287 { 0x2005, 0x00 }, 289 288 { 0x0091, 0x80 }, 290 289 { 0x00a3, 0x0c }, ··· 653 654 654 655 if (state->current_modulation == VSB_8) { 655 656 dprintk("%s() Checking VSB_8\n", __func__); 656 - reg = au8522_readreg(state, 0x4088); 657 + reg = au8522_readreg(state, 0x0088); 657 658 if ((reg & 0x03) == 0x03) 658 659 *status |= FE_HAS_LOCK | FE_HAS_SYNC | FE_HAS_VITERBI; 659 660 } else { 660 661 dprintk("%s() Checking QAM\n", __func__); 661 - reg = au8522_readreg(state, 0x4541); 662 + reg = au8522_readreg(state, 0x0541); 662 663 if (reg & 0x80) 663 664 *status |= FE_HAS_VITERBI; 664 665 if (reg & 0x20) ··· 744 745 if (state->current_modulation == QAM_256) 745 746 ret = au8522_mse2snr_lookup(qam256_mse2snr_tab, 746 747 ARRAY_SIZE(qam256_mse2snr_tab), 747 - au8522_readreg(state, 0x4522), 748 + au8522_readreg(state, 0x0522), 748 749 snr); 749 750 else if (state->current_modulation == QAM_64) 750 751 ret = au8522_mse2snr_lookup(qam64_mse2snr_tab, 751 752 ARRAY_SIZE(qam64_mse2snr_tab), 752 - au8522_readreg(state, 0x4522), 753 + au8522_readreg(state, 0x0522), 753 754 snr); 754 755 else /* VSB_8 */ 755 756 ret = au8522_mse2snr_lookup(vsb_mse2snr_tab, 756 757 ARRAY_SIZE(vsb_mse2snr_tab), 757 - au8522_readreg(state, 0x4311), 758 + au8522_readreg(state, 0x0311), 758 759 snr); 759 760 760 761 if (state->config.led_cfg) ··· 803 804 struct au8522_state *state = fe->demodulator_priv; 804 805 805 806 if (state->current_modulation == VSB_8) 806 - *ucblocks = au8522_readreg(state, 0x4087); 807 + *ucblocks = au8522_readreg(state, 0x0087); 807 808 else 808 - *ucblocks = au8522_readreg(state, 0x4543); 809 + *ucblocks = au8522_readreg(state, 0x0543); 809 810 810 811 return 0; 811 812 }