gpiolib: of: Use correct fwnode for DT-probed chips
The OF node store in chip->fwnode is used to explicitly override the FW node for a GPIO chip. For chips that use the default FW node (i.e. that of their parent device), this will be NULL and cause the chip not to be fully registered. Instead, use the GPIO device's FW node, which is set to either the node of the parent device or the explicit override in chip->fwnode. Fixes: 8afe8255 ("gpiolib: of: Prepare of_gpiochip_add() / of_gpiochip_remove() for fwnode") Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NThierry Reding <treding@nvidia.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NRobert Marko <robimarko@gmail.com> Tested-by: NAndrew Halaney <ahalaney@redhat.com> Reviewed-by: NBrian Masney <bmasney@redhat.com> Tested-by: NBrian Masney <bmasney@redhat.com> Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Showing
想要评论请 注册 或 登录