| /linux/drivers/mfd/ |
| H A D | tps65218.c | 47 int tps65218_reg_write(struct tps65218 *tps, unsigned int reg, in tps65218_reg_write() argument 55 return regmap_write(tps->regmap, reg, val); in tps65218_reg_write() 58 ret = regmap_write(tps->regmap, TPS65218_REG_PASSWORD, in tps65218_reg_write() 63 return regmap_write(tps->regmap, reg, val); in tps65218_reg_write() 79 static int tps65218_update_bits(struct tps65218 *tps, unsigned int reg, in tps65218_update_bits() argument 85 ret = regmap_read(tps->regmap, reg, &data); in tps65218_update_bits() 87 dev_err(tps->dev, "Read from reg 0x%x failed\n", reg); in tps65218_update_bits() 94 mutex_lock(&tps->tps_lock); in tps65218_update_bits() 95 ret = tps65218_reg_write(tps, reg, data, level); in tps65218_update_bits() 97 dev_err(tps->dev, "Write for reg 0x%x failed\n", reg); in tps65218_update_bits() [all …]
|
| H A D | tps65010.c | 185 struct tps65010 *tps = s->private; in dbg_show() local 191 switch (tps->model) { in dbg_show() 201 mutex_lock(&tps->lock); in dbg_show() 207 seq_printf(s, "%scharging\n\n", tps->charging ? "" : "(not) "); in dbg_show() 213 value = i2c_smbus_read_byte_data(tps->client, TPS_CHGCONFIG); in dbg_show() 214 dbg_chgconf(tps->por, buf, sizeof buf, value); in dbg_show() 217 value = i2c_smbus_read_byte_data(tps->client, TPS_CHGSTATUS); in dbg_show() 220 value = i2c_smbus_read_byte_data(tps->client, TPS_MASK1); in dbg_show() 225 value = i2c_smbus_read_byte_data(tps->client, TPS_REGSTATUS); in dbg_show() 228 value = i2c_smbus_read_byte_data(tps->client, TPS_MASK2); in dbg_show() [all …]
|
| H A D | tps65086.c | 67 struct tps65086 *tps; in tps65086_probe() local 71 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); in tps65086_probe() 72 if (!tps) in tps65086_probe() 75 i2c_set_clientdata(client, tps); in tps65086_probe() 76 tps->dev = &client->dev; in tps65086_probe() 77 tps->irq = client->irq; in tps65086_probe() 79 tps->regmap = devm_regmap_init_i2c(client, &tps65086_regmap_config); in tps65086_probe() 80 if (IS_ERR(tps->regmap)) { in tps65086_probe() 81 dev_err(tps->dev, "Failed to initialize register map\n"); in tps65086_probe() 82 return PTR_ERR(tps->regmap); in tps65086_probe() [all …]
|
| H A D | tps6594-spi.c | 33 struct tps6594 *tps = spi_get_drvdata(spi); in tps6594_spi_reg_read() local 41 if (tps->use_crc) in tps6594_spi_reg_read() 48 if (tps->use_crc && buf[3] != crc8(tps6594_spi_crc_table, buf, 3, CRC8_INIT_VALUE)) in tps6594_spi_reg_read() 59 struct tps6594 *tps = spi_get_drvdata(spi); in tps6594_spi_reg_write() local 67 if (tps->use_crc) in tps6594_spi_reg_write() 97 struct tps6594 *tps; in tps6594_spi_probe() local 100 tps = devm_kzalloc(dev, sizeof(*tps), GFP_KERNEL); in tps6594_spi_probe() 101 if (!tps) in tps6594_spi_probe() 104 spi_set_drvdata(spi, tps); in tps6594_spi_probe() 106 tps->dev = dev; in tps6594_spi_probe() [all …]
|
| H A D | tps65912-i2c.c | 26 struct tps65912 *tps; in tps65912_i2c_probe() local 28 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); in tps65912_i2c_probe() 29 if (!tps) in tps65912_i2c_probe() 32 i2c_set_clientdata(client, tps); in tps65912_i2c_probe() 33 tps->dev = &client->dev; in tps65912_i2c_probe() 34 tps->irq = client->irq; in tps65912_i2c_probe() 36 tps->regmap = devm_regmap_init_i2c(client, &tps65912_regmap_config); in tps65912_i2c_probe() 37 if (IS_ERR(tps->regmap)) { in tps65912_i2c_probe() 38 dev_err(tps->dev, "Failed to initialize register map\n"); in tps65912_i2c_probe() 39 return PTR_ERR(tps->regmap); in tps65912_i2c_probe() [all …]
|
| H A D | tps65912-spi.c | 26 struct tps65912 *tps; in tps65912_spi_probe() local 28 tps = devm_kzalloc(&spi->dev, sizeof(*tps), GFP_KERNEL); in tps65912_spi_probe() 29 if (!tps) in tps65912_spi_probe() 32 spi_set_drvdata(spi, tps); in tps65912_spi_probe() 33 tps->dev = &spi->dev; in tps65912_spi_probe() 34 tps->irq = spi->irq; in tps65912_spi_probe() 36 tps->regmap = devm_regmap_init_spi(spi, &tps65912_regmap_config); in tps65912_spi_probe() 37 if (IS_ERR(tps->regmap)) { in tps65912_spi_probe() 38 dev_err(tps->dev, "Failed to initialize register map\n"); in tps65912_spi_probe() 39 return PTR_ERR(tps->regmap); in tps65912_spi_probe() [all …]
|
| H A D | tps6594-i2c.c | 111 struct tps6594 *tps = i2c_get_clientdata(client); in tps6594_i2c_read() local 120 if (tps->use_crc) { in tps6594_i2c_read() 149 struct tps6594 *tps = i2c_get_clientdata(client); in tps6594_i2c_write() local 158 if (tps->use_crc) { in tps6594_i2c_write() 212 struct tps6594 *tps; in tps6594_i2c_probe() local 215 tps = devm_kzalloc(dev, sizeof(*tps), GFP_KERNEL); in tps6594_i2c_probe() 216 if (!tps) in tps6594_i2c_probe() 219 i2c_set_clientdata(client, tps); in tps6594_i2c_probe() 221 tps->dev = dev; in tps6594_i2c_probe() 222 tps->reg = client->addr; in tps6594_i2c_probe() [all …]
|
| H A D | tps65912-core.c | 89 int tps65912_device_init(struct tps65912 *tps) in tps65912_device_init() argument 93 ret = devm_regmap_add_irq_chip(tps->dev, tps->regmap, tps->irq, in tps65912_device_init() 95 &tps->irq_data); in tps65912_device_init() 99 ret = devm_mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO, tps65912_cells, in tps65912_device_init() 101 regmap_irq_get_domain(tps->irq_data)); in tps65912_device_init()
|
| /linux/drivers/regulator/ |
| H A D | tps6507x-regulator.c | 113 static inline int tps6507x_pmic_read(struct tps6507x_pmic *tps, u8 reg) in tps6507x_pmic_read() argument 118 err = tps->mfd->read_dev(tps->mfd, reg, 1, &val); in tps6507x_pmic_read() 126 static inline int tps6507x_pmic_write(struct tps6507x_pmic *tps, u8 reg, u8 val) in tps6507x_pmic_write() argument 128 return tps->mfd->write_dev(tps->mfd, reg, 1, &val); in tps6507x_pmic_write() 131 static int tps6507x_pmic_set_bits(struct tps6507x_pmic *tps, u8 reg, u8 mask) in tps6507x_pmic_set_bits() argument 135 mutex_lock(&tps->io_lock); in tps6507x_pmic_set_bits() 137 data = tps6507x_pmic_read(tps, reg); in tps6507x_pmic_set_bits() 139 dev_err(tps->mfd->dev, "Read from reg 0x%x failed\n", reg); in tps6507x_pmic_set_bits() 145 err = tps6507x_pmic_write(tps, reg, data); in tps6507x_pmic_set_bits() 147 dev_err(tps->mfd->dev, "Write for reg 0x%x failed\n", reg); in tps6507x_pmic_set_bits() [all …]
|
| H A D | tps65217-regulator.c | 66 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_enable() local 73 return tps65217_set_bits(tps, TPS65217_REG_ENABLE, in tps65217_pmic_enable() 80 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_disable() local 87 return tps65217_clear_bits(tps, TPS65217_REG_ENABLE, in tps65217_pmic_disable() 95 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_set_voltage_sel() local 99 ret = tps65217_set_bits(tps, dev->desc->vsel_reg, dev->desc->vsel_mask, in tps65217_pmic_set_voltage_sel() 105 ret = tps65217_set_bits(tps, TPS65217_REG_DEFSLEW, in tps65217_pmic_set_voltage_sel() 116 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_set_suspend_enable() local 122 return tps65217_clear_bits(tps, dev->desc->bypass_reg, in tps65217_pmic_set_suspend_enable() 129 struct tps65217 *tps = rdev_get_drvdata(dev); in tps65217_pmic_set_suspend_disable() local [all …]
|
| H A D | tps65218-regulator.c | 69 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_set_voltage_sel() local 73 ret = tps65218_set_bits(tps, dev->desc->vsel_reg, dev->desc->vsel_mask, in tps65218_pmic_set_voltage_sel() 80 ret = tps65218_set_bits(tps, TPS65218_REG_CONTRL_SLEW_RATE, in tps65218_pmic_set_voltage_sel() 92 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_enable() local 99 return tps65218_set_bits(tps, dev->desc->enable_reg, in tps65218_pmic_enable() 106 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_disable() local 113 return tps65218_clear_bits(tps, dev->desc->enable_reg, in tps65218_pmic_disable() 119 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_set_suspend_enable() local 125 return tps65218_clear_bits(tps, dev->desc->bypass_reg, in tps65218_pmic_set_suspend_enable() 132 struct tps65218 *tps = rdev_get_drvdata(dev); in tps65218_pmic_set_suspend_disable() local [all …]
|
| H A D | tps65912-regulator.c | 118 struct tps65912 *tps = dev_get_drvdata(pdev->dev.parent); in tps65912_regulator_probe() local 123 platform_set_drvdata(pdev, tps); in tps65912_regulator_probe() 126 config.driver_data = tps; in tps65912_regulator_probe() 127 config.dev->of_node = tps->dev->of_node; in tps65912_regulator_probe() 128 config.regmap = tps->regmap; in tps65912_regulator_probe() 134 dev_err(tps->dev, "failed to register %s regulator\n", in tps65912_regulator_probe()
|
| /linux/drivers/rtc/ |
| H A D | rtc-tps6594.c | 52 struct tps6594 *tps = dev_get_drvdata(dev->parent); in tps6594_rtc_alarm_irq_enable() local 57 return regmap_update_bits(tps->regmap, TPS6594_REG_RTC_INTERRUPTS, in tps6594_rtc_alarm_irq_enable() 62 static int tps6594_rtc_shadow_timestamp(struct device *dev, struct tps6594 *tps) in tps6594_rtc_shadow_timestamp() argument 70 ret = regmap_clear_bits(tps->regmap, TPS6594_REG_RTC_CTRL_1, in tps6594_rtc_shadow_timestamp() 79 return regmap_set_bits(tps->regmap, TPS6594_REG_RTC_CTRL_1, in tps6594_rtc_shadow_timestamp() 86 struct tps6594 *tps = dev_get_drvdata(dev->parent); in tps6594_rtc_read_time() local 90 ret = regmap_test_bits(tps->regmap, TPS6594_REG_RTC_STATUS, in tps6594_rtc_read_time() 97 ret = tps6594_rtc_shadow_timestamp(dev, tps); in tps6594_rtc_read_time() 102 ret = regmap_bulk_read(tps->regmap, TPS6594_REG_RTC_SECONDS, rtc_data, in tps6594_rtc_read_time() 121 struct tps6594 *tps = dev_get_drvdata(dev->parent); in tps6594_rtc_set_time() local [all …]
|
| H A D | rtc-tps65910.c | 50 struct tps65910 *tps = dev_get_drvdata(dev->parent); in tps65910_rtc_alarm_irq_enable() local 56 return regmap_write(tps->regmap, TPS65910_RTC_INTERRUPTS, val); in tps65910_rtc_alarm_irq_enable() 71 struct tps65910 *tps = dev_get_drvdata(dev->parent); in tps65910_rtc_read_time() local 75 ret = regmap_update_bits(tps->regmap, TPS65910_RTC_CTRL, in tps65910_rtc_read_time() 82 ret = regmap_bulk_read(tps->regmap, TPS65910_SECONDS, rtc_data, in tps65910_rtc_read_time() 102 struct tps65910 *tps = dev_get_drvdata(dev->parent); in tps65910_rtc_set_time() local 113 ret = regmap_update_bits(tps->regmap, TPS65910_RTC_CTRL, in tps65910_rtc_set_time() 121 ret = regmap_bulk_write(tps->regmap, TPS65910_SECONDS, rtc_data, in tps65910_rtc_set_time() 129 ret = regmap_update_bits(tps->regmap, TPS65910_RTC_CTRL, in tps65910_rtc_set_time() 144 struct tps65910 *tps = dev_get_drvdata(dev->parent); in tps65910_rtc_read_alarm() local [all …]
|
| /linux/drivers/media/usb/dvb-usb/ |
| H A D | cinergyT2-fe.c | 31 uint16_t tps = 0; in compute_tps() local 35 tps |= (1 << 7); in compute_tps() 38 tps |= (2 << 7); in compute_tps() 41 tps |= (3 << 7); in compute_tps() 44 tps |= (4 << 7); in compute_tps() 54 tps |= (1 << 4); in compute_tps() 57 tps |= (2 << 4); in compute_tps() 60 tps |= (3 << 4); in compute_tps() 63 tps |= (4 << 4); in compute_tps() 73 tps |= (1 << 13); in compute_tps() [all …]
|
| /linux/tools/perf/util/ |
| H A D | trace-event-info.c | 144 static bool name_in_tp_list(char *sys, struct tracepoint_path *tps) in name_in_tp_list() argument 146 while (tps) { in name_in_tp_list() 147 if (!strcmp(sys, tps->name)) in name_in_tp_list() 149 tps = tps->next; in name_in_tp_list() 155 #define for_each_event_tps(dir, dent, tps) \ argument 161 static int copy_event_system(const char *sys, struct tracepoint_path *tps) in copy_event_system() argument 177 for_each_event_tps(dir, dent, tps) { in copy_event_system() 178 if (!name_in_tp_list(dent->d_name, tps)) in copy_event_system() 199 for_each_event_tps(dir, dent, tps) { in copy_event_system() 200 if (!name_in_tp_list(dent->d_name, tps)) in copy_event_system() [all …]
|
| /linux/drivers/media/dvb-frontends/ |
| H A D | mt352.c | 162 unsigned int tps = 0; in mt352_set_parameters() local 166 tps |= (1 << 7); in mt352_set_parameters() 169 tps |= (2 << 7); in mt352_set_parameters() 172 tps |= (3 << 7); in mt352_set_parameters() 175 tps |= (4 << 7); in mt352_set_parameters() 186 tps |= (1 << 4); in mt352_set_parameters() 189 tps |= (2 << 4); in mt352_set_parameters() 192 tps |= (3 << 4); in mt352_set_parameters() 195 tps |= (4 << 4); in mt352_set_parameters() 214 tps |= (1 << 13); in mt352_set_parameters() [all …]
|
| H A D | zl10353.c | 172 u16 tps = 0; in zl10353_set_parameters() local 223 tps |= (1 << 7); in zl10353_set_parameters() 226 tps |= (2 << 7); in zl10353_set_parameters() 229 tps |= (3 << 7); in zl10353_set_parameters() 232 tps |= (4 << 7); in zl10353_set_parameters() 243 tps |= (1 << 4); in zl10353_set_parameters() 246 tps |= (2 << 4); in zl10353_set_parameters() 249 tps |= (3 << 4); in zl10353_set_parameters() 252 tps |= (4 << 4); in zl10353_set_parameters() 271 tps |= (1 << 13); in zl10353_set_parameters() [all …]
|
| H A D | as102_fe.c | 189 struct as10x_tps tps = { 0 }; in as102_fe_get_frontend() local 192 ret = state->ops->get_tps(state->priv, &tps); in as102_fe_get_frontend() 197 switch (tps.modulation) { in as102_fe_get_frontend() 210 switch (tps.hierarchy) { in as102_fe_get_frontend() 226 switch (tps.code_rate_HP) { in as102_fe_get_frontend() 245 switch (tps.code_rate_LP) { in as102_fe_get_frontend() 264 switch (tps.guard_interval) { in as102_fe_get_frontend() 280 switch (tps.transmission_mode) { in as102_fe_get_frontend()
|
| /linux/drivers/misc/ |
| H A D | tps6594-esm.c | 35 struct tps6594 *tps = dev_get_drvdata(pdev->dev.parent); in tps6594_esm_probe() local 48 ret = regmap_read(tps->regmap, TPS6594_REG_DEV_REV, &rev); in tps6594_esm_probe() 68 ret = regmap_set_bits(tps->regmap, TPS6594_REG_ESM_SOC_MODE_CFG, in tps6594_esm_probe() 73 ret = regmap_set_bits(tps->regmap, TPS6594_REG_ESM_SOC_START_REG, in tps6594_esm_probe() 86 struct tps6594 *tps = dev_get_drvdata(pdev->dev.parent); in tps6594_esm_remove() local 90 ret = regmap_clear_bits(tps->regmap, TPS6594_REG_ESM_SOC_START_REG, in tps6594_esm_remove() 97 ret = regmap_clear_bits(tps->regmap, TPS6594_REG_ESM_SOC_MODE_CFG, in tps6594_esm_remove() 109 struct tps6594 *tps = dev_get_drvdata(dev->parent); in tps6594_esm_suspend() local 112 ret = regmap_clear_bits(tps->regmap, TPS6594_REG_ESM_SOC_START_REG, in tps6594_esm_suspend() 122 struct tps6594 *tps = dev_get_drvdata(dev->parent); in tps6594_esm_resume() local [all …]
|
| /linux/include/linux/mfd/ |
| H A D | tps65090.h | 116 struct tps65090 *tps = dev_get_drvdata(dev); in tps65090_write() local 118 return regmap_write(tps->rmap, reg, val); in tps65090_write() 123 struct tps65090 *tps = dev_get_drvdata(dev); in tps65090_read() local 127 ret = regmap_read(tps->rmap, reg, &temp_val); in tps65090_read() 136 struct tps65090 *tps = dev_get_drvdata(dev); in tps65090_set_bits() local 138 return regmap_update_bits(tps->rmap, reg, BIT(bit_num), ~0u); in tps65090_set_bits() 144 struct tps65090 *tps = dev_get_drvdata(dev); in tps65090_clr_bits() local 146 return regmap_update_bits(tps->rmap, reg, BIT(bit_num), 0u); in tps65090_clr_bits()
|
| H A D | tps65217.h | 272 int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, 274 int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, 276 int tps65217_set_bits(struct tps65217 *tps, unsigned int reg, 278 int tps65217_clear_bits(struct tps65217 *tps, unsigned int reg,
|
| /linux/drivers/input/misc/ |
| H A D | tps65219-pwrbutton.c | 47 struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent); in tps65219_pb_probe() local 110 regmap_clear_bits(tps->regmap, TPS65219_REG_MASK_CONFIG, in tps65219_pb_probe() 114 regmap_update_bits(tps->regmap, TPS65219_REG_MFP_2_CONFIG, in tps65219_pb_probe() 122 struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent); in tps65219_pb_remove() local 126 ret = regmap_set_bits(tps->regmap, TPS65219_REG_MASK_CONFIG, in tps65219_pb_remove()
|
| /linux/drivers/media/usb/as102/ |
| H A D | as10x_cmd.c | 244 ptps->modulation = prsp->body.get_tps.rsp.tps.modulation; in as10x_cmd_get_tps() 245 ptps->hierarchy = prsp->body.get_tps.rsp.tps.hierarchy; in as10x_cmd_get_tps() 246 ptps->interleaving_mode = prsp->body.get_tps.rsp.tps.interleaving_mode; in as10x_cmd_get_tps() 247 ptps->code_rate_HP = prsp->body.get_tps.rsp.tps.code_rate_HP; in as10x_cmd_get_tps() 248 ptps->code_rate_LP = prsp->body.get_tps.rsp.tps.code_rate_LP; in as10x_cmd_get_tps() 249 ptps->guard_interval = prsp->body.get_tps.rsp.tps.guard_interval; in as10x_cmd_get_tps() 250 ptps->transmission_mode = prsp->body.get_tps.rsp.tps.transmission_mode; in as10x_cmd_get_tps() 251 ptps->DVBH_mask_HP = prsp->body.get_tps.rsp.tps.DVBH_mask_HP; in as10x_cmd_get_tps() 252 ptps->DVBH_mask_LP = prsp->body.get_tps.rsp.tps.DVBH_mask_LP; in as10x_cmd_get_tps() 253 ptps->cell_ID = le16_to_cpu((__force __le16)prsp->body.get_tps.rsp.tps.cell_ID); in as10x_cmd_get_tps()
|
| /linux/drivers/pinctrl/ |
| H A D | pinctrl-tps6594.c | 306 struct tps6594 *tps; member 405 if (pinctrl->tps->chip_id == TPS65224 && pin == 5) { in tps6594_pmx_set() 410 return regmap_update_bits(pinctrl->tps->regmap, in tps6594_pmx_set() 489 struct tps6594 *tps = dev_get_drvdata(pdev->dev.parent); in tps6594_pinctrl_probe() local 503 switch (tps->chip_id) { in tps6594_pinctrl_probe() 537 pinctrl->tps = tps; in tps6594_pinctrl_probe() 544 config.parent = tps->dev; in tps6594_pinctrl_probe() 545 config.regmap = tps->regmap; in tps6594_pinctrl_probe()
|