Lines Matching full:pcf8563

3  * An I2C driver for the Philips PCF8563 RTC
11 * http://www.semiconductors.philips.com/acrobat/datasheets/PCF8563-04.pdf
62 struct pcf8563 { struct
66 * From PCF8563 datasheet: this bit is toggled when the years
177 struct pcf8563 *pcf8563 = i2c_get_clientdata(dev_id); in pcf8563_irq() local
181 err = pcf8563_get_alarm_mode(pcf8563->client, NULL, &pending); in pcf8563_irq()
186 rtc_update_irq(pcf8563->rtc, 1, RTC_IRQF | RTC_AF); in pcf8563_irq()
187 pcf8563_set_alarm_mode(pcf8563->client, 1); in pcf8563_irq()
195 * In the routines that deal directly with the pcf8563 hardware, we use
201 struct pcf8563 *pcf8563 = i2c_get_clientdata(client); in pcf8563_rtc_read_time() local
232 pcf8563->c_polarity = (buf[PCF8563_REG_MO] & PCF8563_MO_C) ? in pcf8563_rtc_read_time()
247 struct pcf8563 *pcf8563 = i2c_get_clientdata(client); in pcf8563_rtc_set_time() local
268 if (pcf8563->c_polarity ? (tm->tm_year >= 100) : (tm->tm_year < 100)) in pcf8563_rtc_set_time()
369 #define clkout_hw_to_pcf8563(_hw) container_of(_hw, struct pcf8563, clkout_hw)
381 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw); in pcf8563_clkout_recalc_rate() local
382 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_recalc_rate()
408 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw); in pcf8563_clkout_set_rate() local
409 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_set_rate()
432 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw); in pcf8563_clkout_control() local
433 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_control()
461 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw); in pcf8563_clkout_is_prepared() local
462 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_is_prepared()
481 static struct clk *pcf8563_clkout_register_clk(struct pcf8563 *pcf8563) in pcf8563_clkout_register_clk() argument
483 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_register_clk()
496 init.name = "pcf8563-clkout"; in pcf8563_clkout_register_clk()
501 pcf8563->clkout_hw.init = &init; in pcf8563_clkout_register_clk()
507 clk = devm_clk_register(&client->dev, &pcf8563->clkout_hw); in pcf8563_clkout_register_clk()
528 struct pcf8563 *pcf8563; in pcf8563_probe() local
537 pcf8563 = devm_kzalloc(&client->dev, sizeof(struct pcf8563), in pcf8563_probe()
539 if (!pcf8563) in pcf8563_probe()
542 i2c_set_clientdata(client, pcf8563); in pcf8563_probe()
543 pcf8563->client = client; in pcf8563_probe()
562 pcf8563->rtc = devm_rtc_allocate_device(&client->dev); in pcf8563_probe()
563 if (IS_ERR(pcf8563->rtc)) in pcf8563_probe()
564 return PTR_ERR(pcf8563->rtc); in pcf8563_probe()
566 pcf8563->rtc->ops = &pcf8563_rtc_ops; in pcf8563_probe()
567 /* the pcf8563 alarm only supports a minute accuracy */ in pcf8563_probe()
568 pcf8563->rtc->uie_unsupported = 1; in pcf8563_probe()
569 pcf8563->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; in pcf8563_probe()
570 pcf8563->rtc->range_max = RTC_TIMESTAMP_END_2099; in pcf8563_probe()
571 pcf8563->rtc->set_start_time = true; in pcf8563_probe()
585 err = rtc_register_device(pcf8563->rtc); in pcf8563_probe()
591 pcf8563_clkout_register_clk(pcf8563); in pcf8563_probe()
598 { "pcf8563", 0 },
606 { .compatible = "nxp,pcf8563" },
616 .name = "rtc-pcf8563",
626 MODULE_DESCRIPTION("Philips PCF8563/Epson RTC8564 RTC driver");