| .. | .. |
|---|
| 380 | 380 | */ |
|---|
| 381 | 381 | |
|---|
| 382 | 382 | /*****************************************************************************/ |
|---|
| 383 | | -/* Audio block 0x103 is write only. To avoid shadowing in driver accessing */ |
|---|
| 384 | | -/* RAM adresses directly. This must be READ ONLY to avoid problems. */ |
|---|
| 385 | | -/* Writing to the interface adresses is more than only writing the RAM */ |
|---|
| 386 | | -/* locations */ |
|---|
| 383 | +/* Audio block 0x103 is write only. To avoid shadowing in driver accessing */ |
|---|
| 384 | +/* RAM addresses directly. This must be READ ONLY to avoid problems. */ |
|---|
| 385 | +/* Writing to the interface addresses are more than only writing the RAM */ |
|---|
| 386 | +/* locations */ |
|---|
| 387 | 387 | /*****************************************************************************/ |
|---|
| 388 | 388 | /* |
|---|
| 389 | 389 | * \brief RAM location of MODUS registers |
|---|
| .. | .. |
|---|
| 656 | 656 | false, /* flag: true=bypass */ |
|---|
| 657 | 657 | ATV_TOP_VID_PEAK__PRE, /* shadow of ATV_TOP_VID_PEAK__A */ |
|---|
| 658 | 658 | ATV_TOP_NOISE_TH__PRE, /* shadow of ATV_TOP_NOISE_TH__A */ |
|---|
| 659 | | - true, /* flag CVBS ouput enable */ |
|---|
| 660 | | - false, /* flag SIF ouput enable */ |
|---|
| 659 | + true, /* flag CVBS output enable */ |
|---|
| 660 | + false, /* flag SIF output enable */ |
|---|
| 661 | 661 | DRXJ_SIF_ATTENUATION_0DB, /* current SIF att setting */ |
|---|
| 662 | 662 | { /* qam_rf_agc_cfg */ |
|---|
| 663 | 663 | DRX_STANDARD_ITU_B, /* standard */ |
|---|
| .. | .. |
|---|
| 832 | 832 | false, /* If true mirror frequency spectrum */ |
|---|
| 833 | 833 | { |
|---|
| 834 | 834 | /* MPEG output configuration */ |
|---|
| 835 | | - true, /* If true, enable MPEG ouput */ |
|---|
| 835 | + true, /* If true, enable MPEG output */ |
|---|
| 836 | 836 | false, /* If true, insert RS byte */ |
|---|
| 837 | 837 | false, /* If true, parallel out otherwise serial */ |
|---|
| 838 | 838 | false, /* If true, invert DATA signals */ |
|---|
| .. | .. |
|---|
| 848 | 848 | DRX_MPEG_STR_WIDTH_1 /* MPEG Start width in clock cycles */ |
|---|
| 849 | 849 | }, |
|---|
| 850 | 850 | /* Initilisations below can be omitted, they require no user input and |
|---|
| 851 | | - are initialy 0, NULL or false. The compiler will initialize them to these |
|---|
| 851 | + are initially 0, NULL or false. The compiler will initialize them to these |
|---|
| 852 | 852 | values when omitted. */ |
|---|
| 853 | 853 | false, /* is_opened */ |
|---|
| 854 | 854 | |
|---|
| .. | .. |
|---|
| 869 | 869 | DRX_POWER_UP, |
|---|
| 870 | 870 | |
|---|
| 871 | 871 | /* Tuner */ |
|---|
| 872 | | - 1, /* nr of I2C port to wich tuner is */ |
|---|
| 872 | + 1, /* nr of I2C port to which tuner is */ |
|---|
| 873 | 873 | 0L, /* minimum RF input frequency, in kHz */ |
|---|
| 874 | 874 | 0L, /* maximum RF input frequency, in kHz */ |
|---|
| 875 | 875 | false, /* Rf Agc Polarity */ |
|---|
| .. | .. |
|---|
| 1656 | 1656 | sequense will be visible: (1) write address {i2c addr, |
|---|
| 1657 | 1657 | 4 bytes chip address} (2) write data {i2c addr, 4 bytes data } |
|---|
| 1658 | 1658 | (3) write address (4) write data etc... |
|---|
| 1659 | | - Address must be rewriten because HI is reset after data transport and |
|---|
| 1659 | + Address must be rewritten because HI is reset after data transport and |
|---|
| 1660 | 1660 | expects an address. |
|---|
| 1661 | 1661 | */ |
|---|
| 1662 | 1662 | todo = (block_size < datasize ? block_size : datasize); |
|---|
| .. | .. |
|---|
| 1820 | 1820 | * \param wdata Data to write |
|---|
| 1821 | 1821 | * \param rdata Buffer for data to read |
|---|
| 1822 | 1822 | * \return int |
|---|
| 1823 | | -* \retval 0 Succes |
|---|
| 1823 | +* \retval 0 Success |
|---|
| 1824 | 1824 | * \retval -EIO Timeout, I2C error, illegal bank |
|---|
| 1825 | 1825 | * |
|---|
| 1826 | 1826 | * 16 bits register read modify write access using short addressing format only. |
|---|
| .. | .. |
|---|
| 1897 | 1897 | * \param addr |
|---|
| 1898 | 1898 | * \param data |
|---|
| 1899 | 1899 | * \return int |
|---|
| 1900 | | -* \retval 0 Succes |
|---|
| 1900 | +* \retval 0 Success |
|---|
| 1901 | 1901 | * \retval -EIO Timeout, I2C error, illegal bank |
|---|
| 1902 | 1902 | * |
|---|
| 1903 | 1903 | * 16 bits register read access via audio token ring interface. |
|---|
| .. | .. |
|---|
| 2004 | 2004 | * \param addr |
|---|
| 2005 | 2005 | * \param data |
|---|
| 2006 | 2006 | * \return int |
|---|
| 2007 | | -* \retval 0 Succes |
|---|
| 2007 | +* \retval 0 Success |
|---|
| 2008 | 2008 | * \retval -EIO Timeout, I2C error, illegal bank |
|---|
| 2009 | 2009 | * |
|---|
| 2010 | 2010 | * 16 bits register write access via audio token ring interface. |
|---|
| .. | .. |
|---|
| 2094 | 2094 | * \param datasize size of data buffer in bytes |
|---|
| 2095 | 2095 | * \param data pointer to data buffer |
|---|
| 2096 | 2096 | * \return int |
|---|
| 2097 | | -* \retval 0 Succes |
|---|
| 2097 | +* \retval 0 Success |
|---|
| 2098 | 2098 | * \retval -EIO Timeout, I2C error, illegal bank |
|---|
| 2099 | 2099 | * |
|---|
| 2100 | 2100 | */ |
|---|
| .. | .. |
|---|
| 2182 | 2182 | u32 *data, u32 flags) |
|---|
| 2183 | 2183 | { |
|---|
| 2184 | 2184 | u8 buf[sizeof(*data)] = { 0 }; |
|---|
| 2185 | | - int rc = -EIO; |
|---|
| 2185 | + int rc; |
|---|
| 2186 | 2186 | u32 word = 0; |
|---|
| 2187 | 2187 | |
|---|
| 2188 | 2188 | if (!data) |
|---|
| .. | .. |
|---|
| 2306 | 2306 | pr_err("error %d\n", rc); |
|---|
| 2307 | 2307 | goto rw_error; |
|---|
| 2308 | 2308 | } |
|---|
| 2309 | | - /* fallthrough */ |
|---|
| 2309 | + fallthrough; |
|---|
| 2310 | 2310 | case SIO_HI_RA_RAM_CMD_BRDCTRL: |
|---|
| 2311 | 2311 | rc = drxj_dap_write_reg16(dev_addr, SIO_HI_RA_RAM_PAR_2__A, cmd->param2, 0); |
|---|
| 2312 | 2312 | if (rc != 0) { |
|---|
| .. | .. |
|---|
| 2318 | 2318 | pr_err("error %d\n", rc); |
|---|
| 2319 | 2319 | goto rw_error; |
|---|
| 2320 | 2320 | } |
|---|
| 2321 | | - /* fallthrough */ |
|---|
| 2321 | + fallthrough; |
|---|
| 2322 | 2322 | case SIO_HI_RA_RAM_CMD_NULL: |
|---|
| 2323 | 2323 | /* No parameters */ |
|---|
| 2324 | 2324 | break; |
|---|
| .. | .. |
|---|
| 2338 | 2338 | if ((cmd->cmd) == SIO_HI_RA_RAM_CMD_RESET) |
|---|
| 2339 | 2339 | msleep(1); |
|---|
| 2340 | 2340 | |
|---|
| 2341 | | - /* Detect power down to ommit reading result */ |
|---|
| 2341 | + /* Detect power down to omit reading result */ |
|---|
| 2342 | 2342 | powerdown_cmd = (bool) ((cmd->cmd == SIO_HI_RA_RAM_CMD_CONFIG) && |
|---|
| 2343 | 2343 | (((cmd-> |
|---|
| 2344 | 2344 | param5) & SIO_HI_RA_RAM_PAR_5_CFG_SLEEP__M) |
|---|
| .. | .. |
|---|
| 2754 | 2754 | common_attr = (struct drx_common_attr *) demod->my_common_attr; |
|---|
| 2755 | 2755 | |
|---|
| 2756 | 2756 | if (cfg_data->enable_mpeg_output == true) { |
|---|
| 2757 | | - /* quick and dirty patch to set MPEG incase current std is not |
|---|
| 2757 | + /* quick and dirty patch to set MPEG in case current std is not |
|---|
| 2758 | 2758 | producing MPEG */ |
|---|
| 2759 | 2759 | switch (ext_attr->standard) { |
|---|
| 2760 | 2760 | case DRX_STANDARD_8VSB: |
|---|
| .. | .. |
|---|
| 2841 | 2841 | /* coef = 188/204 */ |
|---|
| 2842 | 2842 | max_bit_rate = |
|---|
| 2843 | 2843 | (ext_attr->curr_symbol_rate / 8) * nr_bits * 188; |
|---|
| 2844 | | - /* fall-through - as b/c Annex A/C need following settings */ |
|---|
| 2844 | + fallthrough; /* as b/c Annex A/C need following settings */ |
|---|
| 2845 | 2845 | case DRX_STANDARD_ITU_B: |
|---|
| 2846 | 2846 | rc = drxj_dap_write_reg16(dev_addr, FEC_OC_FCT_USAGE__A, FEC_OC_FCT_USAGE__PRE, 0); |
|---|
| 2847 | 2847 | if (rc != 0) { |
|---|
| .. | .. |
|---|
| 2894 | 2894 | break; |
|---|
| 2895 | 2895 | default: |
|---|
| 2896 | 2896 | break; |
|---|
| 2897 | | - } /* swtich (standard) */ |
|---|
| 2897 | + } /* switch (standard) */ |
|---|
| 2898 | 2898 | |
|---|
| 2899 | 2899 | /* Check insertion of the Reed-Solomon parity bytes */ |
|---|
| 2900 | 2900 | rc = drxj_dap_read_reg16(dev_addr, FEC_OC_MODE__A, &fec_oc_reg_mode, 0); |
|---|
| .. | .. |
|---|
| 3555 | 3555 | if (!ext_attr->has_smatx) |
|---|
| 3556 | 3556 | return -EIO; |
|---|
| 3557 | 3557 | switch (uio_cfg->mode) { |
|---|
| 3558 | | - case DRX_UIO_MODE_FIRMWARE_SMA: /* falltrough */ |
|---|
| 3559 | | - case DRX_UIO_MODE_FIRMWARE_SAW: /* falltrough */ |
|---|
| 3558 | + case DRX_UIO_MODE_FIRMWARE_SMA: |
|---|
| 3559 | + case DRX_UIO_MODE_FIRMWARE_SAW: |
|---|
| 3560 | 3560 | case DRX_UIO_MODE_READWRITE: |
|---|
| 3561 | 3561 | ext_attr->uio_sma_tx_mode = uio_cfg->mode; |
|---|
| 3562 | 3562 | break; |
|---|
| .. | .. |
|---|
| 3579 | 3579 | if (!ext_attr->has_smarx) |
|---|
| 3580 | 3580 | return -EIO; |
|---|
| 3581 | 3581 | switch (uio_cfg->mode) { |
|---|
| 3582 | | - case DRX_UIO_MODE_FIRMWARE0: /* falltrough */ |
|---|
| 3582 | + case DRX_UIO_MODE_FIRMWARE0: |
|---|
| 3583 | 3583 | case DRX_UIO_MODE_READWRITE: |
|---|
| 3584 | 3584 | ext_attr->uio_sma_rx_mode = uio_cfg->mode; |
|---|
| 3585 | 3585 | break; |
|---|
| .. | .. |
|---|
| 3603 | 3603 | if (!ext_attr->has_gpio) |
|---|
| 3604 | 3604 | return -EIO; |
|---|
| 3605 | 3605 | switch (uio_cfg->mode) { |
|---|
| 3606 | | - case DRX_UIO_MODE_FIRMWARE0: /* falltrough */ |
|---|
| 3606 | + case DRX_UIO_MODE_FIRMWARE0: |
|---|
| 3607 | 3607 | case DRX_UIO_MODE_READWRITE: |
|---|
| 3608 | 3608 | ext_attr->uio_gpio_mode = uio_cfg->mode; |
|---|
| 3609 | 3609 | break; |
|---|
| .. | .. |
|---|
| 3639 | 3639 | } |
|---|
| 3640 | 3640 | ext_attr->uio_irqn_mode = uio_cfg->mode; |
|---|
| 3641 | 3641 | break; |
|---|
| 3642 | | - case DRX_UIO_MODE_FIRMWARE0: /* falltrough */ |
|---|
| 3642 | + case DRX_UIO_MODE_FIRMWARE0: |
|---|
| 3643 | 3643 | default: |
|---|
| 3644 | 3644 | return -EINVAL; |
|---|
| 3645 | 3645 | break; |
|---|
| .. | .. |
|---|
| 4004 | 4004 | if (rc != 0) { |
|---|
| 4005 | 4005 | pr_err("error %d\n", rc); |
|---|
| 4006 | 4006 | goto rw_error; |
|---|
| 4007 | | - } /* fallthrough */ |
|---|
| 4007 | + } |
|---|
| 4008 | + fallthrough; |
|---|
| 4008 | 4009 | case 4: |
|---|
| 4009 | 4010 | rc = drxj_dap_write_reg16(dev_addr, SCU_RAM_PARAM_3__A, *(cmd->parameter + 3), 0); |
|---|
| 4010 | 4011 | if (rc != 0) { |
|---|
| 4011 | 4012 | pr_err("error %d\n", rc); |
|---|
| 4012 | 4013 | goto rw_error; |
|---|
| 4013 | | - } /* fallthrough */ |
|---|
| 4014 | + } |
|---|
| 4015 | + fallthrough; |
|---|
| 4014 | 4016 | case 3: |
|---|
| 4015 | 4017 | rc = drxj_dap_write_reg16(dev_addr, SCU_RAM_PARAM_2__A, *(cmd->parameter + 2), 0); |
|---|
| 4016 | 4018 | if (rc != 0) { |
|---|
| 4017 | 4019 | pr_err("error %d\n", rc); |
|---|
| 4018 | 4020 | goto rw_error; |
|---|
| 4019 | | - } /* fallthrough */ |
|---|
| 4021 | + } |
|---|
| 4022 | + fallthrough; |
|---|
| 4020 | 4023 | case 2: |
|---|
| 4021 | 4024 | rc = drxj_dap_write_reg16(dev_addr, SCU_RAM_PARAM_1__A, *(cmd->parameter + 1), 0); |
|---|
| 4022 | 4025 | if (rc != 0) { |
|---|
| 4023 | 4026 | pr_err("error %d\n", rc); |
|---|
| 4024 | 4027 | goto rw_error; |
|---|
| 4025 | | - } /* fallthrough */ |
|---|
| 4028 | + } |
|---|
| 4029 | + fallthrough; |
|---|
| 4026 | 4030 | case 1: |
|---|
| 4027 | 4031 | rc = drxj_dap_write_reg16(dev_addr, SCU_RAM_PARAM_0__A, *(cmd->parameter + 0), 0); |
|---|
| 4028 | 4032 | if (rc != 0) { |
|---|
| 4029 | 4033 | pr_err("error %d\n", rc); |
|---|
| 4030 | 4034 | goto rw_error; |
|---|
| 4031 | | - } /* fallthrough */ |
|---|
| 4035 | + } |
|---|
| 4036 | + fallthrough; |
|---|
| 4032 | 4037 | case 0: |
|---|
| 4033 | 4038 | /* do nothing */ |
|---|
| 4034 | 4039 | break; |
|---|
| .. | .. |
|---|
| 4068 | 4073 | if (rc != 0) { |
|---|
| 4069 | 4074 | pr_err("error %d\n", rc); |
|---|
| 4070 | 4075 | goto rw_error; |
|---|
| 4071 | | - } /* fallthrough */ |
|---|
| 4076 | + } |
|---|
| 4077 | + fallthrough; |
|---|
| 4072 | 4078 | case 3: |
|---|
| 4073 | 4079 | rc = drxj_dap_read_reg16(dev_addr, SCU_RAM_PARAM_2__A, cmd->result + 2, 0); |
|---|
| 4074 | 4080 | if (rc != 0) { |
|---|
| 4075 | 4081 | pr_err("error %d\n", rc); |
|---|
| 4076 | 4082 | goto rw_error; |
|---|
| 4077 | | - } /* fallthrough */ |
|---|
| 4083 | + } |
|---|
| 4084 | + fallthrough; |
|---|
| 4078 | 4085 | case 2: |
|---|
| 4079 | 4086 | rc = drxj_dap_read_reg16(dev_addr, SCU_RAM_PARAM_1__A, cmd->result + 1, 0); |
|---|
| 4080 | 4087 | if (rc != 0) { |
|---|
| 4081 | 4088 | pr_err("error %d\n", rc); |
|---|
| 4082 | 4089 | goto rw_error; |
|---|
| 4083 | | - } /* fallthrough */ |
|---|
| 4090 | + } |
|---|
| 4091 | + fallthrough; |
|---|
| 4084 | 4092 | case 1: |
|---|
| 4085 | 4093 | rc = drxj_dap_read_reg16(dev_addr, SCU_RAM_PARAM_0__A, cmd->result + 0, 0); |
|---|
| 4086 | 4094 | if (rc != 0) { |
|---|
| 4087 | 4095 | pr_err("error %d\n", rc); |
|---|
| 4088 | 4096 | goto rw_error; |
|---|
| 4089 | | - } /* fallthrough */ |
|---|
| 4097 | + } |
|---|
| 4098 | + fallthrough; |
|---|
| 4090 | 4099 | case 0: |
|---|
| 4091 | 4100 | /* do nothing */ |
|---|
| 4092 | 4101 | break; |
|---|
| .. | .. |
|---|
| 4127 | 4136 | * \param datasize size of data buffer in bytes |
|---|
| 4128 | 4137 | * \param data pointer to data buffer |
|---|
| 4129 | 4138 | * \return int |
|---|
| 4130 | | -* \retval 0 Succes |
|---|
| 4139 | +* \retval 0 Success |
|---|
| 4131 | 4140 | * \retval -EIO Timeout, I2C error, illegal bank |
|---|
| 4132 | 4141 | * |
|---|
| 4133 | 4142 | */ |
|---|
| .. | .. |
|---|
| 4201 | 4210 | u16 *data, u32 flags) |
|---|
| 4202 | 4211 | { |
|---|
| 4203 | 4212 | u8 buf[2] = { 0 }; |
|---|
| 4204 | | - int rc = -EIO; |
|---|
| 4213 | + int rc; |
|---|
| 4205 | 4214 | u16 word = 0; |
|---|
| 4206 | 4215 | |
|---|
| 4207 | 4216 | if (!data) |
|---|
| .. | .. |
|---|
| 4229 | 4238 | u16 data, u32 flags) |
|---|
| 4230 | 4239 | { |
|---|
| 4231 | 4240 | u8 buf[2]; |
|---|
| 4232 | | - int rc = -EIO; |
|---|
| 4241 | + int rc; |
|---|
| 4233 | 4242 | |
|---|
| 4234 | 4243 | buf[0] = (u8) (data & 0xff); |
|---|
| 4235 | 4244 | buf[1] = (u8) ((data >> 8) & 0xff); |
|---|
| .. | .. |
|---|
| 4791 | 4800 | Sound carrier is already 3Mhz above centre frequency due |
|---|
| 4792 | 4801 | to tuner setting so now add an extra shift of 1MHz... */ |
|---|
| 4793 | 4802 | fm_frequency_shift = 1000; |
|---|
| 4794 | | - /*fall through */ |
|---|
| 4803 | + fallthrough; |
|---|
| 4795 | 4804 | case DRX_STANDARD_ITU_B: |
|---|
| 4796 | 4805 | case DRX_STANDARD_NTSC: |
|---|
| 4797 | 4806 | case DRX_STANDARD_PAL_SECAM_BG: |
|---|
| .. | .. |
|---|
| 8989 | 8998 | ((jiffies_to_msecs(jiffies) - start_time) < |
|---|
| 8990 | 8999 | (DRXJ_QAM_MAX_WAITTIME + timeout_ofs)) |
|---|
| 8991 | 9000 | ); |
|---|
| 8992 | | - /* Returning control to apllication ... */ |
|---|
| 9001 | + /* Returning control to application ... */ |
|---|
| 8993 | 9002 | |
|---|
| 8994 | 9003 | return 0; |
|---|
| 8995 | 9004 | rw_error: |
|---|
| .. | .. |
|---|
| 9309 | 9318 | return -EINVAL; |
|---|
| 9310 | 9319 | |
|---|
| 9311 | 9320 | /* all reported errors are received in the */ |
|---|
| 9312 | | - /* most recently finished measurment period */ |
|---|
| 9321 | + /* most recently finished measurement period */ |
|---|
| 9313 | 9322 | /* no of pre RS bit errors */ |
|---|
| 9314 | 9323 | rc = drxj_dap_read_reg16(dev_addr, FEC_RS_NR_BIT_ERRORS__A, &nr_bit_errors, 0); |
|---|
| 9315 | 9324 | if (rc != 0) { |
|---|
| .. | .. |
|---|
| 9689 | 9698 | (3) SIF AGC (used to amplify the output signal in case input to low) |
|---|
| 9690 | 9699 | |
|---|
| 9691 | 9700 | The SIF AGC is now coupled to the RF/IF AGCs. |
|---|
| 9692 | | - The SIF AGC is needed for both SIF ouput and the internal SIF signal to |
|---|
| 9701 | + The SIF AGC is needed for both SIF output and the internal SIF signal to |
|---|
| 9693 | 9702 | the AUD block. |
|---|
| 9694 | 9703 | |
|---|
| 9695 | 9704 | RF and IF AGCs DACs are part of AFE, Video and SIF AGC DACs are part of |
|---|
| .. | .. |
|---|
| 9702 | 9711 | later on because of the schedule) |
|---|
| 9703 | 9712 | |
|---|
| 9704 | 9713 | Several HW/SCU "settings" can be used for ATV. The standard selection |
|---|
| 9705 | | - will reset most of these settings. To avoid that the end user apllication |
|---|
| 9714 | + will reset most of these settings. To avoid that the end user application |
|---|
| 9706 | 9715 | has to perform these settings each time the ATV or FM standards is |
|---|
| 9707 | 9716 | selected the driver will shadow these settings. This enables the end user |
|---|
| 9708 | 9717 | to perform the settings only once after a drx_open(). The driver must |
|---|
| 9709 | | - write the shadow settings to HW/SCU incase: |
|---|
| 9718 | + write the shadow settings to HW/SCU in case: |
|---|
| 9710 | 9719 | ( setstandard FM/ATV) || |
|---|
| 9711 | 9720 | ( settings have changed && FM/ATV standard is active) |
|---|
| 9712 | 9721 | The shadow settings will be stored in the device specific data container. |
|---|
| .. | .. |
|---|
| 9908 | 9917 | #define IMPULSE_COSINE_ALPHA_0_5 { 2, 0, -2, -2, 2, 5, 2, -10, -20, -14, 20, 74, 125, 145} /*sqrt raised-cosine filter with alpha=0.5 */ |
|---|
| 9909 | 9918 | #define IMPULSE_COSINE_ALPHA_RO_0_5 { 0, 0, 1, 2, 3, 0, -7, -15, -16, 0, 34, 77, 114, 128} /*full raised-cosine filter with alpha=0.5 (receiver only) */ |
|---|
| 9910 | 9919 | |
|---|
| 9911 | | -/* Coefficients for the nyquist fitler (total: 27 taps) */ |
|---|
| 9920 | +/* Coefficients for the nyquist filter (total: 27 taps) */ |
|---|
| 9912 | 9921 | #define NYQFILTERLEN 27 |
|---|
| 9913 | 9922 | |
|---|
| 9914 | 9923 | static int ctrl_set_oob(struct drx_demod_instance *demod, struct drxoob *oob_param) |
|---|
| .. | .. |
|---|
| 10475 | 10484 | (standard == DRX_STANDARD_NTSC)) { |
|---|
| 10476 | 10485 | switch (channel->bandwidth) { |
|---|
| 10477 | 10486 | case DRX_BANDWIDTH_6MHZ: |
|---|
| 10478 | | - case DRX_BANDWIDTH_UNKNOWN: /* fall through */ |
|---|
| 10487 | + case DRX_BANDWIDTH_UNKNOWN: |
|---|
| 10479 | 10488 | channel->bandwidth = DRX_BANDWIDTH_6MHZ; |
|---|
| 10480 | 10489 | break; |
|---|
| 10481 | | - case DRX_BANDWIDTH_8MHZ: /* fall through */ |
|---|
| 10482 | | - case DRX_BANDWIDTH_7MHZ: /* fall through */ |
|---|
| 10490 | + case DRX_BANDWIDTH_8MHZ: |
|---|
| 10491 | + case DRX_BANDWIDTH_7MHZ: |
|---|
| 10483 | 10492 | default: |
|---|
| 10484 | 10493 | return -EINVAL; |
|---|
| 10485 | 10494 | } |
|---|
| .. | .. |
|---|
| 10511 | 10520 | } |
|---|
| 10512 | 10521 | |
|---|
| 10513 | 10522 | switch (channel->constellation) { |
|---|
| 10514 | | - case DRX_CONSTELLATION_QAM16: /* fall through */ |
|---|
| 10515 | | - case DRX_CONSTELLATION_QAM32: /* fall through */ |
|---|
| 10516 | | - case DRX_CONSTELLATION_QAM64: /* fall through */ |
|---|
| 10517 | | - case DRX_CONSTELLATION_QAM128: /* fall through */ |
|---|
| 10523 | + case DRX_CONSTELLATION_QAM16: |
|---|
| 10524 | + case DRX_CONSTELLATION_QAM32: |
|---|
| 10525 | + case DRX_CONSTELLATION_QAM64: |
|---|
| 10526 | + case DRX_CONSTELLATION_QAM128: |
|---|
| 10518 | 10527 | case DRX_CONSTELLATION_QAM256: |
|---|
| 10519 | 10528 | bandwidth_temp = channel->symbolrate * bw_rolloff_factor; |
|---|
| 10520 | 10529 | bandwidth = bandwidth_temp / 100; |
|---|
| .. | .. |
|---|
| 10628 | 10637 | } |
|---|
| 10629 | 10638 | break; |
|---|
| 10630 | 10639 | #ifndef DRXJ_VSB_ONLY |
|---|
| 10631 | | - case DRX_STANDARD_ITU_A: /* fallthrough */ |
|---|
| 10632 | | - case DRX_STANDARD_ITU_B: /* fallthrough */ |
|---|
| 10640 | + case DRX_STANDARD_ITU_A: |
|---|
| 10641 | + case DRX_STANDARD_ITU_B: |
|---|
| 10633 | 10642 | case DRX_STANDARD_ITU_C: |
|---|
| 10634 | 10643 | rc = set_qam_channel(demod, channel, tuner_freq_offset); |
|---|
| 10635 | 10644 | if (rc != 0) { |
|---|
| .. | .. |
|---|
| 10820 | 10829 | SCU_RAM_COMMAND_CMD_DEMOD_GET_LOCK; |
|---|
| 10821 | 10830 | break; |
|---|
| 10822 | 10831 | #endif |
|---|
| 10823 | | - case DRX_STANDARD_UNKNOWN: /* fallthrough */ |
|---|
| 10832 | + case DRX_STANDARD_UNKNOWN: |
|---|
| 10824 | 10833 | default: |
|---|
| 10825 | 10834 | return -EIO; |
|---|
| 10826 | 10835 | } |
|---|
| .. | .. |
|---|
| 10888 | 10897 | */ |
|---|
| 10889 | 10898 | switch (prev_standard) { |
|---|
| 10890 | 10899 | #ifndef DRXJ_VSB_ONLY |
|---|
| 10891 | | - case DRX_STANDARD_ITU_A: /* fallthrough */ |
|---|
| 10892 | | - case DRX_STANDARD_ITU_B: /* fallthrough */ |
|---|
| 10900 | + case DRX_STANDARD_ITU_A: |
|---|
| 10901 | + case DRX_STANDARD_ITU_B: |
|---|
| 10893 | 10902 | case DRX_STANDARD_ITU_C: |
|---|
| 10894 | 10903 | rc = power_down_qam(demod, false); |
|---|
| 10895 | 10904 | if (rc != 0) { |
|---|
| .. | .. |
|---|
| 10908 | 10917 | case DRX_STANDARD_UNKNOWN: |
|---|
| 10909 | 10918 | /* Do nothing */ |
|---|
| 10910 | 10919 | break; |
|---|
| 10911 | | - case DRX_STANDARD_AUTO: /* fallthrough */ |
|---|
| 10920 | + case DRX_STANDARD_AUTO: |
|---|
| 10912 | 10921 | default: |
|---|
| 10913 | 10922 | return -EINVAL; |
|---|
| 10914 | 10923 | } |
|---|
| .. | .. |
|---|
| 10921 | 10930 | |
|---|
| 10922 | 10931 | switch (*standard) { |
|---|
| 10923 | 10932 | #ifndef DRXJ_VSB_ONLY |
|---|
| 10924 | | - case DRX_STANDARD_ITU_A: /* fallthrough */ |
|---|
| 10925 | | - case DRX_STANDARD_ITU_B: /* fallthrough */ |
|---|
| 10933 | + case DRX_STANDARD_ITU_A: |
|---|
| 10934 | + case DRX_STANDARD_ITU_B: |
|---|
| 10926 | 10935 | case DRX_STANDARD_ITU_C: |
|---|
| 10927 | 10936 | do { |
|---|
| 10928 | 10937 | u16 dummy; |
|---|
| .. | .. |
|---|
| 11111 | 11120 | goto rw_error; |
|---|
| 11112 | 11121 | } |
|---|
| 11113 | 11122 | break; |
|---|
| 11114 | | - case DRX_STANDARD_PAL_SECAM_BG: /* fallthrough */ |
|---|
| 11115 | | - case DRX_STANDARD_PAL_SECAM_DK: /* fallthrough */ |
|---|
| 11116 | | - case DRX_STANDARD_PAL_SECAM_I: /* fallthrough */ |
|---|
| 11117 | | - case DRX_STANDARD_PAL_SECAM_L: /* fallthrough */ |
|---|
| 11118 | | - case DRX_STANDARD_PAL_SECAM_LP: /* fallthrough */ |
|---|
| 11119 | | - case DRX_STANDARD_NTSC: /* fallthrough */ |
|---|
| 11123 | + case DRX_STANDARD_PAL_SECAM_BG: |
|---|
| 11124 | + case DRX_STANDARD_PAL_SECAM_DK: |
|---|
| 11125 | + case DRX_STANDARD_PAL_SECAM_I: |
|---|
| 11126 | + case DRX_STANDARD_PAL_SECAM_L: |
|---|
| 11127 | + case DRX_STANDARD_PAL_SECAM_LP: |
|---|
| 11128 | + case DRX_STANDARD_NTSC: |
|---|
| 11120 | 11129 | case DRX_STANDARD_FM: |
|---|
| 11121 | 11130 | rc = power_down_atv(demod, ext_attr->standard, true); |
|---|
| 11122 | 11131 | if (rc != 0) { |
|---|
| .. | .. |
|---|
| 11127 | 11136 | case DRX_STANDARD_UNKNOWN: |
|---|
| 11128 | 11137 | /* Do nothing */ |
|---|
| 11129 | 11138 | break; |
|---|
| 11130 | | - case DRX_STANDARD_AUTO: /* fallthrough */ |
|---|
| 11139 | + case DRX_STANDARD_AUTO: |
|---|
| 11131 | 11140 | default: |
|---|
| 11132 | 11141 | return -EIO; |
|---|
| 11133 | 11142 | } |
|---|
| .. | .. |
|---|
| 11220 | 11229 | ext_attr->vsb_pre_saw_cfg = *pre_saw; |
|---|
| 11221 | 11230 | break; |
|---|
| 11222 | 11231 | #ifndef DRXJ_VSB_ONLY |
|---|
| 11223 | | - case DRX_STANDARD_ITU_A: /* fallthrough */ |
|---|
| 11224 | | - case DRX_STANDARD_ITU_B: /* fallthrough */ |
|---|
| 11232 | + case DRX_STANDARD_ITU_A: |
|---|
| 11233 | + case DRX_STANDARD_ITU_B: |
|---|
| 11225 | 11234 | case DRX_STANDARD_ITU_C: |
|---|
| 11226 | 11235 | ext_attr->qam_pre_saw_cfg = *pre_saw; |
|---|
| 11227 | 11236 | break; |
|---|
| .. | .. |
|---|
| 11264 | 11273 | ext_attr = (struct drxj_data *) demod->my_ext_attr; |
|---|
| 11265 | 11274 | |
|---|
| 11266 | 11275 | switch (afe_gain->standard) { |
|---|
| 11267 | | - case DRX_STANDARD_8VSB: /* fallthrough */ |
|---|
| 11276 | + case DRX_STANDARD_8VSB: fallthrough; |
|---|
| 11268 | 11277 | #ifndef DRXJ_VSB_ONLY |
|---|
| 11269 | | - case DRX_STANDARD_ITU_A: /* fallthrough */ |
|---|
| 11270 | | - case DRX_STANDARD_ITU_B: /* fallthrough */ |
|---|
| 11278 | + case DRX_STANDARD_ITU_A: |
|---|
| 11279 | + case DRX_STANDARD_ITU_B: |
|---|
| 11271 | 11280 | case DRX_STANDARD_ITU_C: |
|---|
| 11272 | 11281 | #endif |
|---|
| 11273 | 11282 | /* Do nothing */ |
|---|
| .. | .. |
|---|
| 11301 | 11310 | ext_attr->vsb_pga_cfg = gain * 13 + 140; |
|---|
| 11302 | 11311 | break; |
|---|
| 11303 | 11312 | #ifndef DRXJ_VSB_ONLY |
|---|
| 11304 | | - case DRX_STANDARD_ITU_A: /* fallthrough */ |
|---|
| 11305 | | - case DRX_STANDARD_ITU_B: /* fallthrough */ |
|---|
| 11313 | + case DRX_STANDARD_ITU_A: |
|---|
| 11314 | + case DRX_STANDARD_ITU_B: |
|---|
| 11306 | 11315 | case DRX_STANDARD_ITU_C: |
|---|
| 11307 | 11316 | ext_attr->qam_pga_cfg = gain * 13 + 140; |
|---|
| 11308 | 11317 | break; |
|---|
| .. | .. |
|---|
| 12287 | 12296 | if (state == NULL) |
|---|
| 12288 | 12297 | goto error; |
|---|
| 12289 | 12298 | |
|---|
| 12290 | | - demod = kmalloc(sizeof(struct drx_demod_instance), GFP_KERNEL); |
|---|
| 12299 | + demod = kmemdup(&drxj_default_demod_g, |
|---|
| 12300 | + sizeof(struct drx_demod_instance), GFP_KERNEL); |
|---|
| 12291 | 12301 | if (demod == NULL) |
|---|
| 12292 | 12302 | goto error; |
|---|
| 12293 | 12303 | |
|---|
| .. | .. |
|---|
| 12311 | 12321 | state->demod = demod; |
|---|
| 12312 | 12322 | |
|---|
| 12313 | 12323 | /* setup the demod data */ |
|---|
| 12314 | | - memcpy(demod, &drxj_default_demod_g, sizeof(struct drx_demod_instance)); |
|---|
| 12315 | | - |
|---|
| 12316 | 12324 | demod->my_i2c_dev_addr = demod_addr; |
|---|
| 12317 | 12325 | demod->my_common_attr = demod_comm_attr; |
|---|
| 12318 | 12326 | demod->my_i2c_dev_addr->user_data = state; |
|---|
| .. | .. |
|---|
| 12367 | 12375 | |
|---|
| 12368 | 12376 | return NULL; |
|---|
| 12369 | 12377 | } |
|---|
| 12370 | | -EXPORT_SYMBOL(drx39xxj_attach); |
|---|
| 12378 | +EXPORT_SYMBOL_GPL(drx39xxj_attach); |
|---|
| 12371 | 12379 | |
|---|
| 12372 | 12380 | static const struct dvb_frontend_ops drx39xxj_ops = { |
|---|
| 12373 | 12381 | .delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B }, |
|---|