RE: [PATCH] ASoC: wm8804: Allow control of master clock divider in PLL generation

2014-01-17 Thread Dimitris Papastamos
> Charles (or someone else from Wolfson), you commented on previous > versions of this - are you still OK with it? Looks good to me. Privacy & Confidentiality Notice - This message and any attachments contain privileged and confidential

RE: [PATCH] ASoC: wm8804: Allow control of master clock divider in PLL generation

2014-01-17 Thread Dimitris Papastamos
Charles (or someone else from Wolfson), you commented on previous versions of this - are you still OK with it? Looks good to me. Privacy Confidentiality Notice - This message and any attachments contain privileged and confidential information

Re: [PATCH] drivers: regmap: bugfix in regcache-rbtree.c

2013-08-21 Thread Dimitris Papastamos
On Wed, Aug 21, 2013 at 04:28:23PM +0100, Mark Brown wrote: > On Wed, Aug 21, 2013 at 05:08:46PM +0200, David Jander wrote: > > > This looks better. Not ideal still, but at least the codec works! > > > Should I re-send a patch with this fix? > > Yes, it's not the fix we actually want (we want

Re: [PATCH] drivers: regmap: bugfix in regcache-rbtree.c

2013-08-21 Thread Dimitris Papastamos
On Wed, Aug 21, 2013 at 04:28:23PM +0100, Mark Brown wrote: On Wed, Aug 21, 2013 at 05:08:46PM +0200, David Jander wrote: This looks better. Not ideal still, but at least the codec works! Should I re-send a patch with this fix? Yes, it's not the fix we actually want (we want to be

[PATCH] regmap: debugfs: Check return value of regmap_write()

2013-05-09 Thread Dimitris Papastamos
Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regmap-debugfs.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 6cd1b78a..ee81635 100644 --- a/drivers/base/regmap/regmap

[PATCH] regmap: debugfs: Check return value of regmap_write()

2013-05-09 Thread Dimitris Papastamos
Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regmap-debugfs.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 6cd1b78a..ee81635 100644

Re: [PATCH 3/4] regmap: cache: Split raw and non-raw syncs

2013-03-29 Thread Dimitris Papastamos
On Fri, Mar 29, 2013 at 09:03:44PM +, Mark Brown wrote: > For code clarity after implementing block writes split out the raw and > non-raw I/O sync implementations. > > Signed-off-by: Mark Brown Reviewed-by: Dimitris Papastamos -- To unsubscribe from this list: send the line

Re: [PATCH 4/4] regmap: cache: Write consecutive registers in a single block write

2013-03-29 Thread Dimitris Papastamos
it is expected that > hardware which has a register format which can support raw writes will > support auto incrementing writes, this decision may need to be revised in > future. > > Signed-off-by: Mark Brown Reviewed-by: Dimitris Papastamos -- To unsubscribe from this list: send the

Re: [PATCH 2/4] regmap: cache: Factor out block sync

2013-03-29 Thread Dimitris Papastamos
> Signed-off-by: Mark Brown Reviewed-by: Dimitris Papastamos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 1/4] regmap: cache: Factor out reg_present support from rbtree cache

2013-03-29 Thread Dimitris Papastamos
d-off-by: Mark Brown Looks good. Reviewed-by: Dimitris Papastamos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 1/4] regmap: cache: Factor out reg_present support from rbtree cache

2013-03-29 Thread Dimitris Papastamos
...@opensource.wolfsonmicro.com Looks good. Reviewed-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ

Re: [PATCH 2/4] regmap: cache: Factor out block sync

2013-03-29 Thread Dimitris Papastamos
Brown broo...@opensource.wolfsonmicro.com Reviewed-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 3/4] regmap: cache: Split raw and non-raw syncs

2013-03-29 Thread Dimitris Papastamos
On Fri, Mar 29, 2013 at 09:03:44PM +, Mark Brown wrote: For code clarity after implementing block writes split out the raw and non-raw I/O sync implementations. Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com Reviewed-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com

Re: [PATCH 4/4] regmap: cache: Write consecutive registers in a single block write

2013-03-29 Thread Dimitris Papastamos
which has a register format which can support raw writes will support auto incrementing writes, this decision may need to be revised in future. Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com Reviewed-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com -- To unsubscribe

Re: [PATCH] regmap: Remove __attribute__ ((packed))

2013-03-15 Thread Dimitris Papastamos
On Fri, Mar 15, 2013 at 04:53:51PM +, Mark Brown wrote: > On Fri, Mar 15, 2013 at 11:16:02AM +0000, Dimitris Papastamos wrote: > > > On my system there was no benefit of using it, it just happens > > that the struct is aligned properly and needs no padding. >

[PATCH v3] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-15 Thread Dimitris Papastamos
at the ratio `sizeof(*rbnode) / map->cache_word_size' in order to suitably adjust the block length of each block. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regcache-rbtree.c | 70 ++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --

Re: [PATCH] regmap: Remove __attribute__ ((packed))

2013-03-15 Thread Dimitris Papastamos
On Fri, Mar 15, 2013 at 01:36:40AM +, Mark Brown wrote: > On Thu, Mar 14, 2013 at 03:26:19PM +0000, Dimitris Papastamos wrote: > > There is no point having this. The space gains are trivial if there > > are any at all. > > Applied, but numbers would have been nice an

Re: [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-15 Thread Dimitris Papastamos
On Fri, Mar 15, 2013 at 01:35:34AM +, Mark Brown wrote: > On Thu, Mar 14, 2013 at 02:52:35PM +0000, Dimitris Papastamos wrote: > > > if (rbnode) { > > reg_tmp = (reg - rbnode->base_reg) / map->reg_stride; > > + /* Does this re

Re: [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-15 Thread Dimitris Papastamos
On Fri, Mar 15, 2013 at 01:35:34AM +, Mark Brown wrote: On Thu, Mar 14, 2013 at 02:52:35PM +, Dimitris Papastamos wrote: if (rbnode) { reg_tmp = (reg - rbnode-base_reg) / map-reg_stride; + /* Does this register exist? If not bail out

Re: [PATCH] regmap: Remove __attribute__ ((packed))

2013-03-15 Thread Dimitris Papastamos
On Fri, Mar 15, 2013 at 01:36:40AM +, Mark Brown wrote: On Thu, Mar 14, 2013 at 03:26:19PM +, Dimitris Papastamos wrote: There is no point having this. The space gains are trivial if there are any at all. Applied, but numbers would have been nice and... Change-Id

[PATCH v3] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-15 Thread Dimitris Papastamos
at the ratio `sizeof(*rbnode) / map-cache_word_size' in order to suitably adjust the block length of each block. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regcache-rbtree.c | 70 ++- 1 file changed, 69 insertions(+), 1

Re: [PATCH] regmap: Remove __attribute__ ((packed))

2013-03-15 Thread Dimitris Papastamos
On Fri, Mar 15, 2013 at 04:53:51PM +, Mark Brown wrote: On Fri, Mar 15, 2013 at 11:16:02AM +, Dimitris Papastamos wrote: On my system there was no benefit of using it, it just happens that the struct is aligned properly and needs no padding. OK, so which system

[PATCH] regmap: Remove __attribute__ ((packed))

2013-03-14 Thread Dimitris Papastamos
There is no point having this. The space gains are trivial if there are any at all. Change-Id: Ib4b1320420f780dcf5b9a1e4b05f5805691c4d9f Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regcache-rbtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base

[PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-14 Thread Dimitris Papastamos
at the ratio `sizeof(*rbnode) / map->cache_word_size' in order to suitably adjust the block length of each block. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regcache-rbtree.c | 63 ++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --

[PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-14 Thread Dimitris Papastamos
at the ratio `sizeof(*rbnode) / map-cache_word_size' in order to suitably adjust the block length of each block. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regcache-rbtree.c | 63 ++- 1 file changed, 62 insertions(+), 1

[PATCH] regmap: Remove __attribute__ ((packed))

2013-03-14 Thread Dimitris Papastamos
There is no point having this. The space gains are trivial if there are any at all. Change-Id: Ib4b1320420f780dcf5b9a1e4b05f5805691c4d9f Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regcache-rbtree.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v2] regmap: Expose total memory consumption in the rbtree debugfs entry

2013-03-13 Thread Dimitris Papastamos
On Wed, Mar 13, 2013 at 11:13:26AM +, Mark Brown wrote: > On Tue, Mar 12, 2013 at 05:26:49PM +0000, Dimitris Papastamos wrote: > > Provide a feel of how much overhead the rbtree cache adds to > > the game. > > Applied, with a tweak to the log to say "used X bytes&quo

[PATCH] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-13 Thread Dimitris Papastamos
at the ratio `sizeof(*rbnode) / map->cache_word_size' in order to suitably adjust the block length of each block. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regcache-rbtree.c | 42 +-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --

[PATCH] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-13 Thread Dimitris Papastamos
at the ratio `sizeof(*rbnode) / map-cache_word_size' in order to suitably adjust the block length of each block. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regcache-rbtree.c | 42 +-- 1 file changed, 40 insertions(+), 2

Re: [PATCH v2] regmap: Expose total memory consumption in the rbtree debugfs entry

2013-03-13 Thread Dimitris Papastamos
On Wed, Mar 13, 2013 at 11:13:26AM +, Mark Brown wrote: On Tue, Mar 12, 2013 at 05:26:49PM +, Dimitris Papastamos wrote: Provide a feel of how much overhead the rbtree cache adds to the game. Applied, with a tweak to the log to say used X bytes for clarity (it's arguable

Re: [PATCH v2] regmap: Expose total memory consumption in the rbtree debugfs entry

2013-03-12 Thread Dimitris Papastamos
On Tue, Mar 12, 2013 at 06:12:47PM +, Mark Brown wrote: > On Tue, Mar 12, 2013 at 05:26:49PM +0000, Dimitris Papastamos wrote: > > > + mem_size = sizeof(*rbtree_ctx); > > + > > for (node = rb_first(_ctx->root); node != NULL; > > node = r

[PATCH v2] regmap: Expose total memory consumption in the rbtree debugfs entry

2013-03-12 Thread Dimitris Papastamos
Provide a feel of how much overhead the rbtree cache adds to the game. Signed-off-by: Dimitris Papastamos --- Print the size in bytes instead of kB. drivers/base/regmap/regcache-rbtree.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/base/regmap/regcache

[PATCH v2] regmap: Expose total memory consumption in the rbtree debugfs entry

2013-03-12 Thread Dimitris Papastamos
Provide a feel of how much overhead the rbtree cache adds to the game. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- Print the size in bytes instead of kB. drivers/base/regmap/regcache-rbtree.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v2] regmap: Expose total memory consumption in the rbtree debugfs entry

2013-03-12 Thread Dimitris Papastamos
On Tue, Mar 12, 2013 at 06:12:47PM +, Mark Brown wrote: On Tue, Mar 12, 2013 at 05:26:49PM +, Dimitris Papastamos wrote: + mem_size = sizeof(*rbtree_ctx); + for (node = rb_first(rbtree_ctx-root); node != NULL; node = rb_next(node)) { n = container_of

[PATCH] regmap: Expose total memory consumption in the rbtree debugfs entry

2013-03-11 Thread Dimitris Papastamos
Provide a feel of how much overhead the rbtree cache adds to the game. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regcache-rbtree.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap

[PATCH] regmap: Initialize `map->debugfs' before regcache

2013-03-11 Thread Dimitris Papastamos
In the rbtree code we are exposing statistics relating to the number of nodes/registers of the rbtree cache for each of the devices. Ensure that `map->debugfs' has been initialized before we attempt to initialize the debugfs entry for the rbtree cache. Signed-off-by: Dimitris Papasta

[PATCH] regmap: Initialize `map-debugfs' before regcache

2013-03-11 Thread Dimitris Papastamos
In the rbtree code we are exposing statistics relating to the number of nodes/registers of the rbtree cache for each of the devices. Ensure that `map-debugfs' has been initialized before we attempt to initialize the debugfs entry for the rbtree cache. Signed-off-by: Dimitris Papastamos d

[PATCH] regmap: Expose total memory consumption in the rbtree debugfs entry

2013-03-11 Thread Dimitris Papastamos
Provide a feel of how much overhead the rbtree cache adds to the game. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regcache-rbtree.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/base/regmap/regcache

[PATCH 2/2 v2] regmap: debugfs: Add a registers `range' file

2013-02-20 Thread Dimitris Papastamos
of the `registers' file and the `range' file. Signed-off-by: Dimitris Papastamos --- Hi, Moved the locking of the `debugfs_off_cache' list over to this patch. I think this should be the final version of the patch. drivers/base/regmap/internal.h | 1 + drivers/base/regmap/regmap

[PATCH 1/2 v2] regmap: debugfs: Simplify calculation of `c->max_reg'

2013-02-20 Thread Dimitris Papastamos
We don't need to use any of the file position information to calculate the base and max register of each block. Just use the counter directly. Set `i = base' at the top to avoid GCC flow analysis bugs. The value of `i' can never be undefined or 0 in the if (c) { ... }. Signed-off-by: Dimitris

[PATCH 1/2 v2] regmap: debugfs: Simplify calculation of `c-max_reg'

2013-02-20 Thread Dimitris Papastamos
We don't need to use any of the file position information to calculate the base and max register of each block. Just use the counter directly. Set `i = base' at the top to avoid GCC flow analysis bugs. The value of `i' can never be undefined or 0 in the if (c) { ... }. Signed-off-by: Dimitris

[PATCH 2/2 v2] regmap: debugfs: Add a registers `range' file

2013-02-20 Thread Dimitris Papastamos
of the `registers' file and the `range' file. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- Hi, Moved the locking of the `debugfs_off_cache' list over to this patch. I think this should be the final version of the patch. drivers/base/regmap/internal.h | 1

[PATCH 2/3] regmap: debugfs: Ensure proper locking of `debugfs_off_cache' list

2013-02-14 Thread Dimitris Papastamos
There is a possible race between the read operations of the `registers' file and the `range' file. Close that down by taking the appropriate locks when modifying/accessing the list. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/internal.h | 1 + drivers/base/regmap/regmap

[PATCH 3/3] regmap: debugfs: Add a registers `range' file

2013-02-14 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on whether the block is readable or not. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regmap-debugfs.c | 76 1 file changed, 76 insertions

[PATCH 1/3] regmap: debugfs: Simplify calculation of `c->max_reg'

2013-02-14 Thread Dimitris Papastamos
We don't need to use any of the file position information to calculate the base and max register of each block. Just use the counter directly. Set `i = base' at the top to avoid GCC flow analysis bugs. The value of `i' can never be undefined or 0 in the if (c) { ... }. Signed-off-by: Dimitris

Re: [PATCH 1/2] regmap: debugfs: Add a registers `range' file

2013-02-14 Thread Dimitris Papastamos
On Thu, Feb 14, 2013 at 02:43:06PM +, Mark Brown wrote: > On Thu, Feb 14, 2013 at 12:31:44PM +0000, Dimitris Papastamos wrote: > > > @@ -96,6 +116,7 @@ static unsigned int regmap_debugfs_get_dump_start(struct > > regmap *map, > >

Re: [PATCH 2/2] regmap: debugfs: Ensure proper locking of `debugfs_off_cache' list

2013-02-14 Thread Dimitris Papastamos
On Thu, Feb 14, 2013 at 02:54:17PM +, Mark Brown wrote: > On Thu, Feb 14, 2013 at 12:31:48PM +0000, Dimitris Papastamos wrote: > > > There is a possible race between the read operations of the `registers' > > file and the `range' file. Close that down by taking the appropri

[PATCH v3] regmap: debugfs: Simplify calculation of `c->max_reg'

2013-02-14 Thread Dimitris Papastamos
We don't need to use any of the file position information to calculate the base and max register of each block. Just use the counter directly. The `i = base' at the top to avoid GCC flow analysis bugs. The value of `i' can never be undefined or 0 in the if (c) { ... }. Signed-off-by: Dimitris

Re: [PATCH v2] regmap: debugfs: Simplify calculation of `c->max_reg'

2013-02-14 Thread Dimitris Papastamos
On Thu, Feb 14, 2013 at 02:14:40PM +, Mark Brown wrote: > On Thu, Feb 14, 2013 at 02:04:04PM +0000, Dimitris Papastamos wrote: > > > - unsigned int i, ret; > > + unsigned int i = 0, ret; > > Coding style and are you sure this is a good default. Hm, it doesn't

[PATCH v2] regmap: debugfs: Simplify calculation of `c->max_reg'

2013-02-14 Thread Dimitris Papastamos
without causing an integer wrap-around. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regmap-debugfs.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 78d5f20..d804b74

[PATCH 2/2] regmap: debugfs: Ensure proper locking of `debugfs_off_cache' list

2013-02-14 Thread Dimitris Papastamos
There is a possible race between the read operations of the `registers' file and the `range' file. Close that down by taking the appropriate locks when modifying/accessing the list. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/internal.h | 1 + drivers/base/regmap/regmap

[PATCH 1/2] regmap: debugfs: Add a registers `range' file

2013-02-14 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/internal.h | 1

[PATCH] regmap: debugfs: Simplify calculation of `c->max_reg'

2013-02-14 Thread Dimitris Papastamos
We don't need to use any of the file position information to calculate the base and max register of each block. Just use the counter directly. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regmap-debugfs.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git

[PATCH] regmap: debugfs: Simplify calculation of `c-max_reg'

2013-02-14 Thread Dimitris Papastamos
We don't need to use any of the file position information to calculate the base and max register of each block. Just use the counter directly. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regmap-debugfs.c | 8 ++-- 1 file changed, 2 insertions

[PATCH 1/2] regmap: debugfs: Add a registers `range' file

2013-02-14 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers

[PATCH 2/2] regmap: debugfs: Ensure proper locking of `debugfs_off_cache' list

2013-02-14 Thread Dimitris Papastamos
There is a possible race between the read operations of the `registers' file and the `range' file. Close that down by taking the appropriate locks when modifying/accessing the list. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/internal.h | 1

[PATCH v2] regmap: debugfs: Simplify calculation of `c-max_reg'

2013-02-14 Thread Dimitris Papastamos
without causing an integer wrap-around. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regmap-debugfs.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap

Re: [PATCH v2] regmap: debugfs: Simplify calculation of `c-max_reg'

2013-02-14 Thread Dimitris Papastamos
On Thu, Feb 14, 2013 at 02:14:40PM +, Mark Brown wrote: On Thu, Feb 14, 2013 at 02:04:04PM +, Dimitris Papastamos wrote: - unsigned int i, ret; + unsigned int i = 0, ret; Coding style and are you sure this is a good default. Hm, it doesn't really matter. I guess the proper

[PATCH v3] regmap: debugfs: Simplify calculation of `c-max_reg'

2013-02-14 Thread Dimitris Papastamos
We don't need to use any of the file position information to calculate the base and max register of each block. Just use the counter directly. The `i = base' at the top to avoid GCC flow analysis bugs. The value of `i' can never be undefined or 0 in the if (c) { ... }. Signed-off-by: Dimitris

Re: [PATCH 2/2] regmap: debugfs: Ensure proper locking of `debugfs_off_cache' list

2013-02-14 Thread Dimitris Papastamos
On Thu, Feb 14, 2013 at 02:54:17PM +, Mark Brown wrote: On Thu, Feb 14, 2013 at 12:31:48PM +, Dimitris Papastamos wrote: There is a possible race between the read operations of the `registers' file and the `range' file. Close that down by taking the appropriate locks when

Re: [PATCH 1/2] regmap: debugfs: Add a registers `range' file

2013-02-14 Thread Dimitris Papastamos
On Thu, Feb 14, 2013 at 02:43:06PM +, Mark Brown wrote: On Thu, Feb 14, 2013 at 12:31:44PM +, Dimitris Papastamos wrote: @@ -96,6 +116,7 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map, if (c

[PATCH 1/3] regmap: debugfs: Simplify calculation of `c-max_reg'

2013-02-14 Thread Dimitris Papastamos
We don't need to use any of the file position information to calculate the base and max register of each block. Just use the counter directly. Set `i = base' at the top to avoid GCC flow analysis bugs. The value of `i' can never be undefined or 0 in the if (c) { ... }. Signed-off-by: Dimitris

[PATCH 3/3] regmap: debugfs: Add a registers `range' file

2013-02-14 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on whether the block is readable or not. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regmap-debugfs.c | 76 1

[PATCH 2/3] regmap: debugfs: Ensure proper locking of `debugfs_off_cache' list

2013-02-14 Thread Dimitris Papastamos
There is a possible race between the read operations of the `registers' file and the `range' file. Close that down by taking the appropriate locks when modifying/accessing the list. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/internal.h | 1

[PATCH v2] regmap: debugfs: Add a registers `range' file

2013-02-11 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/internal.h | 1

Re: [PATCH] regmap: debugfs: Add a registers `range' file

2013-02-11 Thread Dimitris Papastamos
On Mon, Feb 11, 2013 at 01:16:41PM +, Mark Brown wrote: > On Mon, Feb 11, 2013 at 10:52:23AM +0000, Dimitris Papastamos wrote: > > > +struct regmap_reg_range { > > + unsigned int start; > > + unsigned int end; > > + unsigned int attr; > > +};

[PATCH] regmap: debugfs: Add a registers `range' file

2013-02-11 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos --- Hi, This is applied on top of commit

[PATCH] regmap: debugfs: Factor out debugfs_tot_len calc into a function

2013-02-11 Thread Dimitris Papastamos
In preparation to support the regmap debugfs ranges functionality factor this code out to a separate function. We'll need to ensure that the value has been correctly calculated from two separate places in the code. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regmap-debugfs.c

[PATCH] regmap: debugfs: Factor out debugfs_tot_len calc into a function

2013-02-11 Thread Dimitris Papastamos
In preparation to support the regmap debugfs ranges functionality factor this code out to a separate function. We'll need to ensure that the value has been correctly calculated from two separate places in the code. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers

[PATCH] regmap: debugfs: Add a registers `range' file

2013-02-11 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- Hi

Re: [PATCH] regmap: debugfs: Add a registers `range' file

2013-02-11 Thread Dimitris Papastamos
On Mon, Feb 11, 2013 at 01:16:41PM +, Mark Brown wrote: On Mon, Feb 11, 2013 at 10:52:23AM +, Dimitris Papastamos wrote: +struct regmap_reg_range { + unsigned int start; + unsigned int end; + unsigned int attr; +}; All we ever do with this struct

[PATCH v2] regmap: debugfs: Add a registers `range' file

2013-02-11 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers

Re: [PATCH v3] regmap: debugfs: Add a registers `range' file

2013-02-08 Thread Dimitris Papastamos
On Fri, Feb 08, 2013 at 11:46:55AM +, Mark Brown wrote: > On Fri, Feb 01, 2013 at 12:05:39PM +0000, Dimitris Papastamos wrote: > > > +struct regmap_reg_range { > > + unsigned int start; > > + unsigned int end; > > + unsigned int attr; > > +}; >

[PATCH 2/2 v2] regmap: debugfs: Optimize seeking within blocks of registers

2013-02-08 Thread Dimitris Papastamos
figure out where to start scanning from. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regmap-debugfs.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 5fa2e6d..8584fac

[PATCH 1/2 v2] regmap: debugfs: Add a `max_reg' member in struct regmap_debugfs_off_cache

2013-02-08 Thread Dimitris Papastamos
-by: Dimitris Papastamos --- drivers/base/regmap/internal.h | 1 + drivers/base/regmap/regmap-debugfs.c | 8 2 files changed, 9 insertions(+) diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index 0ae5b78..5a22bd3 100644 --- a/drivers/base/regmap/internal.h

[PATCH 1/2 v2] regmap: debugfs: Add a `max_reg' member in struct regmap_debugfs_off_cache

2013-02-08 Thread Dimitris Papastamos
-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/internal.h | 1 + drivers/base/regmap/regmap-debugfs.c | 8 2 files changed, 9 insertions(+) diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index 0ae5b78..5a22bd3 100644

[PATCH 2/2 v2] regmap: debugfs: Optimize seeking within blocks of registers

2013-02-08 Thread Dimitris Papastamos
figure out where to start scanning from. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regmap-debugfs.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap

Re: [PATCH v3] regmap: debugfs: Add a registers `range' file

2013-02-08 Thread Dimitris Papastamos
On Fri, Feb 08, 2013 at 11:46:55AM +, Mark Brown wrote: On Fri, Feb 01, 2013 at 12:05:39PM +, Dimitris Papastamos wrote: +struct regmap_reg_range { + unsigned int start; + unsigned int end; + unsigned int attr; +}; + i = start_reg; + while (i = map

[PATCH 2/2] regmap: debugfs: Optimize seeking within blocks of registers

2013-02-07 Thread Dimitris Papastamos
figure out where to start scanning from. Change-Id: I2515e0981ef6b17f784dd0e389d0d4a13d47123c Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regmap-debugfs.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regmap-debugfs.c b

[PATCH 1/2] regmap: debugfs: Add a `max_reg' member in struct regmap_debugfs_off_cache

2013-02-07 Thread Dimitris Papastamos
: I961320c4a56fdd25d74f1a6cc1b470ff22d8dbca Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/internal.h | 1 + drivers/base/regmap/regmap-debugfs.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index ef61b24

[PATCH] regmap: debugfs: Fix reading in register field units

2013-02-07 Thread Dimitris Papastamos
At the moment, if the length of the register field format is N bytes, we can only get anything meaningful back to userspace by providing a buffer that is N + 2 bytes large. Fix this so we that we only need to provide a buffer of N bytes. Signed-off-by: Dimitris Papastamos --- drivers/base

[PATCH] regmap: debugfs: Fix reading in register field units

2013-02-07 Thread Dimitris Papastamos
At the moment, if the length of the register field format is N bytes, we can only get anything meaningful back to userspace by providing a buffer that is N + 2 bytes large. Fix this so we that we only need to provide a buffer of N bytes. Signed-off-by: Dimitris Papastamos d

[PATCH 1/2] regmap: debugfs: Add a `max_reg' member in struct regmap_debugfs_off_cache

2013-02-07 Thread Dimitris Papastamos
: I961320c4a56fdd25d74f1a6cc1b470ff22d8dbca Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/internal.h | 1 + drivers/base/regmap/regmap-debugfs.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/base/regmap/internal.h b/drivers/base

[PATCH 2/2] regmap: debugfs: Optimize seeking within blocks of registers

2013-02-07 Thread Dimitris Papastamos
figure out where to start scanning from. Change-Id: I2515e0981ef6b17f784dd0e389d0d4a13d47123c Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers/base/regmap/regmap-debugfs.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/base

[PATCH v3] regmap: debugfs: Add a registers `range' file

2013-02-01 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos --- Simplified the code a bit, removed

[PATCH v3] regmap: debugfs: Add a registers `range' file

2013-02-01 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- Simplified

[PATCH v2] regmap: debugfs: Add a registers `range' file

2013-01-30 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regmap-debugfs.c | 177

[PATCH] regmap: debugfs: Add a registers `range' file

2013-01-30 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos --- drivers/base/regmap/regmap-debugfs.c | 179

[PATCH] regmap: debugfs: Add a registers `range' file

2013-01-30 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers

[PATCH v2] regmap: debugfs: Add a registers `range' file

2013-01-30 Thread Dimitris Papastamos
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes. Signed-off-by: Dimitris Papastamos d...@opensource.wolfsonmicro.com --- drivers

Re: [PATCH 2/3 v2] firmware: Add /proc/firmware_path entry to list the firmware paths

2012-10-26 Thread Dimitris Papastamos
On Thu, Oct 25, 2012 at 11:48:33AM -0700, Greg Kroah-Hartman wrote: > On Tue, Oct 23, 2012 at 01:52:55PM +0100, Dimitris Papastamos wrote: > > This patch provides the aforementioned procfs file that lists > > the default firmware paths that are used during firmware lookup. &g

Re: [PATCH 2/3 v2] firmware: Add /proc/firmware_path entry to list the firmware paths

2012-10-26 Thread Dimitris Papastamos
On Thu, Oct 25, 2012 at 11:48:33AM -0700, Greg Kroah-Hartman wrote: On Tue, Oct 23, 2012 at 01:52:55PM +0100, Dimitris Papastamos wrote: This patch provides the aforementioned procfs file that lists the default firmware paths that are used during firmware lookup. The file contains

Re: [PATCH 1/3 v2] firmware: Convert firmware path setup from an array to a list

2012-10-23 Thread Dimitris Papastamos
On Tue, Oct 23, 2012 at 09:37:24PM +0800, Ming Lei wrote: > On Tue, Oct 23, 2012 at 9:29 PM, Dimitris Papastamos > wrote: > > > > > Hi sorry for being unclear, I mentioned in the old thread that > > I've not had time to fix this properly (or think about a proper > &

Re: [PATCH 1/3 v2] firmware: Convert firmware path setup from an array to a list

2012-10-23 Thread Dimitris Papastamos
On Tue, Oct 23, 2012 at 09:08:50PM +0800, Ming Lei wrote: > On Tue, Oct 23, 2012 at 8:52 PM, Dimitris Papastamos > wrote: > > In preparation to support dynamic listing/updating of firmware > > paths via procfs, this patch converts the firmware path configuration > >

[PATCH 1/3 v2] firmware: Convert firmware path setup from an array to a list

2012-10-23 Thread Dimitris Papastamos
In preparation to support dynamic listing/updating of firmware paths via procfs, this patch converts the firmware path configuration from an array to a list. Signed-off-by: Dimitris Papastamos --- drivers/base/firmware_class.c | 74 +-- 1 file changed, 65

[PATCH 3/3 v2] firmware: Factor out code to add paths to the firmware path list

2012-10-23 Thread Dimitris Papastamos
Signed-off-by: Dimitris Papastamos --- drivers/base/firmware_class.c | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 322fff3..cf4aa5f 100644 --- a/drivers/base

[PATCH 0/3 v2] Expose firmware paths via procfs

2012-10-23 Thread Dimitris Papastamos
Hi Greg, I've rebased these on top of linux-next as you requested. Dimitris Papastamos (3): firmware: Convert firmware path setup from an array to a list firmware: Add /proc/firmware_path entry to list the firmware paths firmware: Factor out code to add paths to the firmware path list

[PATCH 2/3 v2] firmware: Add /proc/firmware_path entry to list the firmware paths

2012-10-23 Thread Dimitris Papastamos
-off-by: Dimitris Papastamos --- drivers/base/firmware_class.c | 55 +++ 1 file changed, 55 insertions(+) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index d76152b..322fff3 100644 --- a/drivers/base/firmware_class.c +++ b

Re: [PATCH 1/2] firmware: Convert firmware path setup from an array to a list

2012-10-23 Thread Dimitris Papastamos
On Mon, Oct 22, 2012 at 08:42:02AM -0700, Greg Kroah-Hartman wrote: > On Wed, Oct 10, 2012 at 11:56:24AM +0100, Dimitris Papastamos wrote: > > In preparation to support dynamic listing/updating of firmware > > paths via procfs, this patch converts the firmware path configuration &g

Re: [PATCH 1/2] firmware: Convert firmware path setup from an array to a list

2012-10-23 Thread Dimitris Papastamos
On Mon, Oct 22, 2012 at 08:42:02AM -0700, Greg Kroah-Hartman wrote: On Wed, Oct 10, 2012 at 11:56:24AM +0100, Dimitris Papastamos wrote: In preparation to support dynamic listing/updating of firmware paths via procfs, this patch converts the firmware path configuration from an array

  1   2   >