Thread (15 messages) 15 messages, 4 authors, 2016-08-23

Re: [PATCH 07/13] pinctrl: add a pincontrol driver for BCM6358

From: Jonas Gorski <jonas.gorski@gmail.com>
Date: 2016-08-22 13:57:08
Also in: linux-gpio

Hi

On 22 August 2016 at 15:21, Linus Walleij [off-list ref] wrote:
On Fri, Aug 19, 2016 at 12:53 PM, Jonas Gorski [off-list ref] wrote:
quoted
Add a pincotrol driver for BCM6358. BCM6358 allow overlaying different
functions onto the GPIO pins. It does not support configuring individual
pins but only whole groups. These groups may overlap, and still require
the directions to be set correctly in the GPIO register. In addition the
functions register controls other, not directly mux related functions.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
quoted
+       if (pdev->dev.of_node)
+               mode = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
+                                                      "brcm,gpiomode");

This seems to be using syscon, albeit for something else.
quoted
+       else
+               mode = syscon_regmap_lookup_by_pdevname("syscon.fffe0098");
That looks very very fragile.
For !OF I need to use the pdevname, so I need to "guess" the right
one, and using the scheme of "syscon.<address>" seemed to be the one
most likely not conflicting with anything else.


Regards
Jonas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help