* [PATCH] gpio: mpfs_gpio: fix compilation warnings
@ 2025-09-09 12:53 Eoin Dickson
2025-09-19 10:48 ` Leo Liang
0 siblings, 1 reply; 2+ messages in thread
From: Eoin Dickson @ 2025-09-09 12:53 UTC (permalink / raw)
To: u-boot
Cc: rick, ycliang, Conor.Dooley, Jamie.Gibbons, Praveen.Kumar,
Eoin.Dickson, Cyril.Jean, jagan
From: Eoin Dickson <eoin.dickson@microchip.com>
mchp_gpio_get_value() should return int instead of bool, and some casts
are needed.
Signed-off-by: Eoin Dickson <eoin.dickson@microchip.com>
---
drivers/gpio/mpfs_gpio.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/mpfs_gpio.c b/drivers/gpio/mpfs_gpio.c
index 9bbeada4ef5..35eed596c10 100644
--- a/drivers/gpio/mpfs_gpio.c
+++ b/drivers/gpio/mpfs_gpio.c
@@ -75,7 +75,7 @@ static int mchp_gpio_direction_output(struct udevice *dev, u32 offset, int value
return 0;
}
-static bool mchp_gpio_get_value(struct udevice *dev, u32 offset)
+static int mchp_gpio_get_value(struct udevice *dev, u32 offset)
{
struct mchp_gpio_plat *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
@@ -136,7 +136,7 @@ static int mchp_gpio_probe(struct udevice *dev)
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
char name[18], *str;
- plat->regs = dev_get_driver_data(dev);
+ plat->regs = (struct mpfs_gpio_reg_offsets *)dev_get_driver_data(dev);
sprintf(name, "gpio@%4lx_", (uintptr_t)plat->base);
str = strdup(name);
if (!str)
@@ -160,10 +160,10 @@ static const struct mpfs_gpio_reg_offsets coregpio_reg_offsets = {
static const struct udevice_id mchp_gpio_match[] = {
{
.compatible = "microchip,mpfs-gpio",
- .data = &mpfs_reg_offsets,
+ .data = (unsigned long)&mpfs_reg_offsets,
}, {
.compatible = "microchip,coregpio-rtl-v3",
- .data = &coregpio_reg_offsets,
+ .data = (unsigned long)&coregpio_reg_offsets,
},
{ /* end of list */ }
};
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: mpfs_gpio: fix compilation warnings
2025-09-09 12:53 [PATCH] gpio: mpfs_gpio: fix compilation warnings Eoin Dickson
@ 2025-09-19 10:48 ` Leo Liang
0 siblings, 0 replies; 2+ messages in thread
From: Leo Liang @ 2025-09-19 10:48 UTC (permalink / raw)
To: Eoin Dickson
Cc: u-boot, rick, Conor.Dooley, Jamie.Gibbons, Praveen.Kumar,
Cyril.Jean, jagan
On Tue, Sep 09, 2025 at 06:23:47PM +0530, Eoin Dickson wrote:
> From: Eoin Dickson <eoin.dickson@microchip.com>
>
> mchp_gpio_get_value() should return int instead of bool, and some casts
> are needed.
>
> Signed-off-by: Eoin Dickson <eoin.dickson@microchip.com>
> ---
> drivers/gpio/mpfs_gpio.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-19 10:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09 12:53 [PATCH] gpio: mpfs_gpio: fix compilation warnings Eoin Dickson
2025-09-19 10:48 ` Leo Liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox