linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>,
	Sascha Weisenberger <sascha.weisenberger@siemens.com>
Subject: Re: [PATCH v3 02/10] gpio-exar/8250-exar: Do not even instantiate a GPIO device for Commtech cards
Date: Sat, 27 May 2017 16:40:48 +0300	[thread overview]
Message-ID: <CAHp75Vf56qLSBBAUBGGoT3-AGP2gLtBSjs4jTYCwZA2iR=Qjyw@mail.gmail.com> (raw)
In-Reply-To: <096688442ac54d85b6a3e0577592bc2a6891569b.1495814557.git.jan.kiszka@siemens.com>

On Fri, May 26, 2017 at 7:02 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Commtech adapters need the MPIOs for internal purposes, and the
> gpio-exar driver already refused to pick them up. But there is actually
> no point in even creating the underlying platform device.

FWIW:
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  drivers/gpio/gpio-exar.c            | 3 ---
>  drivers/tty/serial/8250/8250_exar.c | 4 +++-
>  2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c
> index 081076771217..006a9a67c2a4 100644
> --- a/drivers/gpio/gpio-exar.c
> +++ b/drivers/gpio/gpio-exar.c
> @@ -124,9 +124,6 @@ static int gpio_exar_probe(struct platform_device *pdev)
>         void __iomem *p;
>         int index, ret;
>
> -       if (pcidev->vendor != PCI_VENDOR_ID_EXAR)
> -               return -ENODEV;
> -
>         /*
>          * Map the pci device to get the register addresses.
>          * We will need to read and write those registers to control
> diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
> index 8984e8b2d524..c29c7e675890 100644
> --- a/drivers/tty/serial/8250/8250_exar.c
> +++ b/drivers/tty/serial/8250/8250_exar.c
> @@ -245,7 +245,9 @@ pci_xr17v35x_setup(struct exar8250 *priv, struct pci_dev *pcidev,
>                 /* Setup Multipurpose Input/Output pins. */
>                 setup_gpio(pcidev, p);
>
> -               port->port.private_data = xr17v35x_register_gpio(pcidev);
> +               if (pcidev->vendor == PCI_VENDOR_ID_EXAR)
> +                       port->port.private_data =
> +                               xr17v35x_register_gpio(pcidev);
>         }
>
>         return 0;
> --
> 2.12.0
>



-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2017-05-27 13:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 16:02 [PATCH v3 00/10] serial/gpio: exar: Fixes and support for IOT2000 Jan Kiszka
2017-05-26 16:02 ` [PATCH v3 01/10] serial: exar: Leave MPIOs as output for Commtech adapters Jan Kiszka
2017-05-26 16:02 ` [PATCH v3 02/10] gpio-exar/8250-exar: Do not even instantiate a GPIO device for Commtech cards Jan Kiszka
2017-05-27 13:40   ` Andy Shevchenko [this message]
2017-05-29 12:30   ` Linus Walleij
2017-05-26 16:02 ` [PATCH v3 03/10] gpio-exar/8250-exar: Fix passing in of parent PCI device Jan Kiszka
2017-05-27 13:41   ` Andy Shevchenko
2017-05-29 12:31   ` Linus Walleij
2017-05-26 16:02 ` [PATCH v3 04/10] gpio: exar: Allocate resources on behalf of the platform device Jan Kiszka
2017-05-29 12:32   ` Linus Walleij
2017-05-26 16:02 ` [PATCH v3 05/10] gpio: exar: Fix iomap request Jan Kiszka
2017-05-29 12:32   ` Linus Walleij
2017-05-26 16:02 ` [PATCH v3 06/10] gpio: exar: Fix reading of directions and values Jan Kiszka
2017-05-29 12:33   ` Linus Walleij
2017-05-26 16:02 ` [PATCH v3 07/10] gpio-exar/8250-exar: Rearrange gpiochip parenthood Jan Kiszka
2017-05-27 13:43   ` Andy Shevchenko
2017-05-29 12:34   ` Linus Walleij
2017-05-26 16:02 ` [PATCH v3 08/10] gpio: exar: Refactor address and bit calculations Jan Kiszka
2017-05-27 13:44   ` Andy Shevchenko
2017-05-29 12:34   ` Linus Walleij
2017-05-26 16:02 ` [PATCH v3 09/10] gpio-exar/8250-exar: Make set of exported GPIOs configurable Jan Kiszka
2017-05-27 13:48   ` Andy Shevchenko
2017-05-28 16:30     ` Jan Kiszka
2017-05-26 16:02 ` [PATCH v3 10/10] serial: exar: Add support for IOT2040 device Jan Kiszka
2017-05-27 13:52   ` Andy Shevchenko
2017-05-28 16:41     ` Jan Kiszka
2017-05-29 12:39 ` [PATCH v3 00/10] serial/gpio: exar: Fixes and support for IOT2000 Linus Walleij
2017-05-29 13:41   ` Jan Kiszka
2017-05-31  0:01     ` Linus Walleij

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='CAHp75Vf56qLSBBAUBGGoT3-AGP2gLtBSjs4jTYCwZA2iR=Qjyw@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=gnurou@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jan.kiszka@siemens.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sascha.weisenberger@siemens.com \
    --cc=sudip.mukherjee@codethink.co.uk \
    /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).