Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653481
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 8/9] gpio-exar/8250-exar: Make set of exported GPIOs configurable |
| Date | 2017-05-30 20:40 +0200 |
| Message-ID | <tMUdI-2qm-25@gated-at.bofh.it> (permalink) |
| References | <tMJrX-44F-3@gated-at.bofh.it> <tMJrX-44F-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, May 30, 2017 at 10:01 AM, Jan Kiszka <jan.kiszka@siemens.com> 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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v4 8/9] gpio-exar/8250-exar: Make set of exported GPIOs configurable Jan Kiszka <jan.kiszka@siemens.com> - 2017-05-30 09:10 +0200 Re: [PATCH v4 8/9] gpio-exar/8250-exar: Make set of exported GPIOs configurable Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-30 20:40 +0200
csiph-web