From: Jean Delvare <khali@linux-fr.org>
To: Eugeni Dodonov <eugeni@dodonov.net>
Cc: Michael Buesch <mb@bu3sch.de>,
dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there
Date: Thu, 20 Oct 2011 14:40:43 +0200 [thread overview]
Message-ID: <20111020144043.799f81d9@endymion.delvare> (raw)
In-Reply-To: <20111020143339.59270702@endymion.delvare>
[-- Attachment #1: Type: text/plain, Size: 64 bytes --]
Forgot to attach the patch, sorry. Here it is.
--
Jean Delvare
[-- Attachment #2: i2c-algo-bit-export-test.patch --]
[-- Type: text/x-patch, Size: 1702 bytes --]
---
drivers/i2c/algos/i2c-algo-bit.c | 8 ++++++--
include/linux/i2c-algo-bit.h | 3 +++
2 files changed, 9 insertions(+), 2 deletions(-)
--- linux-3.1-rc10.orig/drivers/i2c/algos/i2c-algo-bit.c 2011-10-20 12:03:05.000000000 +0200
+++ linux-3.1-rc10/drivers/i2c/algos/i2c-algo-bit.c 2011-10-20 12:57:20.000000000 +0200
@@ -231,8 +231,11 @@ static int i2c_inb(struct i2c_adapter *i
/*
* Sanity check for the adapter hardware - check the reaction of
* the bus lines only if it seems to be idle.
+ * Must be called with i2c_adap->bus_lock held if adapter is registered.
+ * This is done by surrounding the call to i2c_bit_test_bus() with
+ * i2c_lock_adapter(i2c_adap) and i2c_unlock_adapter(i2c_adap).
*/
-static int test_bus(struct i2c_adapter *i2c_adap)
+int i2c_bit_test_bus(struct i2c_adapter *i2c_adap)
{
struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
const char *name = i2c_adap->name;
@@ -320,6 +323,7 @@ bailout:
return -ENODEV;
}
+EXPORT_SYMBOL_GPL(i2c_bit_test_bus);
/* ----- Utility functions
*/
@@ -623,7 +627,7 @@ static int __i2c_bit_add_bus(struct i2c_
int ret;
if (bit_test) {
- ret = test_bus(adap);
+ ret = i2c_bit_test_bus(adap);
if (ret < 0)
return -ENODEV;
}
--- linux-3.1-rc10.orig/include/linux/i2c-algo-bit.h 2011-07-22 04:17:23.000000000 +0200
+++ linux-3.1-rc10/include/linux/i2c-algo-bit.h 2011-10-20 12:54:33.000000000 +0200
@@ -50,4 +50,7 @@ struct i2c_algo_bit_data {
int i2c_bit_add_bus(struct i2c_adapter *);
int i2c_bit_add_numbered_bus(struct i2c_adapter *);
+/* Must be called with bus_lock held if adapter is registered */
+int i2c_bit_test_bus(struct i2c_adapter *);
+
#endif /* _LINUX_I2C_ALGO_BIT_H */
[-- Attachment #3: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2011-10-20 12:40 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 13:12 [PATCH] Improvements in edid detection timings (final) Eugeni Dodonov
2011-10-17 13:12 ` [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there Eugeni Dodonov
2011-10-17 20:41 ` Keith Packard
2011-10-17 21:07 ` Eugeni Dodonov
2011-10-17 22:41 ` Keith Packard
2011-10-18 0:06 ` Eugeni Dodonov
2011-10-18 10:02 ` [Intel-gfx] " Dave Airlie
2011-10-18 13:14 ` Jean Delvare
2011-10-18 13:37 ` Eugeni Dodonov
2011-10-20 12:33 ` Jean Delvare
2011-10-20 12:40 ` Jean Delvare [this message]
2011-10-20 13:13 ` Jean Delvare
2011-10-20 13:18 ` Michael Büsch
2011-10-24 14:40 ` Eugeni Dodonov
2011-10-25 13:03 ` [PATCH] Give up on edid retries when i2c bus is not responding Eugeni Dodonov
2011-10-26 17:06 ` Eugeni Dodonov
2011-10-26 17:18 ` Chris Wilson
2011-10-26 17:35 ` Eugeni Dodonov
2011-10-30 15:53 ` [Intel-gfx] [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there Jean Delvare
2011-10-18 14:01 ` Alex Deucher
2011-11-01 0:31 ` [PATCH] edid candidate for -next Eugeni Dodonov
2011-11-01 0:31 ` [PATCH] Give up on edid retries when i2c bus is not responding Eugeni Dodonov
2011-10-31 19:45 ` [Intel-gfx] [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there Chris Wilson
2011-10-17 13:12 ` [PATCH 2/2] Check if the bus is valid prior to discovering edid Eugeni Dodonov
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=20111020144043.799f81d9@endymion.delvare \
--to=khali@linux-fr.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=eugeni@dodonov.net \
--cc=mb@bu3sch.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.