[PATCHv9 01/43] clk: Add support for regmap register read/write

Tomasz Figa tomasz.figa at gmail.com
Sat Nov 2 09:26:53 EDT 2013


Hi Tero,

On Friday 25 of October 2013 18:56:55 Tero Kristo wrote:
> Previously, only direct register read/write was supported. Now a
> per-clock regmap can be provided for same purpose, which allows the
> clock drivers to access clock registers behind e.g. I2C bus.
> 
> Signed-off-by: Tero Kristo <t-kristo at ti.com>
> ---
>  drivers/clk/clk-divider.c    |    6 +++---
>  drivers/clk/clk-gate.c       |    6 +++---
>  drivers/clk/clk-mux.c        |    6 +++---
>  include/linux/clk-provider.h |   23 +++++++++++++++++++----
>  4 files changed, 28 insertions(+), 13 deletions(-)

The idea itself sounds not bad, but patch description fails to specify 
what is the need for this. I mean, if you know that this will have some 
actual users, it is nice to specify them.

Also IMHO the variant with clk_reg_ops (but with regmap used) would look a 
bit better in terms of readability and extensibility, but I'm leaving this 
completely to Mike's decision.

(OR maybe you could migrate this fully to regmap, which can do MMIO 
accesses as well, without the need of having separate code paths for both 
in clock code?)

Best regards,
Tomasz




More information about the linux-arm-kernel mailing list