Re: [PATCH v7 2/4] gpio: spacemit: add support for K1 SoC
From: Yixun Lan
Date: Tue Mar 25 2025 - 06:00:49 EST
Hi All:
The gpio controller request clocks to work, I will address this
in next version
also will
On 08:41 Wed 26 Feb , Yixun Lan wrote:
> Implement GPIO functionality which capable of setting pin as
> input, output. Also, each pin can be used as interrupt which
> support rising, falling, or both edge type trigger.
>
> Reviewed-by: Alex Elder <elder@xxxxxxxxxxxx>
> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Signed-off-by: Yixun Lan <dlan@xxxxxxxxxx>
> ---
> drivers/gpio/Kconfig | 8 ++
> drivers/gpio/Makefile | 1 +
> drivers/gpio/gpio-spacemit-k1.c | 277 ++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 286 insertions(+)
> +
...
> +static int spacemit_gpio_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct spacemit_gpio *sg;
> + struct resource *res;
> + void __iomem *regs;
> + int i, irq, ret;
> +
> + sg = devm_kzalloc(dev, sizeof(*sg), GFP_KERNEL);
> + if (!sg)
> + return -ENOMEM;
> +
> + regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
will update to devm_platform_ioremap_resource() to get rid of &res parameter
--
Yixun Lan (dlan)
Gentoo Linux Developer
GPG Key ID AABEFD55