lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 30 May 2017 21:35:49 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jan Kiszka <jan.kiszka@...mens.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Alexandre Courbot <gnurou@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        Sudip Mukherjee <sudip.mukherjee@...ethink.co.uk>,
        Sascha Weisenberger <sascha.weisenberger@...mens.com>
Subject: Re: [PATCH v4 8/9] gpio-exar/8250-exar: Make set of exported GPIOs configurable

On Tue, May 30, 2017 at 10:01 AM, Jan Kiszka <jan.kiszka@...mens.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ