Lines Matching refs:info
107 struct max8998_rtc_info *info = dev_get_drvdata(dev);
111 ret = max8998_bulk_read(info->rtc, MAX8998_RTC_SEC, 8, data);
122 struct max8998_rtc_info *info = dev_get_drvdata(dev);
128 ret = max8998_bulk_write(info->rtc, MAX8998_RTC_SEC, 8, data);
130 if (info->lp3974_bug_workaround)
138 struct max8998_rtc_info *info = dev_get_drvdata(dev);
143 ret = max8998_bulk_read(info->rtc, MAX8998_ALARM0_SEC, 8, data);
149 ret = max8998_read_reg(info->rtc, MAX8998_ALARM0_CONF, &val);
155 ret = max8998_read_reg(info->rtc, MAX8998_RTC_STATUS, &val);
167 static int max8998_rtc_stop_alarm(struct max8998_rtc_info *info)
169 int ret = max8998_write_reg(info->rtc, MAX8998_ALARM0_CONF, 0);
171 if (info->lp3974_bug_workaround)
177 static int max8998_rtc_start_alarm(struct max8998_rtc_info *info)
183 if (info->lp3974_bug_workaround)
186 ret = max8998_write_reg(info->rtc, MAX8998_ALARM0_CONF, alarm0_conf);
188 if (info->lp3974_bug_workaround)
196 struct max8998_rtc_info *info = dev_get_drvdata(dev);
202 ret = max8998_rtc_stop_alarm(info);
206 ret = max8998_bulk_write(info->rtc, MAX8998_ALARM0_SEC, 8, data);
210 if (info->lp3974_bug_workaround)
214 ret = max8998_rtc_start_alarm(info);
222 struct max8998_rtc_info *info = dev_get_drvdata(dev);
225 return max8998_rtc_start_alarm(info);
227 return max8998_rtc_stop_alarm(info);
232 struct max8998_rtc_info *info = data;
234 rtc_update_irq(info->rtc_dev, 1, RTC_IRQF | RTC_AF);
251 struct max8998_rtc_info *info;
254 info = devm_kzalloc(&pdev->dev, sizeof(struct max8998_rtc_info),
256 if (!info)
259 info->dev = &pdev->dev;
260 info->max8998 = max8998;
261 info->rtc = max8998->rtc;
263 platform_set_drvdata(pdev, info);
265 info->rtc_dev = devm_rtc_device_register(&pdev->dev, "max8998-rtc",
268 if (IS_ERR(info->rtc_dev)) {
269 ret = PTR_ERR(info->rtc_dev);
277 info->irq = irq_create_mapping(max8998->irq_domain, MAX8998_IRQ_ALARM0);
278 if (!info->irq) {
283 ret = devm_request_threaded_irq(&pdev->dev, info->irq, NULL,
284 max8998_rtc_alarm_irq, 0, "rtc-alarm0", info);
288 info->irq, ret);
293 info->lp3974_bug_workaround = true;