Lines Matching refs:lnbp21
39 struct lnbp21 { struct
50 struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->sec_priv; in lnbp21_set_voltage() argument
51 struct i2c_msg msg = { .addr = lnbp21->i2c_addr, .flags = 0, in lnbp21_set_voltage()
52 .buf = &lnbp21->config, in lnbp21_set_voltage()
53 .len = sizeof(lnbp21->config) }; in lnbp21_set_voltage()
55 lnbp21->config &= ~(LNBP21_VSEL | LNBP21_EN); in lnbp21_set_voltage()
61 lnbp21->config |= LNBP21_EN; in lnbp21_set_voltage()
64 lnbp21->config |= (LNBP21_EN | LNBP21_VSEL); in lnbp21_set_voltage()
70 lnbp21->config |= lnbp21->override_or; in lnbp21_set_voltage()
71 lnbp21->config &= lnbp21->override_and; in lnbp21_set_voltage()
73 return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; in lnbp21_set_voltage()
78 struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->sec_priv; in lnbp21_enable_high_lnb_voltage() local
79 struct i2c_msg msg = { .addr = lnbp21->i2c_addr, .flags = 0, in lnbp21_enable_high_lnb_voltage()
80 .buf = &lnbp21->config, in lnbp21_enable_high_lnb_voltage()
81 .len = sizeof(lnbp21->config) }; in lnbp21_enable_high_lnb_voltage()
84 lnbp21->config |= LNBP21_LLC; in lnbp21_enable_high_lnb_voltage()
86 lnbp21->config &= ~LNBP21_LLC; in lnbp21_enable_high_lnb_voltage()
88 lnbp21->config |= lnbp21->override_or; in lnbp21_enable_high_lnb_voltage()
89 lnbp21->config &= lnbp21->override_and; in lnbp21_enable_high_lnb_voltage()
91 return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; in lnbp21_enable_high_lnb_voltage()
97 struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->sec_priv; in lnbp21_set_tone() local
98 struct i2c_msg msg = { .addr = lnbp21->i2c_addr, .flags = 0, in lnbp21_set_tone()
99 .buf = &lnbp21->config, in lnbp21_set_tone()
100 .len = sizeof(lnbp21->config) }; in lnbp21_set_tone()
104 lnbp21->config &= ~LNBP21_TEN; in lnbp21_set_tone()
107 lnbp21->config |= LNBP21_TEN; in lnbp21_set_tone()
113 lnbp21->config |= lnbp21->override_or; in lnbp21_set_tone()
114 lnbp21->config &= lnbp21->override_and; in lnbp21_set_tone()
116 return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; in lnbp21_set_tone()
133 struct lnbp21 *lnbp21 = kmalloc(sizeof(struct lnbp21), GFP_KERNEL); in lnbx2x_attach() local
134 if (!lnbp21) in lnbx2x_attach()
138 lnbp21->config = config; in lnbx2x_attach()
139 lnbp21->i2c = i2c; in lnbx2x_attach()
140 lnbp21->i2c_addr = i2c_addr; in lnbx2x_attach()
141 fe->sec_priv = lnbp21; in lnbx2x_attach()
144 lnbp21->override_or = override_set; in lnbx2x_attach()
147 lnbp21->override_and = ~override_clear; in lnbx2x_attach()
151 kfree(lnbp21); in lnbx2x_attach()
163 printk(KERN_INFO "LNBx2x attached on addr=%x\n", lnbp21->i2c_addr); in lnbx2x_attach()