tps6586x 135 drivers/mfd/tps6586x.c static inline struct tps6586x *dev_to_tps6586x(struct device *dev) tps6586x 142 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_to_tps6586x(dev); tps6586x 144 drivers/mfd/tps6586x.c return regmap_write(tps6586x->regmap, reg, val); tps6586x 150 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_to_tps6586x(dev); tps6586x 152 drivers/mfd/tps6586x.c return regmap_bulk_write(tps6586x->regmap, reg, val, len); tps6586x 158 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_to_tps6586x(dev); tps6586x 162 drivers/mfd/tps6586x.c ret = regmap_read(tps6586x->regmap, reg, &rval); tps6586x 171 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_to_tps6586x(dev); tps6586x 173 drivers/mfd/tps6586x.c return regmap_bulk_read(tps6586x->regmap, reg, val, len); tps6586x 179 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_to_tps6586x(dev); tps6586x 181 drivers/mfd/tps6586x.c return regmap_update_bits(tps6586x->regmap, reg, bit_mask, bit_mask); tps6586x 187 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_to_tps6586x(dev); tps6586x 189 drivers/mfd/tps6586x.c return regmap_update_bits(tps6586x->regmap, reg, bit_mask, 0); tps6586x 195 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_to_tps6586x(dev); tps6586x 197 drivers/mfd/tps6586x.c return regmap_update_bits(tps6586x->regmap, reg, mask, val); tps6586x 203 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_to_tps6586x(dev); tps6586x 205 drivers/mfd/tps6586x.c return irq_create_mapping(tps6586x->irq_domain, irq); tps6586x 211 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_get_drvdata(dev); tps6586x 213 drivers/mfd/tps6586x.c return tps6586x->version; tps6586x 223 drivers/mfd/tps6586x.c static int tps6586x_remove_subdevs(struct tps6586x *tps6586x) tps6586x 225 drivers/mfd/tps6586x.c return device_for_each_child(tps6586x->dev, NULL, __remove_subdev); tps6586x 230 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = irq_data_get_irq_chip_data(data); tps6586x 232 drivers/mfd/tps6586x.c mutex_lock(&tps6586x->irq_lock); tps6586x 237 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = irq_data_get_irq_chip_data(irq_data); tps6586x 241 drivers/mfd/tps6586x.c tps6586x->mask_reg[data->mask_reg] &= ~data->mask_mask; tps6586x 242 drivers/mfd/tps6586x.c tps6586x->irq_en |= (1 << __irq); tps6586x 247 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = irq_data_get_irq_chip_data(irq_data); tps6586x 252 drivers/mfd/tps6586x.c tps6586x->mask_reg[data->mask_reg] |= data->mask_mask; tps6586x 253 drivers/mfd/tps6586x.c tps6586x->irq_en &= ~(1 << __irq); tps6586x 258 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = irq_data_get_irq_chip_data(data); tps6586x 261 drivers/mfd/tps6586x.c for (i = 0; i < ARRAY_SIZE(tps6586x->mask_reg); i++) { tps6586x 263 drivers/mfd/tps6586x.c ret = tps6586x_write(tps6586x->dev, tps6586x 265 drivers/mfd/tps6586x.c tps6586x->mask_reg[i]); tps6586x 269 drivers/mfd/tps6586x.c mutex_unlock(&tps6586x->irq_lock); tps6586x 275 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = irq_data_get_irq_chip_data(irq_data); tps6586x 276 drivers/mfd/tps6586x.c return irq_set_irq_wake(tps6586x->irq, on); tps6586x 294 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = h->host_data; tps6586x 296 drivers/mfd/tps6586x.c irq_set_chip_data(virq, tps6586x); tps6586x 311 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = data; tps6586x 315 drivers/mfd/tps6586x.c ret = tps6586x_reads(tps6586x->dev, TPS6586X_INT_ACK1, tps6586x 319 drivers/mfd/tps6586x.c dev_err(tps6586x->dev, "failed to read interrupt status\n"); tps6586x 328 drivers/mfd/tps6586x.c if (tps6586x->irq_en & (1 << i)) tps6586x 330 drivers/mfd/tps6586x.c irq_find_mapping(tps6586x->irq_domain, i)); tps6586x 338 drivers/mfd/tps6586x.c static int tps6586x_irq_init(struct tps6586x *tps6586x, int irq, tps6586x 346 drivers/mfd/tps6586x.c tps6586x->irq = irq; tps6586x 348 drivers/mfd/tps6586x.c mutex_init(&tps6586x->irq_lock); tps6586x 350 drivers/mfd/tps6586x.c tps6586x->mask_reg[i] = 0xff; tps6586x 351 drivers/mfd/tps6586x.c tps6586x_write(tps6586x->dev, TPS6586X_INT_MASK1 + i, 0xff); tps6586x 354 drivers/mfd/tps6586x.c tps6586x_reads(tps6586x->dev, TPS6586X_INT_ACK1, sizeof(tmp), tmp); tps6586x 359 drivers/mfd/tps6586x.c dev_err(tps6586x->dev, tps6586x 367 drivers/mfd/tps6586x.c tps6586x->irq_domain = irq_domain_add_simple(tps6586x->dev->of_node, tps6586x 369 drivers/mfd/tps6586x.c tps6586x); tps6586x 370 drivers/mfd/tps6586x.c if (!tps6586x->irq_domain) { tps6586x 371 drivers/mfd/tps6586x.c dev_err(tps6586x->dev, "Failed to create IRQ domain\n"); tps6586x 375 drivers/mfd/tps6586x.c "tps6586x", tps6586x); tps6586x 378 drivers/mfd/tps6586x.c device_init_wakeup(tps6586x->dev, 1); tps6586x 383 drivers/mfd/tps6586x.c static int tps6586x_add_subdevs(struct tps6586x *tps6586x, tps6586x 399 drivers/mfd/tps6586x.c pdev->dev.parent = tps6586x->dev; tps6586x 412 drivers/mfd/tps6586x.c tps6586x_remove_subdevs(tps6586x); tps6586x 505 drivers/mfd/tps6586x.c struct tps6586x *tps6586x; tps6586x 523 drivers/mfd/tps6586x.c tps6586x = devm_kzalloc(&client->dev, sizeof(*tps6586x), GFP_KERNEL); tps6586x 524 drivers/mfd/tps6586x.c if (!tps6586x) tps6586x 527 drivers/mfd/tps6586x.c tps6586x->version = version; tps6586x 528 drivers/mfd/tps6586x.c tps6586x_print_version(client, tps6586x->version); tps6586x 530 drivers/mfd/tps6586x.c tps6586x->client = client; tps6586x 531 drivers/mfd/tps6586x.c tps6586x->dev = &client->dev; tps6586x 532 drivers/mfd/tps6586x.c i2c_set_clientdata(client, tps6586x); tps6586x 534 drivers/mfd/tps6586x.c tps6586x->regmap = devm_regmap_init_i2c(client, tps6586x 536 drivers/mfd/tps6586x.c if (IS_ERR(tps6586x->regmap)) { tps6586x 537 drivers/mfd/tps6586x.c ret = PTR_ERR(tps6586x->regmap); tps6586x 544 drivers/mfd/tps6586x.c ret = tps6586x_irq_init(tps6586x, client->irq, tps6586x 552 drivers/mfd/tps6586x.c ret = mfd_add_devices(tps6586x->dev, -1, tps6586x 554 drivers/mfd/tps6586x.c NULL, 0, tps6586x->irq_domain); tps6586x 560 drivers/mfd/tps6586x.c ret = tps6586x_add_subdevs(tps6586x, pdata); tps6586x 574 drivers/mfd/tps6586x.c mfd_remove_devices(tps6586x->dev); tps6586x 577 drivers/mfd/tps6586x.c free_irq(client->irq, tps6586x); tps6586x 583 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = i2c_get_clientdata(client); tps6586x 585 drivers/mfd/tps6586x.c tps6586x_remove_subdevs(tps6586x); tps6586x 586 drivers/mfd/tps6586x.c mfd_remove_devices(tps6586x->dev); tps6586x 588 drivers/mfd/tps6586x.c free_irq(client->irq, tps6586x); tps6586x 594 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_get_drvdata(dev); tps6586x 596 drivers/mfd/tps6586x.c if (tps6586x->client->irq) tps6586x 597 drivers/mfd/tps6586x.c disable_irq(tps6586x->client->irq); tps6586x 604 drivers/mfd/tps6586x.c struct tps6586x *tps6586x = dev_get_drvdata(dev); tps6586x 606 drivers/mfd/tps6586x.c if (tps6586x->client->irq) tps6586x 607 drivers/mfd/tps6586x.c enable_irq(tps6586x->client->irq);