From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Lee Jones <lee.jones@linaro.org>
Cc: linux-gpio@vger.kernel.org, Marek Vasut <marex@denx.de>,
Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
linux-arm-kernel@lists.infradead.org,
Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>,
Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH] gpio: ucb1400: Remove platform setup and teardown support
Date: Wed, 15 Jun 2022 07:43:01 +0200 [thread overview]
Message-ID: <20220615054301.cnb6fdwciuzt3l67@pengutronix.de> (raw)
In-Reply-To: <20220614194802.269738-1-u.kleine-koenig@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1721 bytes --]
Hello,
[Cc += pxa maintainers and a few people I talked to about this driver in
irc yesterday]
On Tue, Jun 14, 2022 at 09:48:02PM +0200, Uwe Kleine-König wrote:
> There is no user of these callbacks. The motivation for this change is
> to stop returning an error code from the remove callback.
>
> This is a preparation for making platform remove callbacks return void.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
A side note to this driver:
In the probe routine there is a check at the start:
struct ucb1400_gpio *ucb = dev_get_platdata(&dev->dev);
if (!(ucb && ucb->gpio_offset)) {
err = -EINVAL;
goto err;
}
So the driver doesn't bind unless there is platdata and it has
gpio_offset != 0. (The decade before last called and wants its fixed
gpio numbers back :-)
platdata is assembled in drivers/mfd/ucb1400_core.c:ucb1400_core_probe()
using:
struct ucb1400_pdata *pdata = dev_get_platdata(dev);
...
if (pdata)
ucb_gpio.gpio_offset = pdata->gpio_offset;
All machines using this ucb1400 mfd (i.e. arch/arm/mach-pxa/balloon3.c,
arch/arm/mach-pxa/colibri-pxa270.c, arch/arm/mach-pxa/vpac270.c) all
don't set the .gpio_offset member in their ucb1400_pdata.
So the gpio driver is effectively unused and alternatively could just be
removed entirely. Also there seems to be some pending spring cleanup, so
the pxa boards might just be removed soon, which looks like a good
opportunity to drop the driver, too.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-06-15 5:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 19:48 [PATCH] gpio: ucb1400: Remove platform setup and teardown support Uwe Kleine-König
2022-06-15 5:43 ` Uwe Kleine-König [this message]
2022-06-23 21:14 ` Bartosz Golaszewski
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=20220615054301.cnb6fdwciuzt3l67@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=marex@denx.de \
--cc=robert.jarzmik@free.fr \
--cc=robin.murphy@arm.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 NNTP newsgroup(s).