Re: [PATCH v4 8/9] gpio-exar/8250-exar: Make set of exported GPIOs configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 30, 2017 at 10:01 AM, Jan Kiszka <jan.kiszka@xxxxxxxxxxx> wrote:
> On the SIMATIC, IOT2040 only a single pin is exportable as GPIO, the
> rest is required to operate the UART. To allow modeling this case,
> expand the platform device data structure to specify a (consecutive) pin
> subset for exporting by the gpio-exar driver.

>  static void *
> -xr17v35x_register_gpio(struct pci_dev *pcidev)

> +xr17v35x_register_gpio(struct pci_dev *pcidev, unsigned int first_pin,
> +                      unsigned int ngpios)

I would rather to provide properties here as a parameter...

>  {
> +       struct property_entry properties[] = {
> +               PROPERTY_ENTRY_U32("gpio-exar,first-pin", first_pin),
> +               PROPERTY_ENTRY_U32("ngpios", ngpios),
> +               { }
> +       };

>                 if (pcidev->vendor == PCI_VENDOR_ID_EXAR)

...while defining them somewhere here.

>                         port->port.private_data =
> -                               xr17v35x_register_gpio(pcidev);
> +                               xr17v35x_register_gpio(pcidev, 0, 16);

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux