da9150 75 drivers/iio/adc/da9150-gpadc.c struct da9150 *da9150; da9150 101 drivers/iio/adc/da9150-gpadc.c da9150_reg_write(gpadc->da9150, DA9150_GPADC_MAN, da9150 112 drivers/iio/adc/da9150-gpadc.c da9150_bulk_read(gpadc->da9150, DA9150_GPADC_RES_A, 2, result_regs); da9150 321 drivers/iio/adc/da9150-gpadc.c struct da9150 *da9150 = dev_get_drvdata(dev->parent); da9150 334 drivers/iio/adc/da9150-gpadc.c gpadc->da9150 = da9150; da9150 177 drivers/mfd/da9150-core.c void da9150_read_qif(struct da9150 *da9150, u8 addr, int count, u8 *buf) da9150 181 drivers/mfd/da9150-core.c ret = da9150_i2c_read_device(da9150->core_qif, addr, count, buf); da9150 183 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to read from QIF 0x%x: %d\n", da9150 188 drivers/mfd/da9150-core.c void da9150_write_qif(struct da9150 *da9150, u8 addr, int count, const u8 *buf) da9150 192 drivers/mfd/da9150-core.c ret = da9150_i2c_write_device(da9150->core_qif, addr, count, buf); da9150 194 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to write to QIF 0x%x: %d\n", da9150 199 drivers/mfd/da9150-core.c u8 da9150_reg_read(struct da9150 *da9150, u16 reg) da9150 203 drivers/mfd/da9150-core.c ret = regmap_read(da9150->regmap, reg, &val); da9150 205 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to read from reg 0x%x: %d\n", da9150 212 drivers/mfd/da9150-core.c void da9150_reg_write(struct da9150 *da9150, u16 reg, u8 val) da9150 216 drivers/mfd/da9150-core.c ret = regmap_write(da9150->regmap, reg, val); da9150 218 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to write to reg 0x%x: %d\n", da9150 223 drivers/mfd/da9150-core.c void da9150_set_bits(struct da9150 *da9150, u16 reg, u8 mask, u8 val) da9150 227 drivers/mfd/da9150-core.c ret = regmap_update_bits(da9150->regmap, reg, mask, val); da9150 229 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to set bits in reg 0x%x: %d\n", da9150 234 drivers/mfd/da9150-core.c void da9150_bulk_read(struct da9150 *da9150, u16 reg, int count, u8 *buf) da9150 238 drivers/mfd/da9150-core.c ret = regmap_bulk_read(da9150->regmap, reg, buf, count); da9150 240 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to bulk read from reg 0x%x: %d\n", da9150 245 drivers/mfd/da9150-core.c void da9150_bulk_write(struct da9150 *da9150, u16 reg, int count, const u8 *buf) da9150 249 drivers/mfd/da9150-core.c ret = regmap_raw_write(da9150->regmap, reg, buf, count); da9150 251 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to bulk write to reg 0x%x %d\n", da9150 398 drivers/mfd/da9150-core.c struct da9150 *da9150; da9150 403 drivers/mfd/da9150-core.c da9150 = devm_kzalloc(&client->dev, sizeof(*da9150), GFP_KERNEL); da9150 404 drivers/mfd/da9150-core.c if (!da9150) da9150 407 drivers/mfd/da9150-core.c da9150->dev = &client->dev; da9150 408 drivers/mfd/da9150-core.c da9150->irq = client->irq; da9150 409 drivers/mfd/da9150-core.c i2c_set_clientdata(client, da9150); da9150 411 drivers/mfd/da9150-core.c da9150->regmap = devm_regmap_init_i2c(client, &da9150_regmap_config); da9150 412 drivers/mfd/da9150-core.c if (IS_ERR(da9150->regmap)) { da9150 413 drivers/mfd/da9150-core.c ret = PTR_ERR(da9150->regmap); da9150 414 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to allocate register map: %d\n", da9150 420 drivers/mfd/da9150-core.c qif_addr = da9150_reg_read(da9150, DA9150_CORE2WIRE_CTRL_A); da9150 423 drivers/mfd/da9150-core.c da9150->core_qif = i2c_new_dummy_device(client->adapter, qif_addr); da9150 424 drivers/mfd/da9150-core.c if (IS_ERR(da9150->core_qif)) { da9150 425 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to attach QIF client\n"); da9150 426 drivers/mfd/da9150-core.c return PTR_ERR(da9150->core_qif); da9150 429 drivers/mfd/da9150-core.c i2c_set_clientdata(da9150->core_qif, da9150); da9150 432 drivers/mfd/da9150-core.c da9150->irq_base = pdata->irq_base; da9150 438 drivers/mfd/da9150-core.c da9150->irq_base = -1; da9150 441 drivers/mfd/da9150-core.c ret = regmap_add_irq_chip(da9150->regmap, da9150->irq, da9150 443 drivers/mfd/da9150-core.c da9150->irq_base, &da9150_regmap_irq_chip, da9150 444 drivers/mfd/da9150-core.c &da9150->regmap_irq_data); da9150 446 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to add regmap irq chip: %d\n", da9150 452 drivers/mfd/da9150-core.c da9150->irq_base = regmap_irq_chip_get_base(da9150->regmap_irq_data); da9150 454 drivers/mfd/da9150-core.c enable_irq_wake(da9150->irq); da9150 456 drivers/mfd/da9150-core.c ret = mfd_add_devices(da9150->dev, -1, da9150_devs, da9150 458 drivers/mfd/da9150-core.c da9150->irq_base, NULL); da9150 460 drivers/mfd/da9150-core.c dev_err(da9150->dev, "Failed to add child devices: %d\n", ret); da9150 467 drivers/mfd/da9150-core.c regmap_del_irq_chip(da9150->irq, da9150->regmap_irq_data); da9150 469 drivers/mfd/da9150-core.c i2c_unregister_device(da9150->core_qif); da9150 476 drivers/mfd/da9150-core.c struct da9150 *da9150 = i2c_get_clientdata(client); da9150 478 drivers/mfd/da9150-core.c regmap_del_irq_chip(da9150->irq, da9150->regmap_irq_data); da9150 479 drivers/mfd/da9150-core.c mfd_remove_devices(da9150->dev); da9150 480 drivers/mfd/da9150-core.c i2c_unregister_device(da9150->core_qif); da9150 487 drivers/mfd/da9150-core.c struct da9150 *da9150 = i2c_get_clientdata(client); da9150 490 drivers/mfd/da9150-core.c da9150_set_bits(da9150, DA9150_CONFIG_D, da9150 495 drivers/mfd/da9150-core.c da9150_set_bits(da9150, DA9150_CONTROL_C, da9150 26 drivers/power/supply/da9150-charger.c struct da9150 *da9150; da9150 144 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(charger->da9150, DA9150_STATUS_H); da9150 153 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(charger->da9150, DA9150_STATUS_J); da9150 186 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(charger->da9150, DA9150_STATUS_J); da9150 223 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(charger->da9150, DA9150_STATUS_J); da9150 237 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(charger->da9150, DA9150_STATUS_J); da9150 261 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(charger->da9150, DA9150_PPR_CHGCTRL_C); da9150 289 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(charger->da9150, DA9150_PPR_CHGCTRL_D); da9150 302 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(charger->da9150, DA9150_PPR_CHGCTRL_B); da9150 401 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(charger->da9150, DA9150_STATUS_H); da9150 433 drivers/power/supply/da9150-charger.c da9150_set_bits(charger->da9150, DA9150_PPR_BKCTRL_A, da9150 440 drivers/power/supply/da9150-charger.c da9150_set_bits(charger->da9150, DA9150_PPR_BKCTRL_A, da9150 517 drivers/power/supply/da9150-charger.c struct da9150 *da9150 = dev_get_drvdata(dev->parent); da9150 527 drivers/power/supply/da9150-charger.c charger->da9150 = da9150; da9150 569 drivers/power/supply/da9150-charger.c reg = da9150_reg_read(da9150, DA9150_STATUS_H); da9150 73 drivers/power/supply/da9150-fg.c struct da9150 *da9150; da9150 99 drivers/power/supply/da9150-fg.c da9150_read_qif(fg->da9150, read_addr, size, buf); da9150 121 drivers/power/supply/da9150-fg.c da9150_write_qif(fg->da9150, write_addr, size, buf); da9150 448 drivers/power/supply/da9150-fg.c struct da9150 *da9150 = dev_get_drvdata(dev->parent); da9150 458 drivers/power/supply/da9150-fg.c fg->da9150 = da9150; da9150 464 drivers/power/supply/da9150-fg.c da9150_set_bits(da9150, DA9150_CORE2WIRE_CTRL_A, DA9150_FG_QIF_EN_MASK, da9150 71 include/linux/mfd/da9150/core.h void da9150_read_qif(struct da9150 *da9150, u8 addr, int count, u8 *buf); da9150 72 include/linux/mfd/da9150/core.h void da9150_write_qif(struct da9150 *da9150, u8 addr, int count, const u8 *buf); da9150 74 include/linux/mfd/da9150/core.h u8 da9150_reg_read(struct da9150 *da9150, u16 reg); da9150 75 include/linux/mfd/da9150/core.h void da9150_reg_write(struct da9150 *da9150, u16 reg, u8 val); da9150 76 include/linux/mfd/da9150/core.h void da9150_set_bits(struct da9150 *da9150, u16 reg, u8 mask, u8 val); da9150 78 include/linux/mfd/da9150/core.h void da9150_bulk_read(struct da9150 *da9150, u16 reg, int count, u8 *buf); da9150 79 include/linux/mfd/da9150/core.h void da9150_bulk_write(struct da9150 *da9150, u16 reg, int count, const u8 *buf);