From: root <lijessen2016@gmail.com>
To: wsa@kernel.org
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
root <root@LAPTOP-706CEGJT.localdomain>
Subject: [PATCH] Print some info into ring-buffer during loading
Date: Sun, 19 Jun 2022 16:32:07 +0800 [thread overview]
Message-ID: <20220619083207.749-1-root@LAPTOP-706CEGJT.localdomain> (raw)
---
drivers/i2c/i2c-core-base.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index d43db2c3876e..8e127ff3e32e 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -469,6 +469,8 @@ static int i2c_device_probe(struct device *dev)
struct i2c_driver *driver;
int status;
+ pr_info("I have changed i2c device driver\n");
+
if (!client)
return 0;
@@ -1829,6 +1831,7 @@ int i2c_for_each_dev(void *data, int (*fn)(struct device *dev, void *data))
int res;
mutex_lock(&core_lock);
+ pr_info("i2c_for_each_dev: before bus_for_each_dev\n");
res = bus_for_each_dev(&i2c_bus_type, NULL, data, fn);
mutex_unlock(&core_lock);
@@ -1838,8 +1841,10 @@ EXPORT_SYMBOL_GPL(i2c_for_each_dev);
static int __process_new_driver(struct device *dev, void *data)
{
+ pr_info("Enter process_new_driver\n");
if (dev->type != &i2c_adapter_type)
return 0;
+ pr_info("__process_new_driver, before i2c_do_add_adapter\n");
return i2c_do_add_adapter(data, to_i2c_adapter(dev));
}
@@ -1860,13 +1865,16 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
driver->driver.owner = owner;
driver->driver.bus = &i2c_bus_type;
INIT_LIST_HEAD(&driver->clients);
-
+ pr_info("i2c driver name is [%s] before driver_register\n", driver->driver.name);
/* When registration returns, the driver core
* will have called probe() for all matching-but-unbound devices.
*/
res = driver_register(&driver->driver);
- if (res)
+ if (res){
+ pr_info("i2c driver name is [%s], res is [%d]\n", driver->driver.name, res);
return res;
+ }
+ pr_info("i2c driver name is [%s], after driver_register\n", driver->driver.name);
pr_debug("driver [%s] registered\n", driver->driver.name);
@@ -1933,7 +1941,7 @@ EXPORT_SYMBOL(i2c_clients_command);
static int __init i2c_init(void)
{
int retval;
-
+ pr_info("Jason-Lee: Entering i2c_init\n");
retval = of_alias_get_highest_id("i2c");
down_write(&__i2c_board_lock);
--
2.25.1
next reply other threads:[~2022-06-19 8:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-19 8:32 root [this message]
2022-06-19 10:59 ` [PATCH] Print some info into ring-buffer during loading Conor.Dooley
2022-06-19 11:08 ` Wolfram Sang
2022-06-19 11:17 ` Conor.Dooley
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=20220619083207.749-1-root@LAPTOP-706CEGJT.localdomain \
--to=lijessen2016@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=root@LAPTOP-706CEGJT.localdomain \
--cc=wsa@kernel.org \
/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