From: Peng Fan <peng.fan@oss.nxp.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Tom Rini <trini@konsulko.com>,
AKASHI Takahiro <akashi.tkhro@gmail.com>,
Peng Fan <peng.fan@nxp.com>, Greg Malysa <malysagreg@gmail.com>,
Utsav Agarwal <utsav.agarwal@analog.com>,
Vasileios Bimpikas <vasileios.bimpikas@analog.com>,
Ian Roberts <ian.roberts@timesys.com>,
Oliver Gaskell <Oliver.Gaskell@analog.com>,
Yegor Yefremov <yegorslists@googlemail.com>,
Philip Molloy <philip.molloy@analog.com>,
Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
Eoin Dickson <eoin.dickson@microchip.com>,
Arturs Artamonovs <arturs.artamonovs@analog.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Tanmay Kathpalia <tanmay.kathpalia@altera.com>,
u-boot@lists.denx.de,
Andy Shevchenko <andriy.shevchenko@intel.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
arm-scmi@vger.kernel.org, linux-gpio@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
Khaled Ali Ahmed <Khaled.AliAhmed@arm.com>,
Michal Simek <michal.simek@amd.com>
Subject: Re: [PATCH v2 4/4] gpio: scmi: Add gpio_scmi driver
Date: Mon, 23 Mar 2026 11:41:49 +0800 [thread overview]
Message-ID: <acC2fSdjDmj5Wp1a@nxa18884-linux.ap.freescale.net> (raw)
In-Reply-To: <f8e1dcb617917dfe69efce0b3407f8786e4c971d.1773256350.git.dan.carpenter@linaro.org>
Hi Dan,
On Wed, Mar 11, 2026 at 10:41:36PM +0300, Dan Carpenter wrote:
>This provides GPIO support over SCMI. It is built on top of the
>pinctrl-scmi driver. The device tree entry would work the same as
>in linux. Perhaps something like this.
>+
[....]
>+ ret = snprintf(NULL, 0, "gpio_scmi%d_", bank_cnt);
>+ uc_priv->bank_name = devm_kzalloc(dev, ret + 1, GFP_KERNEL);
>+ if (!uc_priv->bank_name)
>+ return -ENOMEM;
>+ snprintf(uc_priv->bank_name, ret + 1, "gpio_scmi%d_", bank_cnt);
build fail in CI [1]:
drivers/gpio/gpio_scmi.c: In function 'scmi_gpio_probe':
drivers/gpio/gpio_scmi.c:227:25: error: passing argument 1 of 'snprintf' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
227 | snprintf(uc_priv->bank_name, ret + 1, "gpio_scmi%d_", bank_cnt);
| ~~~~~~~^~~~~~~~~~~
In file included from include/log.h:12,
from include/linux/printk.h:4,
from include/linux/kernel.h:5,
from include/linux/libfdt_env.h:13,
from include/linux/libfdt.h:6,
from include/fdtdec.h:17,
from include/dm/ofnode.h:11,
from include/asm-generic/gpio.h:10,
from ./arch/sandbox/include/asm/gpio.h:24,
from drivers/gpio/gpio_scmi.c:6:
include/stdio.h:60:20: note: expected 'char *' but argument is of type 'const char *'
60 | int snprintf(char *buf, size_t size, const char *fmt, ...)
| ~~~~~~^~~
CC drivers/net/phy/broadcom.o
[1] https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/jobs/1408382
Thanks,
Peng
>+ bank_cnt++;
>+
>+ uc_priv->gpio_count = priv->num_pins;
>+
>+ return 0;
>+}
>+
>+static const struct udevice_id scmi_gpio_match[] = {
>+ { .compatible = "scmi-pinctrl-gpio" },
>+ { }
>+};
>+
>+U_BOOT_DRIVER(scmi_pinctrl_gpio) = {
>+ .name = "scmi_pinctrl_gpio",
>+ .id = UCLASS_GPIO,
>+ .of_match = scmi_gpio_match,
>+ .probe = scmi_gpio_probe,
>+ .priv_auto = sizeof(struct scmi_gpio_priv),
>+ .ops = &scmi_gpio_ops,
>+};
>+
>--
>2.51.0
>
>
next prev parent reply other threads:[~2026-03-23 2:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 19:39 [PATCH v2 0/4] u-boot: add SCMI GPIO/Pinctrl support Dan Carpenter
2026-03-11 19:41 ` [PATCH v2 3/4] scmi: pinctrl: add pinctrl driver for SCMI Dan Carpenter
2026-03-12 9:23 ` Peng Fan
2026-03-24 13:19 ` Linus Walleij
2026-03-24 15:07 ` Dan Carpenter
2026-03-26 9:30 ` Dan Carpenter
2026-03-11 19:41 ` [PATCH v2 4/4] gpio: scmi: Add gpio_scmi driver Dan Carpenter
2026-03-17 9:05 ` Peng Fan
2026-03-23 3:41 ` Peng Fan [this message]
2026-03-23 8:02 ` Andy Shevchenko
2026-03-24 11:40 ` Dan Carpenter
2026-03-24 11:53 ` Andy Shevchenko
2026-03-23 6:20 ` [PATCH v2 0/4] u-boot: add SCMI GPIO/Pinctrl support Peng Fan
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=acC2fSdjDmj5Wp1a@nxa18884-linux.ap.freescale.net \
--to=peng.fan@oss.nxp.com \
--cc=Khaled.AliAhmed@arm.com \
--cc=Oliver.Gaskell@analog.com \
--cc=akashi.tkhro@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=arm-scmi@vger.kernel.org \
--cc=arturs.artamonovs@analog.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=dan.carpenter@linaro.org \
--cc=eoin.dickson@microchip.com \
--cc=ian.roberts@timesys.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=malysagreg@gmail.com \
--cc=michal.simek@amd.com \
--cc=nathan.morrison@timesys.com \
--cc=neil.armstrong@linaro.org \
--cc=peng.fan@nxp.com \
--cc=philip.molloy@analog.com \
--cc=tanmay.kathpalia@altera.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=utsav.agarwal@analog.com \
--cc=vasileios.bimpikas@analog.com \
--cc=vincent.guittot@linaro.org \
--cc=yegorslists@googlemail.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).