From: Rui Miguel Silva <rmfrfs@gmail.com>
To: "Neil Armstrong" <neil.armstrong@linaro.org>,
"Tom Rini" <trini@konsulko.com>,
"Sumit Garg" <sumit.garg@kernel.org>,
"Casey Connolly" <casey.connolly@linaro.org>
Cc: <u-boot@lists.denx.de>, <u-boot-qcom@groups.io>,
"U-Boot" <u-boot-bounces@lists.denx.de>
Subject: Re: [PATCH v2 2/2] gpio: qcom: move pm8550 gpio to new driver
Date: Wed, 02 Jul 2025 09:53:47 +0100 [thread overview]
Message-ID: <DB1FXX03SS1X.3D705QLL4ES1X@linaro.com> (raw)
In-Reply-To: <20250630-topic-sm8x50-pmic-gpio-pinctrl-new-v2-2-cc1512931197@linaro.org>
Hey Neil,
On Mon Jun 30, 2025 at 5:04 PM WEST, Neil Armstrong wrote:
> Move support of the pm8550 gpios to the newly introduced
> driver and drop the compatible entry and the read-only quirk
> at the same time from the old driver.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
LGTM,
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Cheers,
Rui
> ---
> drivers/gpio/qcom_pmic_gpio.c | 20 +-------------------
> drivers/gpio/qcom_spmi_gpio.c | 1 +
> 2 files changed, 2 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpio/qcom_pmic_gpio.c b/drivers/gpio/qcom_pmic_gpio.c
> index cd9f3926ac41d84161b1e5311d9a99bb0b4a68ff..4458c55cd3da4d279b360b701348b50247036198 100644
> --- a/drivers/gpio/qcom_pmic_gpio.c
> +++ b/drivers/gpio/qcom_pmic_gpio.c
> @@ -69,17 +69,6 @@
> #define REG_EN_CTL 0x46
> #define REG_EN_CTL_ENABLE (1 << 7)
>
> -/**
> - * pmic_gpio_match_data - platform specific configuration
> - *
> - * @PMIC_MATCH_READONLY: treat all GPIOs as readonly, don't attempt to configure them.
> - * This is a workaround for an unknown bug on some platforms where trying to write the
> - * GPIO configuration registers causes the board to hang.
> - */
> -enum pmic_gpio_quirks {
> - QCOM_PMIC_QUIRK_READONLY = (1 << 0),
> -};
> -
> struct qcom_pmic_gpio_data {
> uint32_t pid; /* Peripheral ID on SPMI bus */
> bool lv_mv_type; /* If subtype is GPIO_LV(0x10) or GPIO_MV(0x11) */
> @@ -128,13 +117,8 @@ static int qcom_gpio_set_direction(struct udevice *dev, unsigned int offset,
> {
> struct qcom_pmic_gpio_data *plat = dev_get_plat(dev);
> uint32_t gpio_base = plat->pid + REG_OFFSET(offset);
> - ulong quirks = dev_get_driver_data(dev);
> int ret = 0;
>
> - /* Some PMICs don't like their GPIOs being configured */
> - if (quirks & QCOM_PMIC_QUIRK_READONLY)
> - return 0;
> -
> /* Disable the GPIO */
> ret = pmic_clrsetbits(dev->parent, gpio_base + REG_EN_CTL,
> REG_EN_CTL_ENABLE, 0);
> @@ -278,7 +262,6 @@ static int qcom_gpio_bind(struct udevice *dev)
> {
>
> struct qcom_pmic_gpio_data *plat = dev_get_plat(dev);
> - ulong quirks = dev_get_driver_data(dev);
> struct udevice *child;
> struct driver *drv;
> int ret;
> @@ -292,7 +275,7 @@ static int qcom_gpio_bind(struct udevice *dev)
> /* Bind the GPIO driver as a child of the PMIC. */
> ret = device_bind_with_driver_data(dev, drv,
> dev->name,
> - quirks, dev_ofnode(dev), &child);
> + 0, dev_ofnode(dev), &child);
> if (ret)
> return log_msg_ret("bind", ret);
>
> @@ -365,7 +348,6 @@ static const struct udevice_id qcom_gpio_ids[] = {
> { .compatible = "qcom,pms405-gpio" },
> { .compatible = "qcom,pm6125-gpio" },
> { .compatible = "qcom,pm8150-gpio" },
> - { .compatible = "qcom,pm8550-gpio", .data = QCOM_PMIC_QUIRK_READONLY },
> { }
> };
>
> diff --git a/drivers/gpio/qcom_spmi_gpio.c b/drivers/gpio/qcom_spmi_gpio.c
> index 2bb0f0d10c32ff55d3fd5c61b9bc2999878bfea6..22c8072534e9188445f0aaef5336863fd1da7a75 100644
> --- a/drivers/gpio/qcom_spmi_gpio.c
> +++ b/drivers/gpio/qcom_spmi_gpio.c
> @@ -743,6 +743,7 @@ static int qcom_spmi_pmic_gpio_probe(struct udevice *dev)
> }
>
> static const struct udevice_id qcom_spmi_pmic_gpio_ids[] = {
> + { .compatible = "qcom,pm8550-gpio" },
> { .compatible = "qcom,pm8550b-gpio" },
> { .compatible = "qcom,pm8550ve-gpio" },
> { .compatible = "qcom,pm8550vs-gpio" },
>
> --
> 2.34.1
next prev parent reply other threads:[~2025-07-02 9:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 16:04 [PATCH v2 0/2] gpio: qcom: rewritte SPMI gpio driver from Linux driver Neil Armstrong
2025-06-30 16:04 ` [PATCH v2 1/2] gpio: qcom: add new driver for SPMI gpios Neil Armstrong
2025-07-02 8:53 ` Rui Miguel Silva
2025-06-30 16:04 ` [PATCH v2 2/2] gpio: qcom: move pm8550 gpio to new driver Neil Armstrong
2025-07-02 8:53 ` Rui Miguel Silva [this message]
2025-07-07 12:48 ` [PATCH v2 0/2] gpio: qcom: rewritte SPMI gpio driver from Linux driver Sumit Garg
2025-07-14 13:20 ` Casey 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=DB1FXX03SS1X.3D705QLL4ES1X@linaro.com \
--to=rmfrfs@gmail.com \
--cc=casey.connolly@linaro.org \
--cc=neil.armstrong@linaro.org \
--cc=sumit.garg@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot-bounces@lists.denx.de \
--cc=u-boot-qcom@groups.io \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.