public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: taolan <taolan@huawei.com>
To: Wolfram Sang <wsa@kernel.org>, <linux-i2c@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i2c: hix5hd2: Add some debug enhancement for register access
Date: Tue, 20 Sep 2022 15:35:51 +0800	[thread overview]
Message-ID: <26a62e8c-b3cd-bf61-2113-1e8375f2cc9c@huawei.com> (raw)
In-Reply-To: <YyYuK1UD7CpZQoFr@shikoro>


 

-------- Original Message --------
Title: Re: [PATCH] i2c: hix5hd2: Add some debug enhancement for register access
From: wsa@kernel.org
To: taolan@huawei.com; Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Date: 2022/9/18 04:29
> On Tue, Sep 13, 2022 at 12:48:20PM +0000, Tao Lan wrote:
>> From: taolan <taolan@huawei.com>
>>
>> Sometimes, to locate a fault, we need to know how the register is
>> configured and whether the configuration is incorrect. Currently, no
>> better method is available for analysis.
>>
>> This patch tries to solve the problem by naming the registers and
>> printing the accessed values.
>>
>> Signed-off-by: taolan <taolan@huawei.com>
> 
> Such debug helpers are not suitable for upstream because they need quite
> some resources for rare cases...
Yeah, how about writing to proc as an event, or any suggestions?
> 
>> +		pr_notice("write 0x%04x to %s\n", val, g_i2c_reg_name[idx >> 0x2].name);
> 
> ... and using this loglevel you will flood logs of users.
The loglevel can be adjusted to DEBUG level,and this debug can be off by default. is this ok?
> 
> 

      reply	other threads:[~2022-09-20  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13 12:48 [PATCH] i2c: hix5hd2: Add some debug enhancement for register access Tao Lan
2022-09-17 20:29 ` Wolfram Sang
2022-09-20  7:35   ` taolan [this message]

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=26a62e8c-b3cd-bf61-2113-1e8375f2cc9c@huawei.com \
    --to=taolan@huawei.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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