rtc-meson.c (c95baf12f5077419db01313ab61c2aac007d40cd) rtc-meson.c (3a905c2d9544a418953d6c18668f0f853fbd9be9)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * RTC driver for the interal RTC block in the Amlogic Meson6, Meson8,
4 * Meson8b and Meson8m2 SoCs.
5 *
6 * The RTC is split in to two parts, the AHB front end and a simple serial
7 * connection to the actual registers. This driver manages both parts.
8 *

--- 351 unchanged lines hidden (view full) ---

360 */
361 ret = regmap_read(rtc->serial, RTC_COUNTER, &tm);
362 if (ret) {
363 dev_err(dev, "cannot read RTC counter, RTC not functional\n");
364 goto out_disable_vdd;
365 }
366
367 meson_rtc_nvmem_config.priv = rtc;
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * RTC driver for the interal RTC block in the Amlogic Meson6, Meson8,
4 * Meson8b and Meson8m2 SoCs.
5 *
6 * The RTC is split in to two parts, the AHB front end and a simple serial
7 * connection to the actual registers. This driver manages both parts.
8 *

--- 351 unchanged lines hidden (view full) ---

360 */
361 ret = regmap_read(rtc->serial, RTC_COUNTER, &tm);
362 if (ret) {
363 dev_err(dev, "cannot read RTC counter, RTC not functional\n");
364 goto out_disable_vdd;
365 }
366
367 meson_rtc_nvmem_config.priv = rtc;
368 ret = rtc_nvmem_register(rtc->rtc, &meson_rtc_nvmem_config);
368 ret = devm_rtc_nvmem_register(rtc->rtc, &meson_rtc_nvmem_config);
369 if (ret)
370 goto out_disable_vdd;
371
372 ret = rtc_register_device(rtc->rtc);
373 if (ret)
374 goto out_disable_vdd;
375
376 return 0;

--- 29 unchanged lines hidden ---
369 if (ret)
370 goto out_disable_vdd;
371
372 ret = rtc_register_device(rtc->rtc);
373 if (ret)
374 goto out_disable_vdd;
375
376 return 0;

--- 29 unchanged lines hidden ---