Thread (61 messages) 61 messages, 10 authors, 2022-10-28

Re: [PATCH v1 06/11] PCI: aardvark: switch to using devm_gpiod_get_optional()

From: Andy Shevchenko <hidden>
Date: 2022-09-05 10:48:50
Also in: dri-devel, linux-gpio, linux-pci, linux-tegra, linux-usb, linux-watchdog, lkml

On Mon, Sep 5, 2022 at 10:02 AM Pali Rohár [off-list ref] wrote:
On Sunday 04 September 2022 23:30:58 Dmitry Torokhov wrote:
quoted
I would like to stop exporting OF-specific devm_gpiod_get_from_of_node()
so that gpiolib can be cleaned a bit, so let's switch to the generic
device property API.

I believe that the only reason the driver, instead of the standard
devm_gpiod_get_optional(), used devm_gpiod_get_from_of_node() is
because it wanted to set up a pretty consumer name for the GPIO,
IIRC consumer name is not used at all.
It's. The user space tools use it as a label. So, GPIO line can have
"name" (this is provider specific) and "label" (which is consumer
specific, i.o.w. how we use this line).

...
quoted
+             if (ret != -EPROBE_DEFER)
+                     dev_err(dev, "Failed to get reset-gpio: %i\n",
+                             ret);
+             return ret;
I understand that in the input subsystem maintainer's hat you don't
like dev_err_probe(), but it's a good case to have it here.

...
quoted
+     ret = gpiod_set_consumer_name(pcie->reset_gpio, "pcie1-reset");
+     if (ret) {
+             dev_err(dev, "Failed to set reset gpio name: %d\n", ret);
+             return ret;
      }
Ditto.


-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help