* [PATCH v1 1/1] gpio: exar: Allow IO port access
@ 2022-10-17 17:06 Andy Shevchenko
2022-10-18 8:29 ` Linus Walleij
2022-10-25 15:41 ` Bartosz Golaszewski
0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2022-10-17 17:06 UTC (permalink / raw)
To: Andy Shevchenko, Qingtao Cao, linux-gpio, linux-kernel
Cc: Linus Walleij, Bartosz Golaszewski
It's possible that PCI device can provide an IO port resource for
the device. regmap MMIO currently uses MMIO by default. With an
additional flag we enable support for IO port accesses.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpio-exar.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c
index 482f678c893e..df1bdaae441c 100644
--- a/drivers/gpio/gpio-exar.c
+++ b/drivers/gpio/gpio-exar.c
@@ -141,6 +141,7 @@ static const struct regmap_config exar_regmap_config = {
.name = "exar-gpio",
.reg_bits = 16,
.val_bits = 8,
+ .io_port = true,
};
static int gpio_exar_probe(struct platform_device *pdev)
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] gpio: exar: Allow IO port access
2022-10-17 17:06 [PATCH v1 1/1] gpio: exar: Allow IO port access Andy Shevchenko
@ 2022-10-18 8:29 ` Linus Walleij
2022-10-18 12:17 ` William Breathitt Gray
2022-10-25 15:41 ` Bartosz Golaszewski
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2022-10-18 8:29 UTC (permalink / raw)
To: Andy Shevchenko, William Gray
Cc: Qingtao Cao, linux-gpio, linux-kernel, Bartosz Golaszewski
On Mon, Oct 17, 2022 at 7:05 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> It's possible that PCI device can provide an IO port resource for
> the device. regmap MMIO currently uses MMIO by default. With an
> additional flag we enable support for IO port accesses.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Looks clever to me!
Acked-by: Linus Walleij <linus.walleij@linaro.org>
I would let William have a look at it as well, as he's worked extensively
with port-mapped I/O.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] gpio: exar: Allow IO port access
2022-10-18 8:29 ` Linus Walleij
@ 2022-10-18 12:17 ` William Breathitt Gray
0 siblings, 0 replies; 4+ messages in thread
From: William Breathitt Gray @ 2022-10-18 12:17 UTC (permalink / raw)
To: Linus Walleij, Andy Shevchenko
Cc: Qingtao Cao, linux-gpio, linux-kernel, Bartosz Golaszewski
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
On Tue, Oct 18, 2022 at 10:29:13AM +0200, Linus Walleij wrote:
> On Mon, Oct 17, 2022 at 7:05 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>
> > It's possible that PCI device can provide an IO port resource for
> > the device. regmap MMIO currently uses MMIO by default. With an
> > additional flag we enable support for IO port accesses.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Looks clever to me!
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> I would let William have a look at it as well, as he's worked extensively
> with port-mapped I/O.
>
> Yours,
> Linus Walleij
I love how simple it is to add IO port support to these drivers now. :-)
Acked-by: William Breathitt Gray <william.gray@linaro.org>
I'm hoping to convert several of the port-mapped GPIO drivers to the
regmap API later this cycle, so it's good to see other modules making
use of this interface as well.
Thanks,
William Breathitt Gray
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] gpio: exar: Allow IO port access
2022-10-17 17:06 [PATCH v1 1/1] gpio: exar: Allow IO port access Andy Shevchenko
2022-10-18 8:29 ` Linus Walleij
@ 2022-10-25 15:41 ` Bartosz Golaszewski
1 sibling, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2022-10-25 15:41 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Qingtao Cao, linux-gpio, linux-kernel, Linus Walleij
On Mon, Oct 17, 2022 at 7:05 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> It's possible that PCI device can provide an IO port resource for
> the device. regmap MMIO currently uses MMIO by default. With an
> additional flag we enable support for IO port accesses.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/gpio/gpio-exar.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c
> index 482f678c893e..df1bdaae441c 100644
> --- a/drivers/gpio/gpio-exar.c
> +++ b/drivers/gpio/gpio-exar.c
> @@ -141,6 +141,7 @@ static const struct regmap_config exar_regmap_config = {
> .name = "exar-gpio",
> .reg_bits = 16,
> .val_bits = 8,
> + .io_port = true,
> };
>
> static int gpio_exar_probe(struct platform_device *pdev)
> --
> 2.35.1
>
Applied, thanks!
Bartosz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-25 15:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 17:06 [PATCH v1 1/1] gpio: exar: Allow IO port access Andy Shevchenko
2022-10-18 8:29 ` Linus Walleij
2022-10-18 12:17 ` William Breathitt Gray
2022-10-25 15:41 ` Bartosz Golaszewski
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).