Thread (1 message) 1 message, 1 author, 2015-01-15

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

From: Guenter Roeck <hidden>
Date: 2015-01-15 19:23:10
Also in: linux-i2c

On Thu, Jan 15, 2015 at 09:12:36PM +0200, Pantelis Antoniou wrote:
Hi Guenter,
quoted
On Jan 15, 2015, at 20:55 , Guenter Roeck [off-list ref] wrote:

On Thu, Jan 15, 2015 at 08:33:18PM +0200, Pantelis Antoniou wrote:
quoted
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-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
---
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help