afe_write
afe_write(sd, 0xc8, ctrl->val);
afe_write(sd, 0x00, 0x08); /* power up ADC */
afe_write(sd, 0x01, 0x06); /* power up Analog Front End */
afe_write(sd, 0xc8, 0x00); /* phase control */
afe_write(sd, 0x00, 0xff); /* power down ADC */
afe_write(sd, 0x01, 0xfe); /* power down Analog Front End */
afe_write(sd, 0xc8, 0x40); /* phase control */
afe_write(sd, 0xb5, 0x01); /* Setting MCLK to 256Fs */
afe_write(sd, 0x02, pdata->ain_sel); /* Select analog input muxing mode */
afe_write(sd, 0xc8, ctrl->val);
afe_write(sd, 0x00, 0x00); /* power up ADC */
afe_write(sd, 0xc8, 0x00); /* phase control */
afe_write(sd, 0x03, 0xa0); /* ADC0 to AIN10 (CVBS), ADC1 N/C*/
afe_write(sd, 0x04, 0x00); /* ADC2 N/C,ADC3 N/C*/
afe_write(sd, 0x03, 0xa0); /* ADC0 to AIN10 (CVBS), ADC1 N/C*/
afe_write(sd, 0x04, 0xc0); /* ADC2 to AIN12, ADC3 N/C*/
afe_write(sd, 0x0c, 0x1f); /* ADI recommend write */
afe_write(sd, 0x12, 0x63); /* ADI recommend write */
afe_write(sd, 0x00, 0x00); /* power up ADC */
afe_write(sd, 0xc8, 0x00); /* phase control */
afe_write(sd, 0x0c, 0x1f); /* ADC Range improvement */
afe_write(sd, 0x12, 0x63); /* ADC Range improvement */
afe_write(sd, 0x00, 0xff); /* power down ADC */
afe_write(sd, 0xc8, 0x40); /* phase control */
afe_write(sd, 0x12, 0xfb); /* ADC noise shaping filter controls */
afe_write(sd, 0x0c, 0x0d); /* CP core gain controls */
afe_write(sd, 0xb5, 0x01); /* Setting MCLK to 256Fs */
afe_write(sd, 0x02, pdata->ain_sel); /* Select analog input muxing mode */
afe_write(sd, 0x80, 0x92); /* SDP Recommended Write */
afe_write(sd, 0x9B, 0x01); /* SDP Recommended Write ADV7844ES1 */
afe_write(sd, 0x9C, 0x60); /* SDP Recommended Write ADV7844ES1 */
afe_write(sd, 0x9E, 0x02); /* SDP Recommended Write ADV7844ES1 */
afe_write(sd, 0xA0, 0x0B); /* SDP Recommended Write ADV7844ES1 */
afe_write(sd, 0xC3, 0x02); /* Memory BIST Initialisation */
return afe_write(sd, reg, (afe_read(sd, reg) & mask) | val);
afe_write(sd, reg->reg & 0xff, val);