Lines Matching full:bbnsm
22 struct scmi_imx_bbm *bbnsm = dev_get_drvdata(dev); in scmi_imx_bbm_read_time() local
23 struct scmi_protocol_handle *ph = bbnsm->ph; in scmi_imx_bbm_read_time()
27 ret = bbnsm->ops->rtc_time_get(ph, 0, &val); in scmi_imx_bbm_read_time()
38 struct scmi_imx_bbm *bbnsm = dev_get_drvdata(dev); in scmi_imx_bbm_set_time() local
39 struct scmi_protocol_handle *ph = bbnsm->ph; in scmi_imx_bbm_set_time()
44 return bbnsm->ops->rtc_time_set(ph, 0, val); in scmi_imx_bbm_set_time()
49 struct scmi_imx_bbm *bbnsm = dev_get_drvdata(dev); in scmi_imx_bbm_alarm_irq_enable() local
50 struct scmi_protocol_handle *ph = bbnsm->ph; in scmi_imx_bbm_alarm_irq_enable()
54 return bbnsm->ops->rtc_alarm_set(ph, 0, false, 0); in scmi_imx_bbm_alarm_irq_enable()
61 struct scmi_imx_bbm *bbnsm = dev_get_drvdata(dev); in scmi_imx_bbm_set_alarm() local
62 struct scmi_protocol_handle *ph = bbnsm->ph; in scmi_imx_bbm_set_alarm()
68 return bbnsm->ops->rtc_alarm_set(ph, 0, true, val); in scmi_imx_bbm_set_alarm()
80 struct scmi_imx_bbm *bbnsm = container_of(nb, struct scmi_imx_bbm, nb); in scmi_imx_bbm_rtc_notifier() local
84 rtc_update_irq(bbnsm->rtc_dev, 1, RTC_AF | RTC_IRQF); in scmi_imx_bbm_rtc_notifier()
95 struct scmi_imx_bbm *bbnsm = dev_get_drvdata(dev); in scmi_imx_bbm_rtc_init() local
98 bbnsm->rtc_dev = devm_rtc_allocate_device(dev); in scmi_imx_bbm_rtc_init()
99 if (IS_ERR(bbnsm->rtc_dev)) in scmi_imx_bbm_rtc_init()
100 return PTR_ERR(bbnsm->rtc_dev); in scmi_imx_bbm_rtc_init()
102 bbnsm->rtc_dev->ops = &smci_imx_bbm_rtc_ops; in scmi_imx_bbm_rtc_init()
103 bbnsm->rtc_dev->range_max = U32_MAX; in scmi_imx_bbm_rtc_init()
105 bbnsm->nb.notifier_call = &scmi_imx_bbm_rtc_notifier; in scmi_imx_bbm_rtc_init()
108 NULL, &bbnsm->nb); in scmi_imx_bbm_rtc_init()
112 return devm_rtc_register_device(bbnsm->rtc_dev); in scmi_imx_bbm_rtc_init()
120 struct scmi_imx_bbm *bbnsm; in scmi_imx_bbm_rtc_probe() local
126 bbnsm = devm_kzalloc(dev, sizeof(*bbnsm), GFP_KERNEL); in scmi_imx_bbm_rtc_probe()
127 if (!bbnsm) in scmi_imx_bbm_rtc_probe()
130 bbnsm->ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_IMX_BBM, &ph); in scmi_imx_bbm_rtc_probe()
131 if (IS_ERR(bbnsm->ops)) in scmi_imx_bbm_rtc_probe()
132 return PTR_ERR(bbnsm->ops); in scmi_imx_bbm_rtc_probe()
134 bbnsm->ph = ph; in scmi_imx_bbm_rtc_probe()
138 dev_set_drvdata(dev, bbnsm); in scmi_imx_bbm_rtc_probe()