Lines Matching defs:pcf8563
62 struct pcf8563 {
177 struct pcf8563 *pcf8563 = i2c_get_clientdata(dev_id);
181 err = pcf8563_get_alarm_mode(pcf8563->client, NULL, &pending);
186 rtc_update_irq(pcf8563->rtc, 1, RTC_IRQF | RTC_AF);
187 pcf8563_set_alarm_mode(pcf8563->client, 1);
195 * In the routines that deal directly with the pcf8563 hardware, we use
201 struct pcf8563 *pcf8563 = i2c_get_clientdata(client);
232 pcf8563->c_polarity = (buf[PCF8563_REG_MO] & PCF8563_MO_C) ?
247 struct pcf8563 *pcf8563 = i2c_get_clientdata(client);
268 if (pcf8563->c_polarity ? (tm->tm_year >= 100) : (tm->tm_year < 100))
356 #define clkout_hw_to_pcf8563(_hw) container_of(_hw, struct pcf8563, clkout_hw)
368 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
369 struct i2c_client *client = pcf8563->client;
395 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
396 struct i2c_client *client = pcf8563->client;
419 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
420 struct i2c_client *client = pcf8563->client;
448 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
449 struct i2c_client *client = pcf8563->client;
468 static struct clk *pcf8563_clkout_register_clk(struct pcf8563 *pcf8563)
470 struct i2c_client *client = pcf8563->client;
483 init.name = "pcf8563-clkout";
488 pcf8563->clkout_hw.init = &init;
494 clk = devm_clk_register(&client->dev, &pcf8563->clkout_hw);
514 struct pcf8563 *pcf8563;
523 pcf8563 = devm_kzalloc(&client->dev, sizeof(struct pcf8563),
525 if (!pcf8563)
528 i2c_set_clientdata(client, pcf8563);
529 pcf8563->client = client;
548 pcf8563->rtc = devm_rtc_allocate_device(&client->dev);
549 if (IS_ERR(pcf8563->rtc))
550 return PTR_ERR(pcf8563->rtc);
552 pcf8563->rtc->ops = &pcf8563_rtc_ops;
553 /* the pcf8563 alarm only supports a minute accuracy */
554 set_bit(RTC_FEATURE_ALARM_RES_MINUTE, pcf8563->rtc->features);
555 clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, pcf8563->rtc->features);
556 pcf8563->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
557 pcf8563->rtc->range_max = RTC_TIMESTAMP_END_2099;
558 pcf8563->rtc->set_start_time = true;
576 clear_bit(RTC_FEATURE_ALARM, pcf8563->rtc->features);
579 err = devm_rtc_register_device(pcf8563->rtc);
585 pcf8563_clkout_register_clk(pcf8563);
592 { "pcf8563", 0 },
601 { .compatible = "nxp,pcf8563" },
612 .name = "rtc-pcf8563",