Lines Matching refs:nct3018y
41 struct nct3018y { struct
120 struct nct3018y *nct3018y = i2c_get_clientdata(dev_id); in nct3018y_irq() local
121 struct i2c_client *client = nct3018y->client; in nct3018y_irq()
127 err = nct3018y_get_alarm_mode(nct3018y->client, &alarm_enable, &alarm_flag); in nct3018y_irq()
134 rtc_update_irq(nct3018y->rtc, 1, RTC_IRQF | RTC_AF); in nct3018y_irq()
135 nct3018y_set_alarm_mode(nct3018y->client, 0); in nct3018y_irq()
312 #define clkout_hw_to_nct3018y(_hw) container_of(_hw, struct nct3018y, clkout_hw)
324 struct nct3018y *nct3018y = clkout_hw_to_nct3018y(hw); in nct3018y_clkout_recalc_rate() local
325 struct i2c_client *client = nct3018y->client; in nct3018y_clkout_recalc_rate()
351 struct nct3018y *nct3018y = clkout_hw_to_nct3018y(hw); in nct3018y_clkout_set_rate() local
352 struct i2c_client *client = nct3018y->client; in nct3018y_clkout_set_rate()
371 struct nct3018y *nct3018y = clkout_hw_to_nct3018y(hw); in nct3018y_clkout_control() local
372 struct i2c_client *client = nct3018y->client; in nct3018y_clkout_control()
399 struct nct3018y *nct3018y = clkout_hw_to_nct3018y(hw); in nct3018y_clkout_is_prepared() local
400 struct i2c_client *client = nct3018y->client; in nct3018y_clkout_is_prepared()
419 static struct clk *nct3018y_clkout_register_clk(struct nct3018y *nct3018y) in nct3018y_clkout_register_clk() argument
421 struct i2c_client *client = nct3018y->client; in nct3018y_clkout_register_clk()
431 nct3018y->clkout_hw.init = &init; in nct3018y_clkout_register_clk()
437 clk = devm_clk_register(&client->dev, &nct3018y->clkout_hw); in nct3018y_clkout_register_clk()
458 struct nct3018y *nct3018y; in nct3018y_probe() local
466 nct3018y = devm_kzalloc(&client->dev, sizeof(struct nct3018y), in nct3018y_probe()
468 if (!nct3018y) in nct3018y_probe()
471 i2c_set_clientdata(client, nct3018y); in nct3018y_probe()
472 nct3018y->client = client; in nct3018y_probe()
497 nct3018y->rtc = devm_rtc_allocate_device(&client->dev); in nct3018y_probe()
498 if (IS_ERR(nct3018y->rtc)) in nct3018y_probe()
499 return PTR_ERR(nct3018y->rtc); in nct3018y_probe()
501 nct3018y->rtc->ops = &nct3018y_rtc_ops; in nct3018y_probe()
502 nct3018y->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; in nct3018y_probe()
503 nct3018y->rtc->range_max = RTC_TIMESTAMP_END_2099; in nct3018y_probe()
515 clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, nct3018y->rtc->features); in nct3018y_probe()
516 clear_bit(RTC_FEATURE_ALARM, nct3018y->rtc->features); in nct3018y_probe()
521 nct3018y_clkout_register_clk(nct3018y); in nct3018y_probe()
524 return devm_rtc_register_device(nct3018y->rtc); in nct3018y_probe()