Symbol: pcf85063
drivers/rtc/rtc-pcf85063.c
117
struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf85063.c
125
rc = regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL1,
drivers/rtc/rtc-pcf85063.c
151
rc = regmap_bulk_write(pcf85063->regmap, PCF85063_REG_SC,
drivers/rtc/rtc-pcf85063.c
161
return regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL1,
drivers/rtc/rtc-pcf85063.c
167
struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf85063.c
172
ret = regmap_bulk_read(pcf85063->regmap, PCF85063_REG_ALM_S,
drivers/rtc/rtc-pcf85063.c
182
ret = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &val);
drivers/rtc/rtc-pcf85063.c
193
struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf85063.c
203
ret = regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2,
drivers/rtc/rtc-pcf85063.c
208
ret = regmap_bulk_write(pcf85063->regmap, PCF85063_REG_ALM_S,
drivers/rtc/rtc-pcf85063.c
213
return regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2,
drivers/rtc/rtc-pcf85063.c
221
struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf85063.c
223
return regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2,
drivers/rtc/rtc-pcf85063.c
230
struct pcf85063 *pcf85063 = dev_id;
drivers/rtc/rtc-pcf85063.c
234
err = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &val);
drivers/rtc/rtc-pcf85063.c
239
rtc_update_irq(pcf85063->rtc, 1, RTC_IRQF | RTC_AF);
drivers/rtc/rtc-pcf85063.c
240
regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2,
drivers/rtc/rtc-pcf85063.c
251
struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf85063.c
256
ret = regmap_read(pcf85063->regmap, PCF85063_REG_OFFSET, &reg);
drivers/rtc/rtc-pcf85063.c
273
struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf85063.c
292
return regmap_write(pcf85063->regmap, PCF85063_REG_OFFSET, reg);
drivers/rtc/rtc-pcf85063.c
298
struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf85063.c
303
ret = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &status);
drivers/rtc/rtc-pcf85063.c
348
static int pcf85063_load_capacitance(struct pcf85063 *pcf85063,
drivers/rtc/rtc-pcf85063.c
362
dev_warn(&pcf85063->rtc->dev, "Unknown quartz-load-femtofarads value: %d. Assuming 7000",
drivers/rtc/rtc-pcf85063.c
372
return regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL1,
drivers/rtc/rtc-pcf85063.c
381
#define clkout_hw_to_pcf85063(_hw) container_of(_hw, struct pcf85063, clkout_hw)
drivers/rtc/rtc-pcf85063.c
397
struct pcf85063 *pcf85063 = clkout_hw_to_pcf85063(hw);
drivers/rtc/rtc-pcf85063.c
399
int ret = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &buf);
drivers/rtc/rtc-pcf85063.c
428
struct pcf85063 *pcf85063 = clkout_hw_to_pcf85063(hw);
drivers/rtc/rtc-pcf85063.c
433
return regmap_update_bits(pcf85063->regmap,
drivers/rtc/rtc-pcf85063.c
442
struct pcf85063 *pcf85063 = clkout_hw_to_pcf85063(hw);
drivers/rtc/rtc-pcf85063.c
446
ret = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &buf);
drivers/rtc/rtc-pcf85063.c
463
return regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2,
drivers/rtc/rtc-pcf85063.c
479
struct pcf85063 *pcf85063 = clkout_hw_to_pcf85063(hw);
drivers/rtc/rtc-pcf85063.c
481
int ret = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &buf);
drivers/rtc/rtc-pcf85063.c
498
static struct clk *pcf85063_clkout_register_clk(struct pcf85063 *pcf85063)
drivers/rtc/rtc-pcf85063.c
502
struct device_node *node = pcf85063->rtc->dev.parent->of_node;
drivers/rtc/rtc-pcf85063.c
521
pcf85063->clkout_hw.init = &init;
drivers/rtc/rtc-pcf85063.c
527
clk = devm_clk_register(&pcf85063->rtc->dev, &pcf85063->clkout_hw);
drivers/rtc/rtc-pcf85063.c
539
struct pcf85063 *pcf85063;
drivers/rtc/rtc-pcf85063.c
552
pcf85063 = devm_kzalloc(dev, sizeof(struct pcf85063),
drivers/rtc/rtc-pcf85063.c
554
if (!pcf85063)
drivers/rtc/rtc-pcf85063.c
557
pcf85063->regmap = regmap;
drivers/rtc/rtc-pcf85063.c
559
dev_set_drvdata(dev, pcf85063);
drivers/rtc/rtc-pcf85063.c
561
err = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &tmp);
drivers/rtc/rtc-pcf85063.c
565
pcf85063->rtc = devm_rtc_allocate_device(dev);
drivers/rtc/rtc-pcf85063.c
566
if (IS_ERR(pcf85063->rtc))
drivers/rtc/rtc-pcf85063.c
567
return PTR_ERR(pcf85063->rtc);
drivers/rtc/rtc-pcf85063.c
577
err = regmap_write(pcf85063->regmap, PCF85063_REG_CTRL1,
drivers/rtc/rtc-pcf85063.c
583
err = pcf85063_load_capacitance(pcf85063, dev->of_node,
drivers/rtc/rtc-pcf85063.c
589
pcf85063->rtc->ops = &pcf85063_rtc_ops;
drivers/rtc/rtc-pcf85063.c
590
pcf85063->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
drivers/rtc/rtc-pcf85063.c
591
pcf85063->rtc->range_max = RTC_TIMESTAMP_END_2099;
drivers/rtc/rtc-pcf85063.c
592
set_bit(RTC_FEATURE_ALARM_RES_2S, pcf85063->rtc->features);
drivers/rtc/rtc-pcf85063.c
593
clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, pcf85063->rtc->features);
drivers/rtc/rtc-pcf85063.c
594
clear_bit(RTC_FEATURE_ALARM, pcf85063->rtc->features);
drivers/rtc/rtc-pcf85063.c
605
"pcf85063", pcf85063);
drivers/rtc/rtc-pcf85063.c
607
dev_warn(&pcf85063->rtc->dev,
drivers/rtc/rtc-pcf85063.c
610
set_bit(RTC_FEATURE_ALARM, pcf85063->rtc->features);
drivers/rtc/rtc-pcf85063.c
614
dev_err(&pcf85063->rtc->dev,
drivers/rtc/rtc-pcf85063.c
619
nvmem_cfg.priv = pcf85063->regmap;
drivers/rtc/rtc-pcf85063.c
620
devm_rtc_nvmem_register(pcf85063->rtc, &nvmem_cfg);
drivers/rtc/rtc-pcf85063.c
624
pcf85063_clkout_register_clk(pcf85063);
drivers/rtc/rtc-pcf85063.c
627
return devm_rtc_register_device(pcf85063->rtc);
drivers/rtc/rtc-pcf85063.c
82
struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf85063.c
92
rc = regmap_bulk_read(pcf85063->regmap, PCF85063_REG_SC, regs,
drivers/rtc/rtc-pcf85063.c
99
dev_warn(&pcf85063->rtc->dev, "Power loss detected, invalid time\n");