/drivers/regulator/ |
D | tps62360-regulator.c | 95 static bool find_voltage_set_register(struct tps62360_chip *tps, in find_voltage_set_register() argument 100 int new_vset_reg = tps->lru_index[3]; in find_voltage_set_register() 104 if (tps->curr_vset_vsel[tps->lru_index[i]] == req_vsel) { in find_voltage_set_register() 105 new_vset_reg = tps->lru_index[i]; in find_voltage_set_register() 114 tps->lru_index[i] = tps->lru_index[i - 1]; in find_voltage_set_register() 116 tps->lru_index[0] = new_vset_reg; in find_voltage_set_register() 123 struct tps62360_chip *tps = rdev_get_drvdata(dev); in tps62360_dcdc_get_voltage_sel() local 128 ret = regmap_read(tps->regmap, REG_VSET0 + tps->curr_vset_id, &data); in tps62360_dcdc_get_voltage_sel() 130 dev_err(tps->dev, "%s(): register %d read failed with err %d\n", in tps62360_dcdc_get_voltage_sel() 131 __func__, REG_VSET0 + tps->curr_vset_id, ret); in tps62360_dcdc_get_voltage_sel() [all …]
|
D | tps6507x-regulator.c | 122 static inline int tps6507x_pmic_read(struct tps6507x_pmic *tps, u8 reg) in tps6507x_pmic_read() argument 127 err = tps->mfd->read_dev(tps->mfd, reg, 1, &val); in tps6507x_pmic_read() 135 static inline int tps6507x_pmic_write(struct tps6507x_pmic *tps, u8 reg, u8 val) in tps6507x_pmic_write() argument 137 return tps->mfd->write_dev(tps->mfd, reg, 1, &val); in tps6507x_pmic_write() 140 static int tps6507x_pmic_set_bits(struct tps6507x_pmic *tps, u8 reg, u8 mask) in tps6507x_pmic_set_bits() argument 144 mutex_lock(&tps->io_lock); in tps6507x_pmic_set_bits() 146 data = tps6507x_pmic_read(tps, reg); in tps6507x_pmic_set_bits() 148 dev_err(tps->mfd->dev, "Read from reg 0x%x failed\n", reg); in tps6507x_pmic_set_bits() 154 err = tps6507x_pmic_write(tps, reg, data); in tps6507x_pmic_set_bits() 156 dev_err(tps->mfd->dev, "Write for reg 0x%x failed\n", reg); in tps6507x_pmic_set_bits() [all …]
|
D | tps51632-regulator.c | 96 struct tps51632_chip *tps = rdev_get_drvdata(rdev); in tps51632_dcdc_set_ramp_delay() local 105 ret = regmap_write(tps->regmap, TPS51632_SLEW_REGS, BIT(bit)); in tps51632_dcdc_set_ramp_delay() 107 dev_err(tps->dev, "SLEW reg write failed, err %d\n", ret); in tps51632_dcdc_set_ramp_delay() 119 static int tps51632_init_dcdc(struct tps51632_chip *tps, in tps51632_init_dcdc() argument 131 ret = regmap_write(tps->regmap, TPS51632_VOLTAGE_BASE_REG, vsel); in tps51632_init_dcdc() 133 dev_err(tps->dev, "BASE reg write failed, err %d\n", ret); in tps51632_init_dcdc() 148 ret = regmap_read(tps->regmap, TPS51632_VMAX_REG, &vmax); in tps51632_init_dcdc() 150 dev_err(tps->dev, "VMAX read failed, err %d\n", ret); in tps51632_init_dcdc() 155 ret = regmap_write(tps->regmap, TPS51632_VMAX_REG, in tps51632_init_dcdc() 158 dev_err(tps->dev, in tps51632_init_dcdc() [all …]
|
D | tps65217-regulator.c | 75 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_enable() local 82 return tps65217_set_bits(tps, TPS65217_REG_ENABLE, in tps65217_pmic_enable() 89 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_disable() local 96 return tps65217_clear_bits(tps, TPS65217_REG_ENABLE, in tps65217_pmic_disable() 104 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_set_voltage_sel() local 108 ret = tps65217_set_bits(tps, dev->desc->vsel_reg, dev->desc->vsel_mask, in tps65217_pmic_set_voltage_sel() 114 ret = tps65217_set_bits(tps, TPS65217_REG_DEFSLEW, in tps65217_pmic_set_voltage_sel() 125 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_set_suspend_enable() local 131 return tps65217_clear_bits(tps, dev->desc->bypass_reg, in tps65217_pmic_set_suspend_enable() 138 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_set_suspend_disable() local [all …]
|
D | tps65218-regulator.c | 114 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_set_voltage_sel() local 118 ret = tps65218_set_bits(tps, dev->desc->vsel_reg, dev->desc->vsel_mask, in tps65218_pmic_set_voltage_sel() 125 ret = tps65218_set_bits(tps, TPS65218_REG_CONTRL_SLEW_RATE, in tps65218_pmic_set_voltage_sel() 137 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_enable() local 144 return tps65218_set_bits(tps, dev->desc->enable_reg, in tps65218_pmic_enable() 151 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_disable() local 158 return tps65218_clear_bits(tps, dev->desc->enable_reg, in tps65218_pmic_disable() 164 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_set_suspend_enable() local 170 return tps65218_clear_bits(tps, dev->desc->bypass_reg, in tps65218_pmic_set_suspend_enable() 177 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_set_suspend_disable() local [all …]
|
D | tps65023-regulator.c | 178 struct tps_pmic *tps = rdev_get_drvdata(dev); in tps65023_dcdc_get_voltage_sel() local 184 if (dcdc != tps->driver_data->core_regulator) in tps65023_dcdc_get_voltage_sel() 193 struct tps_pmic *tps = rdev_get_drvdata(dev); in tps65023_dcdc_set_voltage_sel() local 196 if (dcdc != tps->driver_data->core_regulator) in tps65023_dcdc_set_voltage_sel() 273 struct tps_pmic *tps; in tps_65023_probe() local 277 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); in tps_65023_probe() 278 if (!tps) in tps_65023_probe() 281 tps->driver_data = (struct tps_driver_data *)id->driver_data; in tps_65023_probe() 283 tps->regmap = devm_regmap_init_i2c(client, &tps65023_regmap_config); in tps_65023_probe() 284 if (IS_ERR(tps->regmap)) { in tps_65023_probe() [all …]
|
D | tps65912-regulator.c | 126 struct tps65912 *tps = dev_get_drvdata(pdev->dev.parent); in tps65912_regulator_probe() local 131 platform_set_drvdata(pdev, tps); in tps65912_regulator_probe() 134 config.driver_data = tps; in tps65912_regulator_probe() 135 config.dev->of_node = tps->dev->of_node; in tps65912_regulator_probe() 136 config.regmap = tps->regmap; in tps65912_regulator_probe() 142 dev_err(tps->dev, "failed to register %s regulator\n", in tps65912_regulator_probe()
|
D | tps65086-regulator.c | 211 struct tps65086 *tps = dev_get_drvdata(pdev->dev.parent); in tps65086_regulator_probe() local 216 platform_set_drvdata(pdev, tps); in tps65086_regulator_probe() 219 config.dev->of_node = tps->dev->of_node; in tps65086_regulator_probe() 220 config.driver_data = tps; in tps65086_regulator_probe() 221 config.regmap = tps->regmap; in tps65086_regulator_probe() 227 dev_err(tps->dev, "failed to register %s regulator\n", in tps65086_regulator_probe()
|
/drivers/mfd/ |
D | tps65217.c | 67 struct tps65217 *tps = irq_data_get_irq_chip_data(data); in tps65217_irq_lock() local 69 mutex_lock(&tps->irq_lock); in tps65217_irq_lock() 74 struct tps65217 *tps = irq_data_get_irq_chip_data(data); in tps65217_irq_sync_unlock() local 77 ret = tps65217_reg_write(tps, TPS65217_REG_INT, tps->irq_mask, in tps65217_irq_sync_unlock() 80 dev_err(tps->dev, "Failed to sync IRQ masks\n"); in tps65217_irq_sync_unlock() 82 mutex_unlock(&tps->irq_lock); in tps65217_irq_sync_unlock() 86 irq_to_tps65217_irq(struct tps65217 *tps, struct irq_data *data) in irq_to_tps65217_irq() argument 93 struct tps65217 *tps = irq_data_get_irq_chip_data(data); in tps65217_irq_enable() local 94 const struct tps65217_irq *irq_data = irq_to_tps65217_irq(tps, data); in tps65217_irq_enable() 96 tps->irq_mask &= ~irq_data->mask; in tps65217_irq_enable() [all …]
|
D | tps65010.c | 197 struct tps65010 *tps = s->private; in dbg_show() local 203 switch (tps->model) { in dbg_show() 213 mutex_lock(&tps->lock); in dbg_show() 219 seq_printf(s, "%scharging\n\n", tps->charging ? "" : "(not) "); in dbg_show() 225 value = i2c_smbus_read_byte_data(tps->client, TPS_CHGCONFIG); in dbg_show() 226 dbg_chgconf(tps->por, buf, sizeof buf, value); in dbg_show() 229 value = i2c_smbus_read_byte_data(tps->client, TPS_CHGSTATUS); in dbg_show() 232 value = i2c_smbus_read_byte_data(tps->client, TPS_MASK1); in dbg_show() 237 value = i2c_smbus_read_byte_data(tps->client, TPS_REGSTATUS); in dbg_show() 240 value = i2c_smbus_read_byte_data(tps->client, TPS_MASK2); in dbg_show() [all …]
|
D | tps65218.c | 43 int tps65218_reg_read(struct tps65218 *tps, unsigned int reg, in tps65218_reg_read() argument 46 return regmap_read(tps->regmap, reg, val); in tps65218_reg_read() 58 int tps65218_reg_write(struct tps65218 *tps, unsigned int reg, in tps65218_reg_write() argument 66 return regmap_write(tps->regmap, reg, val); in tps65218_reg_write() 69 ret = regmap_write(tps->regmap, TPS65218_REG_PASSWORD, in tps65218_reg_write() 74 return regmap_write(tps->regmap, reg, val); in tps65218_reg_write() 90 static int tps65218_update_bits(struct tps65218 *tps, unsigned int reg, in tps65218_update_bits() argument 96 ret = tps65218_reg_read(tps, reg, &data); in tps65218_update_bits() 98 dev_err(tps->dev, "Read from reg 0x%x failed\n", reg); in tps65218_update_bits() 105 mutex_lock(&tps->tps_lock); in tps65218_update_bits() [all …]
|
D | tps65086.c | 74 struct tps65086 *tps; in tps65086_probe() local 78 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); in tps65086_probe() 79 if (!tps) in tps65086_probe() 82 i2c_set_clientdata(client, tps); in tps65086_probe() 83 tps->dev = &client->dev; in tps65086_probe() 84 tps->irq = client->irq; in tps65086_probe() 86 tps->regmap = devm_regmap_init_i2c(client, &tps65086_regmap_config); in tps65086_probe() 87 if (IS_ERR(tps->regmap)) { in tps65086_probe() 88 dev_err(tps->dev, "Failed to initialize register map\n"); in tps65086_probe() 89 return PTR_ERR(tps->regmap); in tps65086_probe() [all …]
|
D | tps65912-spi.c | 33 struct tps65912 *tps; in tps65912_spi_probe() local 35 tps = devm_kzalloc(&spi->dev, sizeof(*tps), GFP_KERNEL); in tps65912_spi_probe() 36 if (!tps) in tps65912_spi_probe() 39 spi_set_drvdata(spi, tps); in tps65912_spi_probe() 40 tps->dev = &spi->dev; in tps65912_spi_probe() 41 tps->irq = spi->irq; in tps65912_spi_probe() 43 tps->regmap = devm_regmap_init_spi(spi, &tps65912_regmap_config); in tps65912_spi_probe() 44 if (IS_ERR(tps->regmap)) { in tps65912_spi_probe() 45 dev_err(tps->dev, "Failed to initialize register map\n"); in tps65912_spi_probe() 46 return PTR_ERR(tps->regmap); in tps65912_spi_probe() [all …]
|
D | tps65912-i2c.c | 34 struct tps65912 *tps; in tps65912_i2c_probe() local 36 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); in tps65912_i2c_probe() 37 if (!tps) in tps65912_i2c_probe() 40 i2c_set_clientdata(client, tps); in tps65912_i2c_probe() 41 tps->dev = &client->dev; in tps65912_i2c_probe() 42 tps->irq = client->irq; in tps65912_i2c_probe() 44 tps->regmap = devm_regmap_init_i2c(client, &tps65912_regmap_config); in tps65912_i2c_probe() 45 if (IS_ERR(tps->regmap)) { in tps65912_i2c_probe() 46 dev_err(tps->dev, "Failed to initialize register map\n"); in tps65912_i2c_probe() 47 return PTR_ERR(tps->regmap); in tps65912_i2c_probe() [all …]
|
D | tps65912-core.c | 80 int tps65912_device_init(struct tps65912 *tps) in tps65912_device_init() argument 84 ret = regmap_add_irq_chip(tps->regmap, tps->irq, IRQF_ONESHOT, 0, in tps65912_device_init() 85 &tps65912_irq_chip, &tps->irq_data); in tps65912_device_init() 89 ret = mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO, tps65912_cells, in tps65912_device_init() 91 regmap_irq_get_domain(tps->irq_data)); in tps65912_device_init() 93 regmap_del_irq_chip(tps->irq, tps->irq_data); in tps65912_device_init() 101 int tps65912_device_exit(struct tps65912 *tps) in tps65912_device_exit() argument 103 regmap_del_irq_chip(tps->irq, tps->irq_data); in tps65912_device_exit()
|
/drivers/media/usb/dvb-usb/ |
D | cinergyT2-fe.c | 45 uint16_t tps = 0; in compute_tps() local 49 tps |= (1 << 7); in compute_tps() 52 tps |= (2 << 7); in compute_tps() 55 tps |= (3 << 7); in compute_tps() 58 tps |= (4 << 7); in compute_tps() 68 tps |= (1 << 4); in compute_tps() 71 tps |= (2 << 4); in compute_tps() 74 tps |= (3 << 4); in compute_tps() 77 tps |= (4 << 4); in compute_tps() 87 tps |= (1 << 13); in compute_tps() [all …]
|
/drivers/media/dvb-frontends/ |
D | mt352.c | 176 unsigned int tps = 0; in mt352_set_parameters() local 180 tps |= (1 << 7); in mt352_set_parameters() 183 tps |= (2 << 7); in mt352_set_parameters() 186 tps |= (3 << 7); in mt352_set_parameters() 189 tps |= (4 << 7); in mt352_set_parameters() 200 tps |= (1 << 4); in mt352_set_parameters() 203 tps |= (2 << 4); in mt352_set_parameters() 206 tps |= (3 << 4); in mt352_set_parameters() 209 tps |= (4 << 4); in mt352_set_parameters() 227 tps |= (1 << 13); in mt352_set_parameters() [all …]
|
D | zl10353.c | 186 u16 tps = 0; in zl10353_set_parameters() local 237 tps |= (1 << 7); in zl10353_set_parameters() 240 tps |= (2 << 7); in zl10353_set_parameters() 243 tps |= (3 << 7); in zl10353_set_parameters() 246 tps |= (4 << 7); in zl10353_set_parameters() 257 tps |= (1 << 4); in zl10353_set_parameters() 260 tps |= (2 << 4); in zl10353_set_parameters() 263 tps |= (3 << 4); in zl10353_set_parameters() 266 tps |= (4 << 4); in zl10353_set_parameters() 284 tps |= (1 << 13); in zl10353_set_parameters() [all …]
|
D | as102_fe.c | 198 struct as10x_tps tps = { 0 }; in as102_fe_get_frontend() local 201 ret = state->ops->get_tps(state->priv, &tps); in as102_fe_get_frontend() 206 switch (tps.modulation) { in as102_fe_get_frontend() 219 switch (tps.hierarchy) { in as102_fe_get_frontend() 235 switch (tps.code_rate_HP) { in as102_fe_get_frontend() 254 switch (tps.code_rate_LP) { in as102_fe_get_frontend() 273 switch (tps.guard_interval) { in as102_fe_get_frontend() 289 switch (tps.transmission_mode) { in as102_fe_get_frontend()
|
/drivers/rtc/ |
D | rtc-tps65910.c | 38 struct tps65910 *tps = dev_get_drvdata(dev->parent); in tps65910_rtc_alarm_irq_enable() local 44 return regmap_write(tps->regmap, TPS65910_RTC_INTERRUPTS, val); in tps65910_rtc_alarm_irq_enable() 59 struct tps65910 *tps = dev_get_drvdata(dev->parent); in tps65910_rtc_read_time() local 63 ret = regmap_update_bits(tps->regmap, TPS65910_RTC_CTRL, in tps65910_rtc_read_time() 70 ret = regmap_bulk_read(tps->regmap, TPS65910_SECONDS, rtc_data, in tps65910_rtc_read_time() 90 struct tps65910 *tps = dev_get_drvdata(dev->parent); in tps65910_rtc_set_time() local 101 ret = regmap_update_bits(tps->regmap, TPS65910_RTC_CTRL, in tps65910_rtc_set_time() 109 ret = regmap_bulk_write(tps->regmap, TPS65910_SECONDS, rtc_data, in tps65910_rtc_set_time() 117 ret = regmap_update_bits(tps->regmap, TPS65910_RTC_CTRL, in tps65910_rtc_set_time() 132 struct tps65910 *tps = dev_get_drvdata(dev->parent); in tps65910_rtc_read_alarm() local [all …]
|
/drivers/gpio/ |
D | gpio-tps65912.c | 28 struct tps65912 *tps; member 38 ret = regmap_read(gpio->tps->regmap, TPS65912_GPIO1 + offset, &val); in tps65912_gpio_get_direction() 52 return regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_input() 62 regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_output() 65 return regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_output() 74 ret = regmap_read(gpio->tps->regmap, TPS65912_GPIO1 + offset, &val); in tps65912_gpio_get() 89 regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_set() 108 struct tps65912 *tps = dev_get_drvdata(pdev->dev.parent); in tps65912_gpio_probe() local 116 gpio->tps = dev_get_drvdata(pdev->dev.parent); in tps65912_gpio_probe() 118 gpio->gpio_chip.parent = tps->dev; in tps65912_gpio_probe()
|
D | gpio-tps65086.c | 25 struct tps65086 *tps; member 48 regmap_update_bits(gpio->tps->regmap, TPS65086_GPOCTRL, in tps65086_gpio_direction_output() 59 ret = regmap_read(gpio->tps->regmap, TPS65086_GPOCTRL, &val); in tps65086_gpio_get() 71 regmap_update_bits(gpio->tps->regmap, TPS65086_GPOCTRL, in tps65086_gpio_set() 99 gpio->tps = dev_get_drvdata(pdev->dev.parent); in tps65086_gpio_probe() 101 gpio->chip.parent = gpio->tps->dev; in tps65086_gpio_probe()
|
/drivers/video/backlight/ |
D | tps65217_bl.c | 29 struct tps65217 *tps; member 39 rc = tps65217_set_bits(tps65217_bl->tps, TPS65217_REG_WLEDCTRL1, in tps65217_bl_enable() 59 rc = tps65217_clear_bits(tps65217_bl->tps, in tps65217_bl_disable() 91 rc = tps65217_reg_write(tps65217_bl->tps, in tps65217_bl_update_status() 129 rc = tps65217_clear_bits(tps65217_bl->tps, in tps65217_bl_hw_init() 146 rc = tps65217_set_bits(tps65217_bl->tps, TPS65217_REG_WLEDCTRL1, in tps65217_bl_hw_init() 167 rc = tps65217_set_bits(tps65217_bl->tps, in tps65217_bl_hw_init() 186 struct tps65217 *tps = dev_get_drvdata(pdev->dev.parent); in tps65217_bl_parse_dt() local 187 struct device_node *node = of_node_get(tps->dev->of_node); in tps65217_bl_parse_dt() 273 struct tps65217 *tps = dev_get_drvdata(pdev->dev.parent); in tps65217_bl_probe() local [all …]
|
/drivers/power/supply/ |
D | tps65217_charger.c | 41 struct tps65217 *tps; member 81 ret = tps65217_clear_bits(charger->tps, TPS65217_REG_CHGCONFIG1, in tps65217_config_charger() 102 ret = tps65217_set_bits(charger->tps, TPS65217_REG_CHGCONFIG1, in tps65217_enable_charging() 138 ret = tps65217_reg_read(charger->tps, TPS65217_REG_STATUS, &val); in tps65217_charger_irq() 162 ret = tps65217_reg_read(charger->tps, TPS65217_REG_CHGCONFIG0, &val); in tps65217_charger_irq() 200 struct tps65217 *tps = dev_get_drvdata(pdev->dev.parent); in tps65217_charger_probe() local 213 charger->tps = tps; in tps65217_charger_probe()
|
/drivers/media/usb/as102/ |
D | as10x_cmd.c | 253 ptps->modulation = prsp->body.get_tps.rsp.tps.modulation; in as10x_cmd_get_tps() 254 ptps->hierarchy = prsp->body.get_tps.rsp.tps.hierarchy; in as10x_cmd_get_tps() 255 ptps->interleaving_mode = prsp->body.get_tps.rsp.tps.interleaving_mode; in as10x_cmd_get_tps() 256 ptps->code_rate_HP = prsp->body.get_tps.rsp.tps.code_rate_HP; in as10x_cmd_get_tps() 257 ptps->code_rate_LP = prsp->body.get_tps.rsp.tps.code_rate_LP; in as10x_cmd_get_tps() 258 ptps->guard_interval = prsp->body.get_tps.rsp.tps.guard_interval; in as10x_cmd_get_tps() 259 ptps->transmission_mode = prsp->body.get_tps.rsp.tps.transmission_mode; in as10x_cmd_get_tps() 260 ptps->DVBH_mask_HP = prsp->body.get_tps.rsp.tps.DVBH_mask_HP; in as10x_cmd_get_tps() 261 ptps->DVBH_mask_LP = prsp->body.get_tps.rsp.tps.DVBH_mask_LP; in as10x_cmd_get_tps() 262 ptps->cell_ID = le16_to_cpu((__force __le16)prsp->body.get_tps.rsp.tps.cell_ID); in as10x_cmd_get_tps()
|