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))
369 #define clkout_hw_to_pcf8563(_hw) container_of(_hw, struct pcf8563, clkout_hw)
381 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
382 struct i2c_client *client = pcf8563->client;
408 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
409 struct i2c_client *client = pcf8563->client;
432 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
433 struct i2c_client *client = pcf8563->client;
461 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
462 struct i2c_client *client = pcf8563->client;
481 static struct clk *pcf8563_clkout_register_clk(struct pcf8563 *pcf8563)
483 struct i2c_client *client = pcf8563->client;
496 init.name = "pcf8563-clkout";
501 pcf8563->clkout_hw.init = &init;
507 clk = devm_clk_register(&client->dev, &pcf8563->clkout_hw);
528 struct pcf8563 *pcf8563;
537 pcf8563 = devm_kzalloc(&client->dev, sizeof(struct pcf8563),
539 if (!pcf8563)
542 i2c_set_clientdata(client, pcf8563);
543 pcf8563->client = client;
562 pcf8563->rtc = devm_rtc_allocate_device(&client->dev);
563 if (IS_ERR(pcf8563->rtc))
564 return PTR_ERR(pcf8563->rtc);
566 pcf8563->rtc->ops = &pcf8563_rtc_ops;
567 /* the pcf8563 alarm only supports a minute accuracy */
568 pcf8563->rtc->uie_unsupported = 1;
569 pcf8563->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
570 pcf8563->rtc->range_max = RTC_TIMESTAMP_END_2099;
571 pcf8563->rtc->set_start_time = true;
585 err = rtc_register_device(pcf8563->rtc);
591 pcf8563_clkout_register_clk(pcf8563);
598 { "pcf8563", 0 },
606 { .compatible = "nxp,pcf8563" },
616 .name = "rtc-pcf8563",