Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc61138e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "rtc: rtc-pm8xxx: add support for PM5100 RTC"

parents 284fd135 0f787250
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2010-2011, 2019-2020, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2010-2011, 2019-2021, The Linux Foundation. All rights reserved. */

#include <linux/of.h>
#include <linux/module.h>
@@ -462,6 +462,16 @@ static const struct pm8xxx_rtc_regs pmk8350_regs = {
	.alarm_en	= BIT(7),
};

static const struct pm8xxx_rtc_regs pm5100_regs = {
	.ctrl		= 0x6446,
	.write		= 0x6440,
	.read		= 0x6448,
	.alarm_rw	= 0x6540,
	.alarm_ctrl	= 0x6546,
	.alarm_ctrl2	= 0x6548,
	.alarm_en	= BIT(7),
};

/*
 * Hardcoded RTC bases until IORESOURCE_REG mapping is figured out
 */
@@ -471,6 +481,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,pm5100-rtc", .data = &pm5100_regs },
	{ },
};
MODULE_DEVICE_TABLE(of, pm8xxx_id_table);