[PATCH 3/4] Modifications to the driver mb86a20s‏

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch implements some modifications in the function

This patch implements some modifications in the initialization function of the mb86a20s.

Explanation:

Several registers of mb86a20s can be programmed and to simplify this task and due to lack of technical literature to elaborate the necessary calculations was opted by the sending of values already ready for the registers, eliminating the process of calculations.
The technique is quite simple: to each register that can be modified an identification (REGxxxx_IDCFG) was attributed and those that do not need modification was attributed REG_IDCFG_NONE.

The device that uses the demodulator mb86a20s simply informs the registers to be modified through the configuration parameter of the function frontend_attach.

Like in the example:

static struct mb86a20s_config_regs_val mb86a20s_config_regs[] = {
    { REG2820_IDCFG, 0x33ddcd },
    { REG50D5_IDCFG, 0x00 },    /* use output TS parallel */
    { REG50D6_IDCFG, 0x17 }
};

static struct mb86a20s_config mb86a20s_cfg = {
    .demod_address = DEMOD_I2C_ADDR,
    .config_regs_size = ARRAY_SIZE(mb86a20s_config_regs),
    .config_regs = mb86a20s_config_regs,
};

If there are no registers to be modified to do just this:

static struct mb86a20s_config mb86a20s_cfg = {
    .demod_address = DEMOD_I2C_ADDR,
};

static int tbs_dtb08_frontend_attach(struct dvb_usb_adapter *adap)
{
    adap->fe = dvb_attach(mb86a20s_attach, &mb86a20s_cfg, &adap->dev->i2c_adap);
    if (adap->fe) {
        frontend_tuner_attach(adap);
    }
}



Signed-off-by: Manoel Pinheiro <pinusdtv@xxxxxxxxxxx>



 		 	   		  

Attachment: regs_init.patch
Description: Binary data


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux