Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1456945

Re: [PATCH 2/2] regmap: debugfs: Add support for dumping write only device registers

From Nicolas Ferre <nicolas.ferre@atmel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] regmap: debugfs: Add support for dumping write only device registers
Date 2016-08-05 10:30 +0200
Message-ID <s2IFX-52N-19@gated-at.bofh.it> (permalink)
References <s2shP-28W-3@gated-at.bofh.it> <s2shP-28W-1@gated-at.bofh.it> <s2xrb-62U-1@gated-at.bofh.it>
Organization atmel

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Le 04/08/2016 à 22:26, Mark Brown a écrit :
> On Thu, Aug 04, 2016 at 05:55:58PM +0300, Cristian Birsan wrote:
>> Add support for dumping write only device registers in debugfs. This is
>> useful for audio codecs that have write only registers (like WM8731).
>> The logic that decides if a value can be printed is moved to
>> regmap_printable() function to allow for easier future updates.
> 
> Please check your CC list when sending things upstream - try to ensure
> that people you're sending patches to are relevant to the patch.
> Maintainers often get lots of mail and having to sort out mail that's
> not really relevant to them can make it easier for relevant mail to get
> missed.

Mark,

Just FYI, I gave Cristian the CC list he could use: In fact the Atmel /
Microchip / Free-Electons people are in the list because we are all
working together on the AT91 platforms now. And these platforms use the
audio codec Cristian is working on.


>> +static bool regmap_printable(struct regmap *map, unsigned int reg)
>> +{
>> +	if (regmap_precious(map, reg))
>> +		return false;
>> +
>> +	if (!regmap_readable(map, reg) && !regmap_cached(map, reg))
>> +		return false;
>> +
>> +	return true;
>> +}
> 
> This only has one user...
> 
>>  	for (i = start_reg; i <= to; i += map->reg_stride) {
>> -		if (!regmap_readable(map, i))
>> +		if (!regmap_readable(map, i) && !regmap_cached(map, i))
>>  			continue;
>>  
> 
> ...though it could have more.
> 
>> -			ret = regmap_read(map, i, &val);
>> +			if (regmap_readable(map, i))
>> +				ret = regmap_read(map, i, &val);
>> +			else
>> +				ret = regcache_read(map, i, &val);
>> +
> 
> I don't understand this change, a read will go to cache anyway.
> 


-- 
Nicolas Ferre

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] regmap: debugfs: Add support for dumping write only device registers Cristian Birsan <cristian.birsan@microchip.com> - 2016-08-04 17:00 +0200
  Re: [PATCH 2/2] regmap: debugfs: Add support for dumping write only  device registers Mark Brown <broonie@kernel.org> - 2016-08-04 22:30 +0200
    Re: [PATCH 2/2] regmap: debugfs: Add support for dumping write only  device registers Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-08-05 10:30 +0200

csiph-web