From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965101AbcKKU4Y (ORCPT ); Fri, 11 Nov 2016 15:56:24 -0500 Received: from muru.com ([72.249.23.125]:59444 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936495AbcKKU4W (ORCPT ); Fri, 11 Nov 2016 15:56:22 -0500 Date: Fri, 11 Nov 2016 12:56:18 -0800 From: Tony Lindgren To: Linus Walleij Cc: Haojian Zhuang , Masahiro Yamada , Grygorii Strashko , Nishanth Menon , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux-OMAP Subject: Re: [PATCH 1/5] pinctrl: core: Use delayed work for hogs Message-ID: <20161111205617.GK7138@atomide.com> References: <20161025210221.9150-1-tony@atomide.com> <20161025210221.9150-2-tony@atomide.com> <20161111202650.GI7138@atomide.com> <20161111203210.GJ7138@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161111203210.GJ7138@atomide.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Tony Lindgren [161111 12:32]: > * Tony Lindgren [161111 12:27]: > > * Linus Walleij [161111 12:17]: > > > On Tue, Oct 25, 2016 at 11:02 PM, Tony Lindgren wrote: > > > > > > > Having the pin control framework call pin controller functions > > > > before it's probe has finished is not nice as the pin controller > > > > device driver does not yet have struct pinctrl_dev handle. > > > > > > > > Let's fix this issue by adding deferred work for hogs. This is > > > > needed to be able to add pinctrl generic helper functions. > > > > > > > > Note that the pinctrl functions already take care of the necessary > > > > locking. > > > > > > > > Signed-off-by: Tony Lindgren > > > > > > I don't see why this is necessary? > > > > It's needed because the pin controller driver has not yet > > finished it's probe at this point. We end up calling functions > > in the device driver where no struct pinctrl_dev is yet known > > to the driver. Asking a device driver to do something before > > it's probe is done does not quite follow the Linux driver model :) > > To clarify, that's an issue with multiple instances of the same > driver probing as there's no static pointer to driver specific > data. To clarify even more, the following patches in this series need struct pinctrl_dev to pass to the generic functions :) Tony