mbox series

[0/3] Add RTC support for PMIC PMK8350

Message ID 1615447798-6959-1-git-send-email-skakit@codeaurora.org
Headers show
Series Add RTC support for PMIC PMK8350 | expand

Message

Satya Priya March 11, 2021, 7:29 a.m. UTC
Convert pm8xxx bindings to yaml and add pmk8350 rtc binding.

satya priya (3):
  rtc: pm8xxx: Add RTC support for PMIC PMK8350
  dt-bindings: mfd: Convert pm8xxx bindings to yaml
  dt-bindings: mfd: Add compatible for pmk8350 rtc

 .../devicetree/bindings/mfd/qcom-pm8xxx.txt        |  99 -------------------
 .../devicetree/bindings/mfd/qcom-pm8xxx.yaml       | 109 +++++++++++++++++++++
 drivers/rtc/rtc-pm8xxx.c                           |  11 +++
 3 files changed, 120 insertions(+), 99 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml

Comments

Bjorn Andersson March 11, 2021, 5 p.m. UTC | #1
On Thu 11 Mar 01:29 CST 2021, satya priya wrote:

> Add the comaptible string for PMIC PMK8350.
> 

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

Regards,
Bjorn

> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
>  drivers/rtc/rtc-pm8xxx.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
> index eb20659..29a1c65 100644
> --- a/drivers/rtc/rtc-pm8xxx.c
> +++ b/drivers/rtc/rtc-pm8xxx.c
> @@ -445,6 +445,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
>   */
> @@ -453,6 +463,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);
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
> of Code Aurora Forum, hosted by The Linux Foundation
>
Bjorn Andersson March 11, 2021, 5:04 p.m. UTC | #2
On Thu 11 Mar 01:29 CST 2021, satya priya wrote:

> Add compatible string for pmk8350 rtc support.
> 

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


If you add this before doing the yaml binding migration it might be
possible for the maintainer to merge the functional additions while
we're still trying to figure out the yaml...

Regards,
Bjorn

> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
>  Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> index b4892f1..676decc 100644
> --- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> +++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> @@ -53,6 +53,7 @@ patternProperties:
>            - qcom,pm8921-rtc
>            - qcom,pm8941-rtc
>            - qcom,pm8018-rtc
> +          - qcom,pmk8350-rtc
>  
>        reg:
>          description: Specifies the base address of the RTC registers
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
> of Code Aurora Forum, hosted by The Linux Foundation
>