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


Groups > linux.kernel > #1330860

[PATCH 0/6][RFC] cleanup regmap write functions

From Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Newsgroups linux.kernel
Subject [PATCH 0/6][RFC] cleanup regmap write functions
Date 2016-02-10 03:50 +0100
Message-ID <r0t0S-4sE-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Mark

Current regmap has many similar functions
        regmap_update_bits()
        regmap_update_bits_async()
        regmap_update_bits_check()
        regmap_update_bits_check_async()
But difference is very few.
And I would like to have _force_ feature on it.
So, these patches add new regmap_raw_update_bits()
which has _check, _async, _force option.
Above functions are now defined as macro.
4), 5) adds _force_ feature. We can easily add _check, _async.

I used [RFC], because regmap has many effect.

BTW, I noticed #if - #else - #endif on ${LINUX}/include/linux/regmap.h are strange.
Many functions/struct/macro are defined under #ifdef CONFIG_REGMAP,
but few are defined under #else. It can be trouble ?
Do we really need this #if ?

Kuninori Morimoto (7):
      1) regmap: add regmap_raw_update_bits() and merge all regmap_update_bits_xxx()
      2) regmap: regmap_field_xxx() uses regmap_raw_update_bits()
      3) regmap: regmap_fields_xxx() uses regmap_raw_update_bits()
      4) regmap: add regmap_field_force_xxx() functions
      5) regmap: add regmap_fields_force_xxx() functions
      6) regmpa: remove regmap_write_bits()
      7) ASoC: rsnd: rsnd_write() / rsnd_bset() uses regmap _force_ function

 drivers/base/regmap/regmap.c | 191 +++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------
 include/linux/regmap.h       | 102 ++++++++++++++++++++++++++++++----------------------------------------
 sound/soc/sh/rcar/gen.c      |  21 ++-------------
 sound/soc/sh/rcar/rsnd.h     |   2 --
 4 files changed, 88 insertions(+), 228 deletions(-)


Best regards
---
Kuninori Morimoto

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


Thread

[PATCH 0/6][RFC] cleanup regmap write functions Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> - 2016-02-10 03:50 +0100
  Re: [PATCH 1/7][RFC] regmap: add regmap_raw_update_bits() and merge  all regmap_update_bits_xxx() Mark Brown <broonie@kernel.org> - 2016-02-10 10:40 +0100

csiph-web