Re: [PATCH 4/4] gpio/rockchip: fetch deferred output settings on probe
From: Heiko Stübner <heiko@sntech.de>
Date: 2021-09-18 00:00:38
Also in:
linux-gpio, linux-rockchip, lkml
Hi Linus, Am Samstag, 18. September 2021, 01:38:08 CEST schrieb Linus Walleij:
On Tue, Sep 14, 2021 at 12:49 AM Heiko Stuebner [off-list ref] wrote:quoted
Fetch the output settings the pinctrl driver may have created for pinctrl hogs and set the relevant pins as requested. Fixes: 9ce9a02039de ("pinctrl/rockchip: drop the gpio related codes") Signed-off-by: Heiko Stuebner <heiko@sntech.de>Since this patch depends on patch 4/4 I applied this to the pinctrl tree as well. I still think this looks a bit kludgy but can't think of anything better right now and we need a fix for the problem so this goes in. But we need to think of something better,
I'm all ears :-) . And yes I do agree with you that this is not very elegant right now. The issue is that the pinconf part for PIN_CONFIG_OUTPUT is actually using the gpio controller to realize this setting. So when this ends up in a pinctrl-hog, stuff explodes while probing the first pinctrl part. I guess one way would be to somehow only do the pinctrl-hogs _after_ all parts have probed. Thinking about this, the component framework may be one option? And then adding a pinctr-register / init+enable variant where the pinctrl hogs can be aquired separately, not as part of pinctrl_enable? Or maybe I'm thinking way too complex and a way easier solution is around the corner ;-) . Heiko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel