All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	shawn.lin-NgiFYW8Wbx6Ta72+1OMJgUB+6BGkLq7r@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/3] spi: rockchip: add debug interface support
Date: Tue, 16 Feb 2016 09:32:23 +0800	[thread overview]
Message-ID: <56C27C27.8090108@rock-chips.com> (raw)
In-Reply-To: <20160215172632.GQ18988-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

Hi Mark,

On 2016/2/16 1:26, Mark Brown wrote:
> On Mon, Feb 15, 2016 at 04:28:22PM +0800, Shawn Lin wrote:
>
>> +#ifdef CONFIG_DEBUG_FS
>> +#include <linux/debugfs.h>
>> +#endif
>
> Just include the header.  Only add ifdefs if they do something.
>
>> +static int rockchip_spi_debugfs_init(struct rockchip_spi *rs)
>> +{
>> +	rs->debugfs = debugfs_create_dir("rockchip_spi", NULL);
>> +	if (!rs->debugfs)
>> +		return -ENOMEM;
>> +
>> +	debugfs_create_file("regs", S_IFREG | S_IRUGO,
>> +		rs->debugfs, (void *)rs, &rockchip_spi_dbg_ops);
>> +	return 0;
>> +}
>
> This is completely separate to the core debugfs support for SPI, if
> we're adding new debugfs stuff that's per device we should be extending
> the core debugfs stuff so everything is in one place.

yes, I will check the spi core debugfs to see how we can extend it
for per device to dump specific msg.

Thanks.

>
> Your register dump stuff looks like you might want to consider using
> regmap, it's got this and other register access diagnostics already.
>


-- 
Best Regards
Shawn Lin

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Mark Brown <broonie@kernel.org>
Cc: shawn.lin@rock-chips.com, shawn.lin@kernel-upstream.org,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] spi: rockchip: add debug interface support
Date: Tue, 16 Feb 2016 09:32:23 +0800	[thread overview]
Message-ID: <56C27C27.8090108@rock-chips.com> (raw)
In-Reply-To: <20160215172632.GQ18988@sirena.org.uk>

Hi Mark,

On 2016/2/16 1:26, Mark Brown wrote:
> On Mon, Feb 15, 2016 at 04:28:22PM +0800, Shawn Lin wrote:
>
>> +#ifdef CONFIG_DEBUG_FS
>> +#include <linux/debugfs.h>
>> +#endif
>
> Just include the header.  Only add ifdefs if they do something.
>
>> +static int rockchip_spi_debugfs_init(struct rockchip_spi *rs)
>> +{
>> +	rs->debugfs = debugfs_create_dir("rockchip_spi", NULL);
>> +	if (!rs->debugfs)
>> +		return -ENOMEM;
>> +
>> +	debugfs_create_file("regs", S_IFREG | S_IRUGO,
>> +		rs->debugfs, (void *)rs, &rockchip_spi_dbg_ops);
>> +	return 0;
>> +}
>
> This is completely separate to the core debugfs support for SPI, if
> we're adding new debugfs stuff that's per device we should be extending
> the core debugfs stuff so everything is in one place.

yes, I will check the spi core debugfs to see how we can extend it
for per device to dump specific msg.

Thanks.

>
> Your register dump stuff looks like you might want to consider using
> regmap, it's got this and other register access diagnostics already.
>


-- 
Best Regards
Shawn Lin

  parent reply	other threads:[~2016-02-16  1:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  8:27 [PATCH 0/3] Some rockchip_spi fixes and debug support Shawn Lin
2016-02-15  8:27 ` Shawn Lin
2016-02-15  8:27 ` [PATCH 1/3] spi: rockchip: disable runtime pm when in err case Shawn Lin
     [not found]   ` <1455524878-2696-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-02-15 12:28     ` Applied "spi: rockchip: disable runtime pm when in err case" to the spi tree Mark Brown
2016-02-15  8:28 ` [PATCH 2/3] spi: rockchip: add missing spi_master_put Shawn Lin
     [not found]   ` <1455524892-2739-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-02-15 12:28     ` Applied "spi: rockchip: add missing spi_master_put" to the spi tree Mark Brown
     [not found] ` <1455524848-2646-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-02-15  8:28   ` [PATCH 3/3] spi: rockchip: add debug interface support Shawn Lin
2016-02-15  8:28     ` Shawn Lin
2016-02-15 17:26     ` Mark Brown
     [not found]       ` <20160215172632.GQ18988-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-02-16  1:32         ` Shawn Lin [this message]
2016-02-16  1:32           ` Shawn Lin

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=56C27C27.8090108@rock-chips.com \
    --to=shawn.lin-tnx95d0mmh7dzftrwevzcw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shawn.lin-NgiFYW8Wbx6Ta72+1OMJgUB+6BGkLq7r@public.gmane.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 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.