Re: [PATCH] i2c: Mark instantiated device nodes with OF_POPULATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, Jan 15, 2015 at 09:12:36PM +0200, Pantelis Antoniou wrote:
> Hi Guenter,
> 
> > On Jan 15, 2015, at 20:55 , Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> > 
> > On Thu, Jan 15, 2015 at 08:33:18PM +0200, Pantelis Antoniou wrote:
> >> Mark (and unmark) device nodes with the POPULATE flag as appropriate.
> >> This is required to avoid multi probing when using I2C and device
> >> overlays containing a mux.
> >> This patch is also more careful with the release of the adapter device
> >> which caused a deadlock with muxes, and does not break the build
> >> on !OF since the node flag accessors are not defined then.
> >> 
> >> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@xxxxxxxxxxxx>
> >> ---
> >> drivers/i2c/i2c-core.c | 18 +++++++++++++++++-
> >> 1 file changed, 17 insertions(+), 1 deletion(-)
> >> 
> >> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> >> index 39d25a8..1d44e3a 100644
> >> --- a/drivers/i2c/i2c-core.c
> >> +++ b/drivers/i2c/i2c-core.c
> >> @@ -1122,6 +1122,10 @@ EXPORT_SYMBOL_GPL(i2c_new_device);
> >>  */
> >> void i2c_unregister_device(struct i2c_client *client)
> >> {
> >> +#if IS_ENABLED(CONFIG_OF_DYNAMIC)
> > 
> > Hi Pantelis,
> > 
> > I thought I read a note somewhere a couple of days ago suggesting that
> > CONFIG_OF_DYNAMIC would go away soon. Also, of_node_clear_flag is defined
> > in #ifdef CONFIG_OF, and AFAICS none of the other callers set OF_POPULATED
> > in the context of CONFIG_OF_DYNAMIC. Given that, wouldn't it be better
> > to use CONFIG_OF ?
> > 
> > Thanks,
> > Guenter
> > 
> 
> Well, I thought about it. Thing is that the notifier is under CONFIG_DYNAMIC,
> and it seems it’s natural to be that way.
> 
> When we move to always enabling CONFIG_DYNAMIC the change to CONFIG_OF will be
> part of the conversion.
> 
Ok.

Thanks,
Guenter
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux