Lines Matching +full:vout +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0
3 // Driver for LNB supply and control IC STMicroelectronics LNBH29
15 * struct lnbh29_priv - LNBH29 driver private data
47 .addr = priv->i2c_address, in lnbh29_read_vmon()
52 .addr = priv->i2c_address, in lnbh29_read_vmon()
59 ret = i2c_transfer(priv->i2c, msg, 2); in lnbh29_read_vmon()
61 ret = -EIO; in lnbh29_read_vmon()
63 dev_dbg(&priv->i2c->dev, "LNBH29 I2C transfer failed (%d)\n", in lnbh29_read_vmon()
69 dev_err(&priv->i2c->dev, in lnbh29_read_vmon()
72 return -EIO; in lnbh29_read_vmon()
81 struct lnbh29_priv *priv = fe->sec_priv; in lnbh29_set_voltage()
85 .addr = priv->i2c_address, in lnbh29_set_voltage()
87 .len = sizeof(priv->config), in lnbh29_set_voltage()
88 .buf = priv->config in lnbh29_set_voltage()
102 return -EINVAL; in lnbh29_set_voltage()
104 priv->config[1] &= ~LNBH29_VSEL_MASK; in lnbh29_set_voltage()
105 priv->config[1] |= data_reg; in lnbh29_set_voltage()
107 ret = i2c_transfer(priv->i2c, &msg, 1); in lnbh29_set_voltage()
109 ret = -EIO; in lnbh29_set_voltage()
111 dev_err(&priv->i2c->dev, "LNBH29 I2C transfer error (%d)\n", in lnbh29_set_voltage()
116 /* Soft-start time (Vout 0V to 18V) is Typ. 6ms. */ in lnbh29_set_voltage()
128 kfree(fe->sec_priv); in lnbh29_release()
129 fe->sec_priv = NULL; in lnbh29_release()
142 priv->i2c_address = (cfg->i2c_address >> 1); in lnbh29_attach()
143 priv->i2c = i2c; in lnbh29_attach()
144 priv->config[0] = 0x01; in lnbh29_attach()
145 priv->config[1] = cfg->data_config; in lnbh29_attach()
146 fe->sec_priv = priv; in lnbh29_attach()
149 dev_err(&i2c->dev, "no LNBH29 found at I2C addr 0x%02x\n", in lnbh29_attach()
150 priv->i2c_address); in lnbh29_attach()
152 fe->sec_priv = NULL; in lnbh29_attach()
156 fe->ops.release_sec = lnbh29_release; in lnbh29_attach()
157 fe->ops.set_voltage = lnbh29_set_voltage; in lnbh29_attach()
159 dev_info(&i2c->dev, "LNBH29 attached at I2C addr 0x%02x\n", in lnbh29_attach()
160 priv->i2c_address); in lnbh29_attach()