All of lore.kernel.org
 help / color / mirror / Atom feed
* ASoC Peek individual register debugfs
@ 2011-07-22  0:33 Patrick Lai
  2011-07-22  9:07 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick Lai @ 2011-07-22  0:33 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood, brubin

Hi,

Does latest soc-core.c provide debugfs interface for peeking individual
register? If not, I plan to add this interface.

Thanks
Patrick

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ASoC Peek individual register debugfs
  2011-07-22  0:33 ASoC Peek individual register debugfs Patrick Lai
@ 2011-07-22  9:07 ` Mark Brown
  2011-07-22 18:52   ` Patrick Lai
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2011-07-22  9:07 UTC (permalink / raw)
  To: Patrick Lai; +Cc: alsa-devel, Liam Girdwood, brubin

On Thu, Jul 21, 2011 at 05:33:07PM -0700, Patrick Lai wrote:

> Does latest soc-core.c provide debugfs interface for peeking individual
> register? If not, I plan to add this interface.

codec_reg.  This is the sort of question that can easily be answered by
looking at the code, or a running system.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ASoC Peek individual register debugfs
  2011-07-22  9:07 ` Mark Brown
@ 2011-07-22 18:52   ` Patrick Lai
  2011-07-23  6:44     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick Lai @ 2011-07-22 18:52 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Liam Girdwood, brubin

On 7/22/2011 2:07 AM, Mark Brown wrote:
> On Thu, Jul 21, 2011 at 05:33:07PM -0700, Patrick Lai wrote:
>
>> Does latest soc-core.c provide debugfs interface for peeking individual
>> register? If not, I plan to add this interface.
>
> codec_reg.  This is the sort of question that can easily be answered by
> looking at the code, or a running system.

I checked soc-core.c on Linux next and I do not believe there is such 
debugfs interface. Here is the interface proposal.

By default, cat codec_reg prints entire register dump
If someone echo "<register_addr>" > codec_reg before running
cat codec_reg, only register address and value of given register
would be printed. Afterward, state gets reset. Entire register dump gets 
printed if user cat codec_reg again

Please let me know if the proposal is not appropriate. Otherwise,
I will start implementation going by proposed interface.

Thanks
Patrick

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ASoC Peek individual register debugfs
  2011-07-22 18:52   ` Patrick Lai
@ 2011-07-23  6:44     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-07-23  6:44 UTC (permalink / raw)
  To: Patrick Lai; +Cc: alsa-devel, Liam Girdwood, brubin

On Fri, Jul 22, 2011 at 11:52:44AM -0700, Patrick Lai wrote:
> On 7/22/2011 2:07 AM, Mark Brown wrote:

> >codec_reg.  This is the sort of question that can easily be answered by
> >looking at the code, or a running system.

> I checked soc-core.c on Linux next and I do not believe there is
> such debugfs interface. Here is the interface proposal.

> By default, cat codec_reg prints entire register dump
> If someone echo "<register_addr>" > codec_reg before running
> cat codec_reg, only register address and value of given register
> would be printed. Afterward, state gets reset. Entire register dump
> gets printed if user cat codec_reg again

No, that's bad as it means you can rely on the behaviour of the existing
file.  Just use codec_reg, it already does what you need - if you look
at the code you'll see that it only displays the registers you actually
read from it and since the registers are displayed in a fixed length
format they'll always appear at a consistent place in the file.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-23  6:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22  0:33 ASoC Peek individual register debugfs Patrick Lai
2011-07-22  9:07 ` Mark Brown
2011-07-22 18:52   ` Patrick Lai
2011-07-23  6:44     ` Mark Brown

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.