Symbol: pcf8563
drivers/rtc/rtc-pcf8563.c
103
return regmap_write(pcf8563->regmap, PCF8563_REG_ST2, buf);
drivers/rtc/rtc-pcf8563.c
106
static int pcf8563_get_alarm_mode(struct pcf8563 *pcf8563, unsigned char *en,
drivers/rtc/rtc-pcf8563.c
112
err = regmap_read(pcf8563->regmap, PCF8563_REG_ST2, &buf);
drivers/rtc/rtc-pcf8563.c
126
struct pcf8563 *pcf8563 = dev_id;
drivers/rtc/rtc-pcf8563.c
130
err = pcf8563_get_alarm_mode(pcf8563, NULL, &pending);
drivers/rtc/rtc-pcf8563.c
135
rtc_update_irq(pcf8563->rtc, 1, RTC_IRQF | RTC_AF);
drivers/rtc/rtc-pcf8563.c
136
pcf8563_set_alarm_mode(pcf8563, 1);
drivers/rtc/rtc-pcf8563.c
149
struct pcf8563 *pcf8563 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf8563.c
153
err = regmap_bulk_read(pcf8563->regmap, PCF8563_REG_ST1, buf,
drivers/rtc/rtc-pcf8563.c
180
pcf8563->c_polarity = (buf[PCF8563_REG_MO] & PCF8563_MO_C) ?
drivers/rtc/rtc-pcf8563.c
194
struct pcf8563 *pcf8563 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf8563.c
215
if (pcf8563->c_polarity ? (tm->tm_year >= 100) : (tm->tm_year < 100))
drivers/rtc/rtc-pcf8563.c
220
return regmap_bulk_write(pcf8563->regmap, PCF8563_REG_SC,
drivers/rtc/rtc-pcf8563.c
227
struct pcf8563 *pcf8563 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf8563.c
232
ret = regmap_test_bits(pcf8563->regmap, PCF8563_REG_SC,
drivers/rtc/rtc-pcf8563.c
246
struct pcf8563 *pcf8563 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf8563.c
250
err = regmap_bulk_read(pcf8563->regmap, PCF8563_REG_AMN, buf,
drivers/rtc/rtc-pcf8563.c
265
err = pcf8563_get_alarm_mode(pcf8563, &tm->enabled, &tm->pending);
drivers/rtc/rtc-pcf8563.c
279
struct pcf8563 *pcf8563 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf8563.c
288
err = regmap_bulk_write(pcf8563->regmap, PCF8563_REG_AMN, buf,
drivers/rtc/rtc-pcf8563.c
293
return pcf8563_set_alarm_mode(pcf8563, !!tm->enabled);
drivers/rtc/rtc-pcf8563.c
298
struct pcf8563 *pcf8563 = dev_get_drvdata(dev);
drivers/rtc/rtc-pcf8563.c
301
return pcf8563_set_alarm_mode(pcf8563, !!enabled);
drivers/rtc/rtc-pcf8563.c
309
#define clkout_hw_to_pcf8563(_hw) container_of(_hw, struct pcf8563, clkout_hw)
drivers/rtc/rtc-pcf8563.c
321
struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
drivers/rtc/rtc-pcf8563.c
325
ret = regmap_read(pcf8563->regmap, PCF8563_REG_CLKO, &buf);
drivers/rtc/rtc-pcf8563.c
353
struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
drivers/rtc/rtc-pcf8563.c
357
ret = regmap_read(pcf8563->regmap, PCF8563_REG_CLKO, &buf);
drivers/rtc/rtc-pcf8563.c
365
return regmap_update_bits(pcf8563->regmap,
drivers/rtc/rtc-pcf8563.c
376
struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
drivers/rtc/rtc-pcf8563.c
380
ret = regmap_read(pcf8563->regmap, PCF8563_REG_CLKO, &buf);
drivers/rtc/rtc-pcf8563.c
389
return regmap_update_bits(pcf8563->regmap, PCF8563_REG_CLKO,
drivers/rtc/rtc-pcf8563.c
405
struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
drivers/rtc/rtc-pcf8563.c
409
ret = regmap_read(pcf8563->regmap, PCF8563_REG_CLKO, &buf);
drivers/rtc/rtc-pcf8563.c
425
static struct clk *pcf8563_clkout_register_clk(struct pcf8563 *pcf8563)
drivers/rtc/rtc-pcf8563.c
427
struct device_node *node = pcf8563->rtc->dev.parent->of_node;
drivers/rtc/rtc-pcf8563.c
433
ret = regmap_clear_bits(pcf8563->regmap, PCF8563_REG_CLKO,
drivers/rtc/rtc-pcf8563.c
443
pcf8563->clkout_hw.init = &init;
drivers/rtc/rtc-pcf8563.c
449
clk = devm_clk_register(&pcf8563->rtc->dev, &pcf8563->clkout_hw);
drivers/rtc/rtc-pcf8563.c
475
struct pcf8563 *pcf8563;
drivers/rtc/rtc-pcf8563.c
483
pcf8563 = devm_kzalloc(&client->dev, sizeof(struct pcf8563),
drivers/rtc/rtc-pcf8563.c
485
if (!pcf8563)
drivers/rtc/rtc-pcf8563.c
488
pcf8563->regmap = devm_regmap_init_i2c(client, &regmap_config);
drivers/rtc/rtc-pcf8563.c
489
if (IS_ERR(pcf8563->regmap))
drivers/rtc/rtc-pcf8563.c
490
return PTR_ERR(pcf8563->regmap);
drivers/rtc/rtc-pcf8563.c
492
i2c_set_clientdata(client, pcf8563);
drivers/rtc/rtc-pcf8563.c
496
err = regmap_set_bits(pcf8563->regmap, PCF8563_REG_TMRC,
drivers/rtc/rtc-pcf8563.c
504
err = regmap_write(pcf8563->regmap, PCF8563_REG_ST2, 0);
drivers/rtc/rtc-pcf8563.c
510
pcf8563->rtc = devm_rtc_allocate_device(&client->dev);
drivers/rtc/rtc-pcf8563.c
511
if (IS_ERR(pcf8563->rtc))
drivers/rtc/rtc-pcf8563.c
512
return PTR_ERR(pcf8563->rtc);
drivers/rtc/rtc-pcf8563.c
514
pcf8563->rtc->ops = &pcf8563_rtc_ops;
drivers/rtc/rtc-pcf8563.c
516
set_bit(RTC_FEATURE_ALARM_RES_MINUTE, pcf8563->rtc->features);
drivers/rtc/rtc-pcf8563.c
517
clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, pcf8563->rtc->features);
drivers/rtc/rtc-pcf8563.c
518
clear_bit(RTC_FEATURE_ALARM, pcf8563->rtc->features);
drivers/rtc/rtc-pcf8563.c
519
pcf8563->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
drivers/rtc/rtc-pcf8563.c
520
pcf8563->rtc->range_max = RTC_TIMESTAMP_END_2099;
drivers/rtc/rtc-pcf8563.c
521
pcf8563->rtc->set_start_time = true;
drivers/rtc/rtc-pcf8563.c
544
set_bit(RTC_FEATURE_ALARM, pcf8563->rtc->features);
drivers/rtc/rtc-pcf8563.c
547
err = devm_rtc_register_device(pcf8563->rtc);
drivers/rtc/rtc-pcf8563.c
553
pcf8563_clkout_register_clk(pcf8563);
drivers/rtc/rtc-pcf8563.c
87
static int pcf8563_set_alarm_mode(struct pcf8563 *pcf8563, bool on)
drivers/rtc/rtc-pcf8563.c
92
err = regmap_read(pcf8563->regmap, PCF8563_REG_ST2, &buf);