From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: <linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>,
<linux-i2c@vger.kernel.org>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Haavard Skinnemoen <hskinnemoen@gmail.com>
Subject: [RFC 2/2] i2c: gpio: drop class based instantiation of slaves
Date: Wed, 19 Jun 2013 21:22:12 +0300 [thread overview]
Message-ID: <1371666132-29655-2-git-send-email-grygorii.strashko@ti.com> (raw)
In-Reply-To: <1371666132-29655-1-git-send-email-grygorii.strashko@ti.com>
Class based instantiation mechanism can cause huge delays when booting.
For example: when CONFIG_SENSORS_LM75 option is enabled for or omap5-uevm board,
where i2c-gpio is used for HDMI edid reading - it introduces up to 5 sec boot
delay.
It's not recommended to use this mechanism with embedded I2C, so disable it by
leaving I2C adapter "class" field undefined (remove I2C_CLASS_HWMON and
I2C_CLASS_SPD) and add a deprecation warning to allow users, relying on this
mechanism, to switch to something better.
CC: Haavard Skinnemoen <hskinnemoen@gmail.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
drivers/i2c/busses/i2c-gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index bc6e139..33e3d0e 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -215,7 +215,7 @@ static int i2c_gpio_probe(struct platform_device *pdev)
snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id);
adap->algo_data = bit_data;
- adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
+ adap->class = I2C_CLASS_DEPRECATED;
adap->dev.parent = &pdev->dev;
adap->dev.of_node = pdev->dev.of_node;
--
1.7.9.5
next prev parent reply other threads:[~2013-06-19 18:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 17:33 [PATCH] i2c: Let users disable "Probe an I2C bus for certain devices" Grygorii Strashko
2013-06-04 17:49 ` Wolfram Sang
2013-06-05 16:13 ` Grygorii Strashko
2013-06-07 9:06 ` Wolfram Sang
2013-06-07 9:09 ` [RFC] i2c: add deprecation warning for class based instantiation Wolfram Sang
2013-06-19 10:15 ` Wolfram Sang
2013-06-19 18:21 ` Grygorii Strashko
2013-06-20 18:37 ` Wolfram Sang
2013-06-19 18:22 ` Grygorii Strashko
2013-06-19 18:22 ` [RFC 1/2] i2c: omap: drop class based instantiation of slaves Grygorii Strashko
2013-06-19 18:22 ` Grygorii Strashko [this message]
2013-06-07 10:10 ` [PATCH] i2c: Let users disable "Probe an I2C bus for certain devices" Grygorii Strashko
2013-06-07 21:28 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371666132-29655-2-git-send-email-grygorii.strashko@ti.com \
--to=grygorii.strashko@ti.com \
--cc=hskinnemoen@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).