mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
rtc: rtc-pm8xxx: add support for PMK8350 RTC
Add support for the RTC peripheral found in PMK8350 PMIC chips. Change-Id: Id4b93ae8017a174f577496078ed8ab8d73eabff8 Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
parent
2cfd894384
commit
52f9f8cfcc
1 changed files with 13 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
|
||||
*/
|
||||
/* Copyright (c) 2010-2011, 2019, The Linux Foundation. All rights reserved. */
|
||||
|
||||
#include <linux/of.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
|
@ -432,6 +432,16 @@ static const struct pm8xxx_rtc_regs pm8941_regs = {
|
|||
.alarm_en = BIT(7),
|
||||
};
|
||||
|
||||
static const struct pm8xxx_rtc_regs pmk8350_regs = {
|
||||
.ctrl = 0x6146,
|
||||
.write = 0x6140,
|
||||
.read = 0x6148,
|
||||
.alarm_rw = 0x6240,
|
||||
.alarm_ctrl = 0x6246,
|
||||
.alarm_ctrl2 = 0x6248,
|
||||
.alarm_en = BIT(7),
|
||||
};
|
||||
|
||||
/*
|
||||
* Hardcoded RTC bases until IORESOURCE_REG mapping is figured out
|
||||
*/
|
||||
|
|
@ -440,6 +450,7 @@ static const struct of_device_id pm8xxx_id_table[] = {
|
|||
{ .compatible = "qcom,pm8018-rtc", .data = &pm8921_regs },
|
||||
{ .compatible = "qcom,pm8058-rtc", .data = &pm8058_regs },
|
||||
{ .compatible = "qcom,pm8941-rtc", .data = &pm8941_regs },
|
||||
{ .compatible = "qcom,pmk8350-rtc", .data = &pmk8350_regs },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, pm8xxx_id_table);
|
||||
|
|
|
|||
Loading…
Reference in a new issue