pcf85063 68 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063 = dev_get_drvdata(dev); pcf85063 78 drivers/rtc/rtc-pcf85063.c rc = regmap_bulk_read(pcf85063->regmap, PCF85063_REG_SC, regs, pcf85063 85 drivers/rtc/rtc-pcf85063.c dev_warn(&pcf85063->rtc->dev, "Power loss detected, invalid time\n"); pcf85063 103 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063 = dev_get_drvdata(dev); pcf85063 111 drivers/rtc/rtc-pcf85063.c rc = regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL1, pcf85063 136 drivers/rtc/rtc-pcf85063.c rc = regmap_bulk_write(pcf85063->regmap, PCF85063_REG_SC, pcf85063 146 drivers/rtc/rtc-pcf85063.c return regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL1, pcf85063 152 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063 = dev_get_drvdata(dev); pcf85063 157 drivers/rtc/rtc-pcf85063.c ret = regmap_bulk_read(pcf85063->regmap, PCF85063_REG_ALM_S, pcf85063 167 drivers/rtc/rtc-pcf85063.c ret = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &val); pcf85063 178 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063 = dev_get_drvdata(dev); pcf85063 188 drivers/rtc/rtc-pcf85063.c ret = regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2, pcf85063 193 drivers/rtc/rtc-pcf85063.c ret = regmap_bulk_write(pcf85063->regmap, PCF85063_REG_ALM_S, pcf85063 198 drivers/rtc/rtc-pcf85063.c return regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2, pcf85063 206 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063 = dev_get_drvdata(dev); pcf85063 208 drivers/rtc/rtc-pcf85063.c return regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2, pcf85063 215 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063 = dev_id; pcf85063 219 drivers/rtc/rtc-pcf85063.c err = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &val); pcf85063 224 drivers/rtc/rtc-pcf85063.c rtc_update_irq(pcf85063->rtc, 1, RTC_IRQF | RTC_AF); pcf85063 225 drivers/rtc/rtc-pcf85063.c regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2, pcf85063 236 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063 = dev_get_drvdata(dev); pcf85063 241 drivers/rtc/rtc-pcf85063.c ret = regmap_read(pcf85063->regmap, PCF85063_REG_OFFSET, ®); pcf85063 258 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063 = dev_get_drvdata(dev); pcf85063 277 drivers/rtc/rtc-pcf85063.c return regmap_write(pcf85063->regmap, PCF85063_REG_OFFSET, reg); pcf85063 283 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063 = dev_get_drvdata(dev); pcf85063 288 drivers/rtc/rtc-pcf85063.c ret = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &status); pcf85063 293 drivers/rtc/rtc-pcf85063.c dev_warn(&pcf85063->rtc->dev, "Voltage low, data loss detected.\n"); pcf85063 303 drivers/rtc/rtc-pcf85063.c ret = regmap_update_bits(pcf85063->regmap, PCF85063_REG_SC, pcf85063 344 drivers/rtc/rtc-pcf85063.c static int pcf85063_load_capacitance(struct pcf85063 *pcf85063, pcf85063 358 drivers/rtc/rtc-pcf85063.c dev_warn(&pcf85063->rtc->dev, "Unknown quartz-load-femtofarads value: %d. Assuming 7000", pcf85063 368 drivers/rtc/rtc-pcf85063.c return regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL1, pcf85063 401 drivers/rtc/rtc-pcf85063.c struct pcf85063 *pcf85063; pcf85063 416 drivers/rtc/rtc-pcf85063.c pcf85063 = devm_kzalloc(&client->dev, sizeof(struct pcf85063), pcf85063 418 drivers/rtc/rtc-pcf85063.c if (!pcf85063) pcf85063 424 drivers/rtc/rtc-pcf85063.c pcf85063->regmap = devm_regmap_init_i2c(client, &config->regmap); pcf85063 425 drivers/rtc/rtc-pcf85063.c if (IS_ERR(pcf85063->regmap)) pcf85063 426 drivers/rtc/rtc-pcf85063.c return PTR_ERR(pcf85063->regmap); pcf85063 428 drivers/rtc/rtc-pcf85063.c i2c_set_clientdata(client, pcf85063); pcf85063 430 drivers/rtc/rtc-pcf85063.c err = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL1, &tmp); pcf85063 436 drivers/rtc/rtc-pcf85063.c pcf85063->rtc = devm_rtc_allocate_device(&client->dev); pcf85063 437 drivers/rtc/rtc-pcf85063.c if (IS_ERR(pcf85063->rtc)) pcf85063 438 drivers/rtc/rtc-pcf85063.c return PTR_ERR(pcf85063->rtc); pcf85063 440 drivers/rtc/rtc-pcf85063.c err = pcf85063_load_capacitance(pcf85063, client->dev.of_node, pcf85063 446 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->ops = &pcf85063_rtc_ops; pcf85063 447 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; pcf85063 448 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->range_max = RTC_TIMESTAMP_END_2099; pcf85063 449 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->uie_unsupported = 1; pcf85063 455 drivers/rtc/rtc-pcf85063.c "pcf85063", pcf85063); pcf85063 457 drivers/rtc/rtc-pcf85063.c dev_warn(&pcf85063->rtc->dev, pcf85063 460 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->ops = &pcf85063_rtc_ops_alarm; pcf85063 464 drivers/rtc/rtc-pcf85063.c dev_err(&pcf85063->rtc->dev, pcf85063 469 drivers/rtc/rtc-pcf85063.c nvmem_cfg.priv = pcf85063->regmap; pcf85063 470 drivers/rtc/rtc-pcf85063.c rtc_nvmem_register(pcf85063->rtc, &nvmem_cfg); pcf85063 472 drivers/rtc/rtc-pcf85063.c return rtc_register_device(pcf85063->rtc);