tps65910 22 drivers/gpio/gpio-tps65910.c struct tps65910 *tps65910; tps65910 28 drivers/gpio/gpio-tps65910.c struct tps65910 *tps65910 = tps65910_gpio->tps65910; tps65910 31 drivers/gpio/gpio-tps65910.c tps65910_reg_read(tps65910, TPS65910_GPIO0 + offset, &val); tps65910 43 drivers/gpio/gpio-tps65910.c struct tps65910 *tps65910 = tps65910_gpio->tps65910; tps65910 46 drivers/gpio/gpio-tps65910.c tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset, tps65910 49 drivers/gpio/gpio-tps65910.c tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset, tps65910 57 drivers/gpio/gpio-tps65910.c struct tps65910 *tps65910 = tps65910_gpio->tps65910; tps65910 62 drivers/gpio/gpio-tps65910.c return tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset, tps65910 69 drivers/gpio/gpio-tps65910.c struct tps65910 *tps65910 = tps65910_gpio->tps65910; tps65910 71 drivers/gpio/gpio-tps65910.c return tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset, tps65910 77 drivers/gpio/gpio-tps65910.c struct tps65910 *tps65910, int chip_ngpio) tps65910 79 drivers/gpio/gpio-tps65910.c struct tps65910_board *tps65910_board = tps65910->of_plat_data; tps65910 86 drivers/gpio/gpio-tps65910.c ret = of_property_read_u32_array(tps65910->dev->of_node, tps65910 100 drivers/gpio/gpio-tps65910.c struct tps65910 *tps65910, int chip_ngpio) tps65910 108 drivers/gpio/gpio-tps65910.c struct tps65910 *tps65910 = dev_get_drvdata(pdev->dev.parent); tps65910 109 drivers/gpio/gpio-tps65910.c struct tps65910_board *pdata = dev_get_platdata(tps65910->dev); tps65910 119 drivers/gpio/gpio-tps65910.c tps65910_gpio->tps65910 = tps65910; tps65910 122 drivers/gpio/gpio-tps65910.c tps65910_gpio->gpio_chip.label = tps65910->i2c_client->name; tps65910 124 drivers/gpio/gpio-tps65910.c switch (tps65910_chip_id(tps65910)) { tps65910 141 drivers/gpio/gpio-tps65910.c tps65910_gpio->gpio_chip.of_node = tps65910->dev->of_node; tps65910 148 drivers/gpio/gpio-tps65910.c if (!pdata && tps65910->dev->of_node) tps65910 149 drivers/gpio/gpio-tps65910.c pdata = tps65910_parse_dt_for_gpio(&pdev->dev, tps65910, tps65910 160 drivers/gpio/gpio-tps65910.c ret = tps65910_reg_set_bits(tps65910, tps65910 163 drivers/gpio/gpio-tps65910.c dev_warn(tps65910->dev, tps65910 222 drivers/mfd/tps65910.c static int tps65910_irq_init(struct tps65910 *tps65910, int irq, tps65910 229 drivers/mfd/tps65910.c dev_warn(tps65910->dev, "No interrupt support, no core IRQ\n"); tps65910 234 drivers/mfd/tps65910.c dev_warn(tps65910->dev, "No interrupt support, no pdata\n"); tps65910 238 drivers/mfd/tps65910.c switch (tps65910_chip_id(tps65910)) { tps65910 247 drivers/mfd/tps65910.c tps65910->chip_irq = irq; tps65910 248 drivers/mfd/tps65910.c ret = devm_regmap_add_irq_chip(tps65910->dev, tps65910->regmap, tps65910 249 drivers/mfd/tps65910.c tps65910->chip_irq, tps65910 251 drivers/mfd/tps65910.c tps6591x_irqs_chip, &tps65910->irq_data); tps65910 253 drivers/mfd/tps65910.c dev_warn(tps65910->dev, "Failed to add irq_chip %d\n", ret); tps65910 254 drivers/mfd/tps65910.c tps65910->chip_irq = 0; tps65910 261 drivers/mfd/tps65910.c struct tps65910 *tps65910 = dev_get_drvdata(dev); tps65910 270 drivers/mfd/tps65910.c if (tps65910_chip_id(tps65910) == TPS65910) tps65910 287 drivers/mfd/tps65910.c static int tps65910_ck32k_init(struct tps65910 *tps65910, tps65910 295 drivers/mfd/tps65910.c ret = tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL, tps65910 298 drivers/mfd/tps65910.c dev_err(tps65910->dev, "clear ck32k_ctrl failed: %d\n", ret); tps65910 305 drivers/mfd/tps65910.c static int tps65910_sleepinit(struct tps65910 *tps65910, tps65910 314 drivers/mfd/tps65910.c dev = tps65910->dev; tps65910 317 drivers/mfd/tps65910.c ret = tps65910_reg_set_bits(tps65910, TPS65910_DEVCTRL, tps65910 325 drivers/mfd/tps65910.c ret = tps65910_reg_set_bits(tps65910, tps65910 335 drivers/mfd/tps65910.c ret = tps65910_reg_set_bits(tps65910, tps65910 345 drivers/mfd/tps65910.c ret = tps65910_reg_set_bits(tps65910, tps65910 357 drivers/mfd/tps65910.c tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL, tps65910 435 drivers/mfd/tps65910.c struct tps65910 *tps65910; tps65910 437 drivers/mfd/tps65910.c tps65910 = dev_get_drvdata(&tps65910_i2c_client->dev); tps65910 439 drivers/mfd/tps65910.c if (tps65910_reg_set_bits(tps65910, TPS65910_DEVCTRL, tps65910 443 drivers/mfd/tps65910.c tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL, tps65910 450 drivers/mfd/tps65910.c struct tps65910 *tps65910; tps65910 471 drivers/mfd/tps65910.c tps65910 = devm_kzalloc(&i2c->dev, sizeof(*tps65910), GFP_KERNEL); tps65910 472 drivers/mfd/tps65910.c if (tps65910 == NULL) tps65910 475 drivers/mfd/tps65910.c tps65910->of_plat_data = of_pmic_plat_data; tps65910 476 drivers/mfd/tps65910.c i2c_set_clientdata(i2c, tps65910); tps65910 477 drivers/mfd/tps65910.c tps65910->dev = &i2c->dev; tps65910 478 drivers/mfd/tps65910.c tps65910->i2c_client = i2c; tps65910 479 drivers/mfd/tps65910.c tps65910->id = chip_id; tps65910 486 drivers/mfd/tps65910.c tps65910->regmap = devm_regmap_init_i2c(i2c, &tps65910_regmap_config); tps65910 487 drivers/mfd/tps65910.c if (IS_ERR(tps65910->regmap)) { tps65910 488 drivers/mfd/tps65910.c ret = PTR_ERR(tps65910->regmap); tps65910 496 drivers/mfd/tps65910.c tps65910_irq_init(tps65910, init_data->irq, init_data); tps65910 497 drivers/mfd/tps65910.c tps65910_ck32k_init(tps65910, pmic_plat_data); tps65910 498 drivers/mfd/tps65910.c tps65910_sleepinit(tps65910, pmic_plat_data); tps65910 505 drivers/mfd/tps65910.c ret = devm_mfd_add_devices(tps65910->dev, -1, tps65910 508 drivers/mfd/tps65910.c regmap_irq_get_domain(tps65910->irq_data)); tps65910 53 drivers/mfd/tps65911-comparator.c static int comp_threshold_set(struct tps65910 *tps65910, int id, int voltage) tps65910 72 drivers/mfd/tps65911-comparator.c ret = tps65910_reg_write(tps65910, tps_comp.reg, val); tps65910 77 drivers/mfd/tps65911-comparator.c static int comp_threshold_get(struct tps65910 *tps65910, int id) tps65910 83 drivers/mfd/tps65911-comparator.c ret = tps65910_reg_read(tps65910, tps_comp.reg, &val); tps65910 94 drivers/mfd/tps65911-comparator.c struct tps65910 *tps65910 = dev_get_drvdata(dev->parent); tps65910 105 drivers/mfd/tps65911-comparator.c uVolt = comp_threshold_get(tps65910, id); tps65910 115 drivers/mfd/tps65911-comparator.c struct tps65910 *tps65910 = dev_get_drvdata(pdev->dev.parent); tps65910 116 drivers/mfd/tps65911-comparator.c struct tps65910_board *pdata = dev_get_platdata(tps65910->dev); tps65910 119 drivers/mfd/tps65911-comparator.c ret = comp_threshold_set(tps65910, COMP1, pdata->vmbch_threshold); tps65910 125 drivers/mfd/tps65911-comparator.c ret = comp_threshold_set(tps65910, COMP2, pdata->vmbch2_threshold); tps65910 145 drivers/mfd/tps65911-comparator.c struct tps65910 *tps65910; tps65910 147 drivers/mfd/tps65911-comparator.c tps65910 = dev_get_drvdata(pdev->dev.parent); tps65910 310 drivers/regulator/tps65910-regulator.c struct tps65910 *mfd; tps65910 393 drivers/regulator/tps65910-regulator.c struct tps65910 *mfd = pmic->mfd; tps65910 823 drivers/regulator/tps65910-regulator.c struct tps65910 *mfd = pmic->mfd; tps65910 1002 drivers/regulator/tps65910-regulator.c struct tps65910 *tps65910 = dev_get_drvdata(pdev->dev.parent); tps65910 1020 drivers/regulator/tps65910-regulator.c switch (tps65910_chip_id(tps65910)) { tps65910 1073 drivers/regulator/tps65910-regulator.c struct tps65910 *tps65910 = dev_get_drvdata(pdev->dev.parent); tps65910 1082 drivers/regulator/tps65910-regulator.c pmic_plat_data = dev_get_platdata(tps65910->dev); tps65910 1083 drivers/regulator/tps65910-regulator.c if (!pmic_plat_data && tps65910->dev->of_node) tps65910 1096 drivers/regulator/tps65910-regulator.c pmic->mfd = tps65910; tps65910 1105 drivers/regulator/tps65910-regulator.c switch (tps65910_chip_id(tps65910)) { tps65910 1168 drivers/regulator/tps65910-regulator.c if (tps65910_chip_id(tps65910) == TPS65910) { tps65910 1176 drivers/regulator/tps65910-regulator.c tps65910_chip_id(tps65910) == TPS65910) { tps65910 1180 drivers/regulator/tps65910-regulator.c if (tps65910_chip_id(tps65910) == TPS65910) { tps65910 1195 drivers/regulator/tps65910-regulator.c dev_warn(tps65910->dev, tps65910 1203 drivers/regulator/tps65910-regulator.c config.dev = tps65910->dev; tps65910 1206 drivers/regulator/tps65910-regulator.c config.regmap = tps65910->regmap; tps65910 1214 drivers/regulator/tps65910-regulator.c dev_err(tps65910->dev, tps65910 49 drivers/rtc/rtc-tps65910.c struct tps65910 *tps = dev_get_drvdata(dev->parent); tps65910 70 drivers/rtc/rtc-tps65910.c struct tps65910 *tps = dev_get_drvdata(dev->parent); tps65910 101 drivers/rtc/rtc-tps65910.c struct tps65910 *tps = dev_get_drvdata(dev->parent); tps65910 143 drivers/rtc/rtc-tps65910.c struct tps65910 *tps = dev_get_drvdata(dev->parent); tps65910 173 drivers/rtc/rtc-tps65910.c struct tps65910 *tps = dev_get_drvdata(dev->parent); tps65910 204 drivers/rtc/rtc-tps65910.c struct tps65910 *tps = dev_get_drvdata(dev->parent); tps65910 249 drivers/rtc/rtc-tps65910.c struct tps65910 *tps = dev_get_drvdata(dev->parent); tps65910 332 drivers/rtc/rtc-tps65910.c struct tps65910 *tps = dev_get_drvdata(dev->parent); tps65910 366 drivers/rtc/rtc-tps65910.c struct tps65910 *tps65910 = NULL; tps65910 372 drivers/rtc/rtc-tps65910.c tps65910 = dev_get_drvdata(pdev->dev.parent); tps65910 384 drivers/rtc/rtc-tps65910.c ret = regmap_read(tps65910->regmap, TPS65910_RTC_STATUS, &rtc_reg); tps65910 388 drivers/rtc/rtc-tps65910.c ret = regmap_write(tps65910->regmap, TPS65910_RTC_STATUS, rtc_reg); tps65910 395 drivers/rtc/rtc-tps65910.c ret = regmap_update_bits(tps65910->regmap, TPS65910_DEVCTRL, tps65910 401 drivers/rtc/rtc-tps65910.c ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg); tps65910 911 include/linux/mfd/tps65910.h static inline int tps65910_chip_id(struct tps65910 *tps65910) tps65910 913 include/linux/mfd/tps65910.h return tps65910->id; tps65910 916 include/linux/mfd/tps65910.h static inline int tps65910_reg_read(struct tps65910 *tps65910, u8 reg, tps65910 919 include/linux/mfd/tps65910.h return regmap_read(tps65910->regmap, reg, val); tps65910 922 include/linux/mfd/tps65910.h static inline int tps65910_reg_write(struct tps65910 *tps65910, u8 reg, tps65910 925 include/linux/mfd/tps65910.h return regmap_write(tps65910->regmap, reg, val); tps65910 928 include/linux/mfd/tps65910.h static inline int tps65910_reg_set_bits(struct tps65910 *tps65910, u8 reg, tps65910 931 include/linux/mfd/tps65910.h return regmap_update_bits(tps65910->regmap, reg, mask, mask); tps65910 934 include/linux/mfd/tps65910.h static inline int tps65910_reg_clear_bits(struct tps65910 *tps65910, u8 reg, tps65910 937 include/linux/mfd/tps65910.h return regmap_update_bits(tps65910->regmap, reg, mask, 0); tps65910 940 include/linux/mfd/tps65910.h static inline int tps65910_reg_update_bits(struct tps65910 *tps65910, u8 reg, tps65910 943 include/linux/mfd/tps65910.h return regmap_update_bits(tps65910->regmap, reg, mask, val); tps65910 946 include/linux/mfd/tps65910.h static inline int tps65910_irq_get_virq(struct tps65910 *tps65910, int irq) tps65910 948 include/linux/mfd/tps65910.h return regmap_irq_get_virq(tps65910->irq_data, irq);