Commit 266423e
pinctrl: bcm2835: Change init order for gpio hogs
...and gpio-ranges
pinctrl-bcm2835 is a combined pinctrl/gpio driver. Currently the gpio
side is registered first, but this breaks gpio hogs (which are
configured during gpiochip_add_data). Part of the hog initialisation
is a call to pinctrl_gpio_request, and since the pinctrl driver hasn't
yet been registered this results in an -EPROBE_DEFER from which it can
never recover.
Change the initialisation sequence to register the pinctrl driver
first.
This also solves a similar problem with the gpio-ranges property, which
is required in order for released pins to be returned to inputs.
Fixes: 73345a1 ("pinctrl: bcm2835: Pass irqchip when adding gpiochip")
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211206092237.4105895-2-phil@raspberrypi.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>1 parent 2d5446d commit 266423e
1 file changed
Lines changed: 16 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
1247 | 1259 | | |
1248 | 1260 | | |
1249 | 1261 | | |
1250 | 1262 | | |
1251 | 1263 | | |
1252 | 1264 | | |
1253 | 1265 | | |
1254 | | - | |
| 1266 | + | |
| 1267 | + | |
1255 | 1268 | | |
| 1269 | + | |
1256 | 1270 | | |
1257 | 1271 | | |
1258 | 1272 | | |
| |||
1307 | 1321 | | |
1308 | 1322 | | |
1309 | 1323 | | |
| 1324 | + | |
1310 | 1325 | | |
1311 | 1326 | | |
1312 | 1327 | | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | 1328 | | |
1326 | 1329 | | |
1327 | 1330 | | |
| |||
0 commit comments