rtc: rtc-pm8xxx: add support for PM8916 RTC

Add support for the RTC peripheral found in PM8916 PMIC chips.

Change-Id: I9f0369569169a1f1c01afb91a8327c2ad9c062d9
Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
This commit is contained in:
Shilpa Suresh
2021-02-19 09:22:07 +05:30
parent 05d7be5fc4
commit f103d0a57f

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2010-2011, 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2010-2011, 2020-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/of.h>
@@ -470,6 +470,16 @@ static const struct pm8xxx_rtc_regs pmk8350_regs = {
.alarm_en = BIT(7),
};
static const struct pm8xxx_rtc_regs pm8916_regs = {
.ctrl = 0x6046,
.write = 0x6040,
.read = 0x6048,
.alarm_rw = 0x6140,
.alarm_ctrl = 0x6146,
.alarm_ctrl2 = 0x6148,
.alarm_en = BIT(7),
};
/*
* Hardcoded RTC bases until IORESOURCE_REG mapping is figured out
*/
@@ -479,6 +489,7 @@ static const struct of_device_id pm8xxx_id_table[] = {
{ .compatible = "qcom,pm8058-rtc", .data = &pm8058_regs },
{ .compatible = "qcom,pm8941-rtc", .data = &pm8941_regs },
{ .compatible = "qcom,pmk8350-rtc", .data = &pmk8350_regs },
{ .compatible = "qcom,pm8916-rtc", .data = &pm8916_regs },
{ },
};
MODULE_DEVICE_TABLE(of, pm8xxx_id_table);