Lines Matching refs:lnbp21
22 struct lnbp21 { struct
33 struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->sec_priv; in lnbp21_set_voltage() local
34 struct i2c_msg msg = { .addr = lnbp21->i2c_addr, .flags = 0, in lnbp21_set_voltage()
35 .buf = &lnbp21->config, in lnbp21_set_voltage()
36 .len = sizeof(lnbp21->config) }; in lnbp21_set_voltage()
38 lnbp21->config &= ~(LNBP21_VSEL | LNBP21_EN); in lnbp21_set_voltage()
44 lnbp21->config |= LNBP21_EN; in lnbp21_set_voltage()
47 lnbp21->config |= (LNBP21_EN | LNBP21_VSEL); in lnbp21_set_voltage()
53 lnbp21->config |= lnbp21->override_or; in lnbp21_set_voltage()
54 lnbp21->config &= lnbp21->override_and; in lnbp21_set_voltage()
56 return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; in lnbp21_set_voltage()
61 struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->sec_priv; in lnbp21_enable_high_lnb_voltage() local
62 struct i2c_msg msg = { .addr = lnbp21->i2c_addr, .flags = 0, in lnbp21_enable_high_lnb_voltage()
63 .buf = &lnbp21->config, in lnbp21_enable_high_lnb_voltage()
64 .len = sizeof(lnbp21->config) }; in lnbp21_enable_high_lnb_voltage()
67 lnbp21->config |= LNBP21_LLC; in lnbp21_enable_high_lnb_voltage()
69 lnbp21->config &= ~LNBP21_LLC; in lnbp21_enable_high_lnb_voltage()
71 lnbp21->config |= lnbp21->override_or; in lnbp21_enable_high_lnb_voltage()
72 lnbp21->config &= lnbp21->override_and; in lnbp21_enable_high_lnb_voltage()
74 return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; in lnbp21_enable_high_lnb_voltage()
80 struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->sec_priv; in lnbp21_set_tone() local
81 struct i2c_msg msg = { .addr = lnbp21->i2c_addr, .flags = 0, in lnbp21_set_tone()
82 .buf = &lnbp21->config, in lnbp21_set_tone()
83 .len = sizeof(lnbp21->config) }; in lnbp21_set_tone()
87 lnbp21->config &= ~LNBP21_TEN; in lnbp21_set_tone()
90 lnbp21->config |= LNBP21_TEN; in lnbp21_set_tone()
96 lnbp21->config |= lnbp21->override_or; in lnbp21_set_tone()
97 lnbp21->config &= lnbp21->override_and; in lnbp21_set_tone()
99 return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; in lnbp21_set_tone()
116 struct lnbp21 *lnbp21 = kmalloc(sizeof(struct lnbp21), GFP_KERNEL); in lnbx2x_attach() local
117 if (!lnbp21) in lnbx2x_attach()
121 lnbp21->config = config; in lnbx2x_attach()
122 lnbp21->i2c = i2c; in lnbx2x_attach()
123 lnbp21->i2c_addr = i2c_addr; in lnbx2x_attach()
124 fe->sec_priv = lnbp21; in lnbx2x_attach()
127 lnbp21->override_or = override_set; in lnbx2x_attach()
130 lnbp21->override_and = ~override_clear; in lnbx2x_attach()
134 kfree(lnbp21); in lnbx2x_attach()
146 printk(KERN_INFO "LNBx2x attached on addr=%x\n", lnbp21->i2c_addr); in lnbx2x_attach()