* [PATCHv2] i2c: omap: Disable default probing of i2c devices for omap i2c.
@ 2014-04-09 10:36 Sourav Poddar
[not found] ` <1397039808-28594-1-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Sourav Poddar @ 2014-04-09 10:36 UTC (permalink / raw)
To: tony, wsa, linux-omap, linux-i2c
Cc: Sourav Poddar, Felipe Balbi, Nishanth Menon
I2c core supports defualt probing functionality for devices not registered through
dt/board files. If there are any client driver registered, i2c core will try to
check if there is any device present corresponding to the address supplied by
the client driver. If the device is actually present and not registered, core
will register it, else the device default probe will fail and we get a omap i2c controller
specific timeout messages.
For example, Using multi_v7_config on omap5-uevm, CONFIG_SENSORS_LM90 and CONFIG_ICS932S401
is the driver which is enabled and gets registered. I2c core tries to find a valid
corresponding device on each of the address supplied by registered driver,
but could not find anyone. Hence, keep dumping the controller timeout speciic message.
The patch tends to disable class based instantiation, default probing will not be attempted
by the i2c-core for omap i2c. Device will always get registered through device tree(dt case)
and board files(for non dt cases).
Tested i2c enumeration and data transfer(using i2c utilities) with linux-next master
on the following boards using omap2plus_defconfig:
* Omap3 beagle-Xm (for dt and non dt case)
* omap4 panda
* omap5-uevm
* Dra7xx
* Beaglebone white
* Beaglebone black
* am335x-evm
* AM43xx epos evm
Tested i2c enumeration with linux-next master(except omap5)
on the following boards using multi_v7_defconfig:
* Omap3 beagle-Xm (for dt and non dt case)
* omap4 panda
* omap5-uevm (tested on next-20140131 tag, where i2c problem can be seen)
* Dra7xx
* Beaglebone white
* Beaglebone black
* am335x-evm
* AM43xx epos evm
Cc: Felipe Balbi <balbi@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Reported-by: Nishanth Menon <nm@ti.com>
---
v1->v2:
add "Reported-by" attribute
drivers/i2c/busses/i2c-omap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 85f8eac..4ec29a0 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1238,7 +1238,7 @@ omap_i2c_probe(struct platform_device *pdev)
adap = &dev->adapter;
i2c_set_adapdata(adap, dev);
adap->owner = THIS_MODULE;
- adap->class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED;
+ adap->class = 0;
strlcpy(adap->name, "OMAP I2C adapter", sizeof(adap->name));
adap->algo = &omap_i2c_algo;
adap->dev.parent = &pdev->dev;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <1397039808-28594-1-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>]
* Re: [PATCHv2] i2c: omap: Disable default probing of i2c devices for omap i2c. [not found] ` <1397039808-28594-1-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org> @ 2014-04-09 12:29 ` Nishanth Menon 2014-04-09 12:37 ` Wolfram Sang 1 sibling, 0 replies; 4+ messages in thread From: Nishanth Menon @ 2014-04-09 12:29 UTC (permalink / raw) To: Sourav Poddar, tony-4v6yS6AI5VpBDgjK7y7TUQ, wsa-z923LK4zBo2bacvFa/9K2g, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-i2c-u79uwXL29TY76Z2rM5mHXA Cc: Felipe Balbi On 04/09/2014 05:36 AM, Sourav Poddar wrote: > I2c core supports defualt probing functionality for devices not registered through > dt/board files. If there are any client driver registered, i2c core will try to > check if there is any device present corresponding to the address supplied by > the client driver. If the device is actually present and not registered, core > will register it, else the device default probe will fail and we get a omap i2c controller > specific timeout messages. > For example, Using multi_v7_config on omap5-uevm, CONFIG_SENSORS_LM90 and CONFIG_ICS932S401 > is the driver which is enabled and gets registered. I2c core tries to find a valid > corresponding device on each of the address supplied by registered driver, > but could not find anyone. Hence, keep dumping the controller timeout speciic message. > > The patch tends to disable class based instantiation, default probing will not be attempted > by the i2c-core for omap i2c. Device will always get registered through device tree(dt case) > and board files(for non dt cases). Conflicts against commit 04eceb00e5f793013392ad8713c645a8132f648c (i2c: i2c-omap: deprecate class based instantiation) in next-20140409 if you are dropping HWMON adap->class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED; this might be a good time to explain why. Also drop the following testing information down into diffstat section, there is no need to retain that information in git history. > > Tested i2c enumeration and data transfer(using i2c utilities) with linux-next master > on the following boards using omap2plus_defconfig: > * Omap3 beagle-Xm (for dt and non dt case) > * omap4 panda > * omap5-uevm > * Dra7xx > * Beaglebone white > * Beaglebone black > * am335x-evm > * AM43xx epos evm > > Tested i2c enumeration with linux-next master(except omap5) > on the following boards using multi_v7_defconfig: > * Omap3 beagle-Xm (for dt and non dt case) > * omap4 panda > * omap5-uevm (tested on next-20140131 tag, where i2c problem can be seen) > * Dra7xx > * Beaglebone white > * Beaglebone black > * am335x-evm > * AM43xx epos evm > > Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > Cc: Nishanth Menon <nm-l0cyMroinI0@public.gmane.org> > Signed-off-by: Sourav Poddar <sourav.poddar-l0cyMroinI0@public.gmane.org> > Reported-by: Nishanth Menon <nm-l0cyMroinI0@public.gmane.org> > --- also indicate here against which tree and branch this patch is for. > v1->v2: > add "Reported-by" attribute > drivers/i2c/busses/i2c-omap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c > index 85f8eac..4ec29a0 100644 > --- a/drivers/i2c/busses/i2c-omap.c > +++ b/drivers/i2c/busses/i2c-omap.c > @@ -1238,7 +1238,7 @@ omap_i2c_probe(struct platform_device *pdev) > adap = &dev->adapter; > i2c_set_adapdata(adap, dev); > adap->owner = THIS_MODULE; > - adap->class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED; > + adap->class = 0; adap->class = I2C_CLASS_DEPRECATED > strlcpy(adap->name, "OMAP I2C adapter", sizeof(adap->name)); > adap->algo = &omap_i2c_algo; > adap->dev.parent = &pdev->dev; > -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCHv2] i2c: omap: Disable default probing of i2c devices for omap i2c. [not found] ` <1397039808-28594-1-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org> 2014-04-09 12:29 ` Nishanth Menon @ 2014-04-09 12:37 ` Wolfram Sang 2014-04-10 13:45 ` sourav 1 sibling, 1 reply; 4+ messages in thread From: Wolfram Sang @ 2014-04-09 12:37 UTC (permalink / raw) To: Sourav Poddar Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-i2c-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Nishanth Menon [-- Attachment #1: Type: text/plain, Size: 1256 bytes --] On Wed, Apr 09, 2014 at 04:06:48PM +0530, Sourav Poddar wrote: > I2c core supports defualt probing functionality for devices not registered through > dt/board files. If there are any client driver registered, i2c core will try to > check if there is any device present corresponding to the address supplied by > the client driver. If the device is actually present and not registered, core > will register it, else the device default probe will fail and we get a omap i2c controller > specific timeout messages. > For example, Using multi_v7_config on omap5-uevm, CONFIG_SENSORS_LM90 and CONFIG_ICS932S401 > is the driver which is enabled and gets registered. I2c core tries to find a valid > corresponding device on each of the address supplied by registered driver, > but could not find anyone. Hence, keep dumping the controller timeout speciic message. This is exactly why I2C_CLASS_DEPRECATED was implemented. So, users which are using classes can migrate away. But this needs time. Given that I2C_CLASS_DEPRECATED is new in 3.15, I'd think setting classes to 0 (thus totally disabling them) should not be before 3.17. You don't need to resend, I'll do it for all drivers I added this new class to when I feel it is safe to do. Thanks, Wolfram [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCHv2] i2c: omap: Disable default probing of i2c devices for omap i2c. 2014-04-09 12:37 ` Wolfram Sang @ 2014-04-10 13:45 ` sourav 0 siblings, 0 replies; 4+ messages in thread From: sourav @ 2014-04-10 13:45 UTC (permalink / raw) To: Wolfram Sang; +Cc: tony, linux-omap, linux-i2c, Felipe Balbi, Nishanth Menon Hi Wolfram, On Wednesday 09 April 2014 06:07 PM, Wolfram Sang wrote: > On Wed, Apr 09, 2014 at 04:06:48PM +0530, Sourav Poddar wrote: >> I2c core supports defualt probing functionality for devices not registered through >> dt/board files. If there are any client driver registered, i2c core will try to >> check if there is any device present corresponding to the address supplied by >> the client driver. If the device is actually present and not registered, core >> will register it, else the device default probe will fail and we get a omap i2c controller >> specific timeout messages. >> For example, Using multi_v7_config on omap5-uevm, CONFIG_SENSORS_LM90 and CONFIG_ICS932S401 >> is the driver which is enabled and gets registered. I2c core tries to find a valid >> corresponding device on each of the address supplied by registered driver, >> but could not find anyone. Hence, keep dumping the controller timeout speciic message. > This is exactly why I2C_CLASS_DEPRECATED was implemented. So, users > which are using classes can migrate away. But this needs time. Given > that I2C_CLASS_DEPRECATED is new in 3.15, I'd think setting classes to 0 > (thus totally disabling them) should not be before 3.17. You don't need > to resend, I'll do it for all drivers I added this new class to when I > feel it is safe to do. OK then, I am dropping this patch, will wait for your patches on it. Thanks for the review. ~Sourav > > Thanks, > > Wolfram > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-10 13:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09 10:36 [PATCHv2] i2c: omap: Disable default probing of i2c devices for omap i2c Sourav Poddar
[not found] ` <1397039808-28594-1-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2014-04-09 12:29 ` Nishanth Menon
2014-04-09 12:37 ` Wolfram Sang
2014-04-10 13:45 ` sourav
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).