public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan@gerhold.net>
To: Caleb Connolly <caleb.connolly@linaro.org>
Cc: Ramon Fried <rfried.dev@gmail.com>,
	Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Sumit Garg <sumit.garg@linaro.org>,
	Mateusz Kulikowski <mateusz.kulikowski@gmail.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Dzmitry Sankouski <dsankouski@gmail.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH v2 2/5] gpio: qcom_pmic: rework pwrkey driver into a button driver
Date: Thu, 9 Nov 2023 15:27:06 +0100	[thread overview]
Message-ID: <ZUzsOvrcwpetH0WU@gerhold.net> (raw)
In-Reply-To: <20231108-b4-qcom-dt-compat-v2-2-713233c72948@linaro.org>

On Wed, Nov 08, 2023 at 04:20:54PM +0000, Caleb Connolly wrote:
> The power and resin keys were implemented as GPIOs here, but their only
> use would be as buttons. Avoid the additional layer of introspection and
> rework this driver into a button driver.
> 
> While we're here, replace the "qcom,pm8998-pwrkey" compatible with
> "qcom,pm8941-pwrkey" to match upstream (Linux).
> 
> The dragonboard410c and 820c boards are adjusted to benefit from this
> change too, simplify their custom board init code.
> 
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>  MAINTAINERS                                      |   1 +
>  arch/arm/dts/dragonboard410c-uboot.dtsi          |  14 +-
>  arch/arm/dts/dragonboard410c.dts                 |  22 ++-
>  arch/arm/dts/dragonboard820c-uboot.dtsi          |  15 +--
>  arch/arm/dts/dragonboard820c.dts                 |  23 +++-
>  arch/arm/dts/dragonboard845c-uboot.dtsi          |  11 --
>  arch/arm/dts/dragonboard845c.dts                 |   4 +
>  arch/arm/dts/sdm845.dtsi                         |  23 +++-
>  arch/arm/dts/starqltechn.dts                     |  20 +--
>  arch/arm/mach-snapdragon/Kconfig                 |   3 +
>  arch/arm/mach-snapdragon/init_sdm845.c           |  45 ++-----
>  board/qualcomm/dragonboard410c/dragonboard410c.c |  31 ++---
>  board/qualcomm/dragonboard820c/dragonboard820c.c |  29 ++--
>  drivers/button/Kconfig                           |   9 ++
>  drivers/button/Makefile                          |   1 +
>  drivers/button/button-qcom-pmic.c                | 165 +++++++++++++++++++++++
>  drivers/gpio/Kconfig                             |   3 +-
>  drivers/gpio/qcom_pmic_gpio.c                    | 104 --------------
>  18 files changed, 275 insertions(+), 248 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f6d63c8ab563..8cd102eaa070 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -572,6 +572,7 @@ M:	Neil Armstrong <neil.armstrong@linaro.org>
>  R:	Sumit Garg <sumit.garg@linaro.org>
>  S:	Maintained
>  F:	arch/arm/mach-snapdragon/
> +F:	drivers/button/button-qcom-pmic.c
>  F:	drivers/clk/qcom/
>  F:	drivers/gpio/msm_gpio.c
>  F:	drivers/mmc/msm_sdhci.c
> diff --git a/arch/arm/dts/dragonboard410c-uboot.dtsi b/arch/arm/dts/dragonboard410c-uboot.dtsi
> index 3b0bd0ed0a1b..39b03a30702c 100644
> --- a/arch/arm/dts/dragonboard410c-uboot.dtsi
> +++ b/arch/arm/dts/dragonboard410c-uboot.dtsi
> @@ -5,6 +5,9 @@
>   * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
>   */
>  
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +

You can drop this again now I guess?

>  / {
>  
>  	smem {
> @@ -42,14 +45,3 @@
>  		gpios = <&pm8916_gpios 3 0>;
>  	};
>  };
> -
> -
> -&pm8916_pon {
> -	key_vol_down {
> -		gpios = <&pm8916_pon 1 0>;
> -	};
> -
> -	key_power {
> -		gpios = <&pm8916_pon 0 0>;
> -	};
> -};
> [...]
> diff --git a/arch/arm/dts/dragonboard820c-uboot.dtsi b/arch/arm/dts/dragonboard820c-uboot.dtsi
> index 457728a43ecb..693c0e5efcc4 100644
> --- a/arch/arm/dts/dragonboard820c-uboot.dtsi
> +++ b/arch/arm/dts/dragonboard820c-uboot.dtsi
> @@ -5,6 +5,9 @@
>   * (C) Copyright 2017 Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
>   */
>  
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +

Same here.

Thanks,
Stephan

  reply	other threads:[~2023-11-09 14:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 16:20 [PATCH v2 0/5] Qualcomm PMIC fixes Caleb Connolly
2023-11-08 16:20 ` [PATCH v2 1/5] gpio: qcom_pmic: fix silent dev_read_addr downcast Caleb Connolly
2023-11-08 16:20 ` [PATCH v2 2/5] gpio: qcom_pmic: rework pwrkey driver into a button driver Caleb Connolly
2023-11-09 14:27   ` Stephan Gerhold [this message]
2023-11-08 16:20 ` [PATCH v2 3/5] gpio: qcom_pmic: fix support for upstream DT Caleb Connolly
2023-11-09 14:35   ` Stephan Gerhold
2023-11-08 16:20 ` [PATCH v2 4/5] spmi: msm: fix register range names Caleb Connolly
2023-11-08 16:20 ` [PATCH v2 5/5] pmic: qcom: dont use dev_read_addr to get USID Caleb Connolly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZUzsOvrcwpetH0WU@gerhold.net \
    --to=stephan@gerhold.net \
    --cc=caleb.connolly@linaro.org \
    --cc=dsankouski@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=jorge.ramirez.ortiz@gmail.com \
    --cc=mateusz.kulikowski@gmail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=rfried.dev@gmail.com \
    --cc=sumit.garg@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox