Re: [PATCH v5 10/11] gpio-exar/8250-exar: Make set of exported GPIOs configurable

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

 



On Fri, Jun 2, 2017 at 10:28 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.

> +       if (device_property_read_u32(&pdev->dev, "gpio-exar,first-pin",
> +                                    &first_pin) < 0 ||
> +           device_property_read_u32(&pdev->dev, "ngpios", &ngpios) < 0)
> +               return -EINVAL;

You shadow an error.

Please use
ret = device_property_...;
if (ret)
 return ret;

ret = ...
...

Moreover, I missed how you named first property, I would go rather
with "linux," prefix to show that is _internal_ / Linux only property.

Perhaps something like "linux,first-pin" ?

-- 
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