OSDN Git Service

regmap: improve debugfs interface to dump specific addresses
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Thu, 21 Jan 2016 18:58:22 +0000 (10:58 -0800)
committerJeevan Shriram <jshriram@codeaurora.org>
Thu, 12 May 2016 00:44:12 +0000 (17:44 -0700)
commitc1fa88dd6d7b816201c98b74ad8b5a2dfc3d542e
tree7a7410aab2239c70812aeaf2bc22adc9da47561e
parent99a0947bbfd30ac14d1828d5c8771bc9ac027bec
regmap: improve debugfs interface to dump specific addresses

The current method of cat-ing register file dumps the entire
address space. One can use dd command to dump a subrange within
the address space. However one needs to know the string length
of each line which is derived from max address, the character
length of each register entry and the format.

Provide simple means to dump a range by allowing user to specify
the start address and the count of registers. When the data is read
convert the dump address to a starting position in the file. Similarly
if the file offset goes beyond the dump range return 0 to indicate
that the data is already dumped.

Also provide means to write to a register address.

CRs-Fixed: 1001770
Change-Id: I3466ce89007d127151f6760328edad116d679db8
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
drivers/base/regmap/internal.h
drivers/base/regmap/regmap-debugfs.c