Lines Matching full:pcf8563

2  * An I2C driver for the Philips PCF8563 RTC
10 * http://www.semiconductors.philips.com/acrobat/datasheets/PCF8563-04.pdf
65 struct pcf8563 { struct
69 * From PCF8563 datasheet: this bit is toggled when the years
181 struct pcf8563 *pcf8563 = i2c_get_clientdata(dev_id); in pcf8563_irq() local
185 err = pcf8563_get_alarm_mode(pcf8563->client, NULL, &pending); in pcf8563_irq()
190 rtc_update_irq(pcf8563->rtc, 1, RTC_IRQF | RTC_AF); in pcf8563_irq()
191 pcf8563_set_alarm_mode(pcf8563->client, 1); in pcf8563_irq()
199 * In the routines that deal directly with the pcf8563 hardware, we use
204 struct pcf8563 *pcf8563 = i2c_get_clientdata(client); in pcf8563_get_datetime() local
213 pcf8563->voltage_low = 1; in pcf8563_get_datetime()
238 pcf8563->c_polarity = (buf[PCF8563_REG_MO] & PCF8563_MO_C) ? in pcf8563_get_datetime()
252 struct pcf8563 *pcf8563 = i2c_get_clientdata(client); in pcf8563_set_datetime() local
273 if (pcf8563->c_polarity ? (tm->tm_year >= 100) : (tm->tm_year < 100)) in pcf8563_set_datetime()
285 struct pcf8563 *pcf8563 = i2c_get_clientdata(to_i2c_client(dev)); in pcf8563_rtc_ioctl() local
290 /*if (pcf8563->voltage_low) in pcf8563_rtc_ioctl()
293 if (copy_to_user((void __user *)arg, &pcf8563->voltage_low, in pcf8563_rtc_ioctl()
309 pcf8563->voltage_low = 0; in pcf8563_rtc_ioctl()
404 #define clkout_hw_to_pcf8563(_hw) container_of(_hw, struct pcf8563, clkout_hw)
416 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw); in pcf8563_clkout_recalc_rate() local
417 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_recalc_rate()
443 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw); in pcf8563_clkout_set_rate() local
444 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_set_rate()
467 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw); in pcf8563_clkout_control() local
468 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_control()
496 struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw); in pcf8563_clkout_is_prepared() local
497 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_is_prepared()
516 static __maybe_unused struct clk *pcf8563_clkout_register_clk(struct pcf8563 *pcf8563) in pcf8563_clkout_register_clk() argument
518 struct i2c_client *client = pcf8563->client; in pcf8563_clkout_register_clk()
531 init.name = "pcf8563-clkout"; in pcf8563_clkout_register_clk()
536 pcf8563->clkout_hw.init = &init; in pcf8563_clkout_register_clk()
542 clk = devm_clk_register(&client->dev, &pcf8563->clkout_hw); in pcf8563_clkout_register_clk()
563 struct pcf8563 *pcf8563; in pcf8563_probe() local
572 pcf8563 = devm_kzalloc(&client->dev, sizeof(struct pcf8563), in pcf8563_probe()
574 if (!pcf8563) in pcf8563_probe()
577 i2c_set_clientdata(client, pcf8563); in pcf8563_probe()
578 pcf8563->client = client; in pcf8563_probe()
597 pcf8563->rtc = devm_rtc_device_register(&client->dev, in pcf8563_probe()
601 if (IS_ERR(pcf8563->rtc)) in pcf8563_probe()
602 return PTR_ERR(pcf8563->rtc); in pcf8563_probe()
619 // pcf8563_clkout_register_clk(pcf8563); in pcf8563_probe()
622 /* the pcf8563 alarm only supports a minute accuracy */ in pcf8563_probe()
623 pcf8563->rtc->uie_unsupported = 1; in pcf8563_probe()
629 { "pcf8563", 0 },
637 { .compatible = "nxp,pcf8563" },
645 .name = "rtc-pcf8563",
655 MODULE_DESCRIPTION("Philips PCF8563/Epson RTC8564 RTC driver");