diff mbox

[3/5] rtc: rtc-pm8xxx: Add support for pm8018 rtc

Message ID 1466158929-19524-4-git-send-email-narmstrong@baylibre.com (mailing list archive)
State New, archived
Headers show

Commit Message

Neil Armstrong June 17, 2016, 10:22 a.m. UTC
In order to support RTC on Qualcomm MDM9615 SoC, add support for
the pm8018 rtc in rtc-pm8xxx driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt |  1 +
 drivers/rtc/rtc-pm8xxx.c                              | 11 +++++++++++
 2 files changed, 12 insertions(+)

Comments

Alexandre Belloni June 21, 2016, 4:24 p.m. UTC | #1
On 17/06/2016 at 12:22:07 +0200, Neil Armstrong wrote :
> In order to support RTC on Qualcomm MDM9615 SoC, add support for
> the pm8018 rtc in rtc-pm8xxx driver.
> 
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Bjorn Andersson June 22, 2016, 5:06 a.m. UTC | #2
On Fri 17 Jun 03:22 PDT 2016, Neil Armstrong wrote:

> In order to support RTC on Qualcomm MDM9615 SoC, add support for
> the pm8018 rtc in rtc-pm8xxx driver.
> 
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt |  1 +
>  drivers/rtc/rtc-pm8xxx.c                              | 11 +++++++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt
> index f24f334..37a088f 100644
> --- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt
> +++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt
> @@ -62,6 +62,7 @@ The below bindings specify the set of valid subnodes.
>  		    "qcom,pm8058-rtc"
>  		    "qcom,pm8921-rtc"
>  		    "qcom,pm8941-rtc"
> +		    "qcom,pm8018-rtc"

Would be nice if we kept this sorted, but the patch looks good.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt
index f24f334..37a088f 100644
--- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt
+++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt
@@ -62,6 +62,7 @@  The below bindings specify the set of valid subnodes.
 		    "qcom,pm8058-rtc"
 		    "qcom,pm8921-rtc"
 		    "qcom,pm8941-rtc"
+		    "qcom,pm8018-rtc"
 
 - reg:
 	Usage: required
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index 795fcbd..976f5f6 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -393,6 +393,16 @@  static int pm8xxx_rtc_enable(struct pm8xxx_rtc *rtc_dd)
 	return 0;
 }
 
+static const struct pm8xxx_rtc_regs pm8018_regs = {
+	.ctrl		= 0x11d,
+	.write		= 0x11f,
+	.read		= 0x123,
+	.alarm_rw	= 0x127,
+	.alarm_ctrl	= 0x11d,
+	.alarm_ctrl2	= 0x11e,
+	.alarm_en	= BIT(1),
+};
+
 static const struct pm8xxx_rtc_regs pm8921_regs = {
 	.ctrl		= 0x11d,
 	.write		= 0x11f,
@@ -428,6 +438,7 @@  static const struct pm8xxx_rtc_regs pm8941_regs = {
  */
 static const struct of_device_id pm8xxx_id_table[] = {
 	{ .compatible = "qcom,pm8921-rtc", .data = &pm8921_regs },
+	{ .compatible = "qcom,pm8018-rtc", .data = &pm8018_regs },
 	{ .compatible = "qcom,pm8058-rtc", .data = &pm8058_regs },
 	{ .compatible = "qcom,pm8941-rtc", .data = &pm8941_regs },
 	{ },