public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Pratyush Yadav <p.yadav@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 0/9] regmap: Add managed API, regmap fields, regmap config
Date: Wed, 30 Sep 2020 19:28:42 +0530	[thread overview]
Message-ID: <20200930135840.v74gxkm353olf6wt@ti.com> (raw)
In-Reply-To: <20200924043418.5355-1-p.yadav@ti.com>

On 24/09/20 10:04AM, Pratyush Yadav wrote:
> Hi,
> 
> This series is a re-spin of Jean-Jacques' earlier effort [0], the goal
> of which was to facilitate porting drivers from the Linux kernel. It
> adds the managed API, using the same API as Linux. It also adds support
> for regmap fields.
> 
> Jean-Jacques' series added support for custom regmap read/write
> callbacks. The design was argued against by Simon [1]. He argued that
> using the driver model was a better idea instead of the custom
> functions. That would mean slightly more memory usage and a more
> involved change.
> 
> The main aim of adding the custom functions is to support the Cadence
> Sierra PHY driver from Linux [2]. The driver's custom functions aren't
> very complicated, so they can be replaced by some simple formatting
> options. So, add the struct regmap_config which contains fields to alter
> the behaviour of the regmap. This includes specifying the size of the
> read/write operations via 'width', specifying the start and size of
> range from code instead of device tree via 'r_start' and 'r_size', and
> specifying a left shift of the register offset before access via
> 'reg_offset_shift'. The driver can't be ported verbatim now, but this
> allows the changes to be very isolated and minimal.
> 
> These config options allow us to avoid converting to driver model until
> we really need it.
> 
> The Travis CI run can be found at [3].
> 
> [0] https://patchwork.ozlabs.org/project/uboot/cover/20191105114700.24989-1-jjhiblot at ti.com/
> [1] https://patchwork.ozlabs.org/comment/2426186/
> [2] https://elixir.bootlin.com/linux/latest/source/drivers/phy/cadence/phy-cadence-sierra.c
> [3] https://travis-ci.org/github/prati0100/uboot/builds/729588518

Ping.

Tom, do you have any comments? If not can you please pick this series 
up?

> 
> Changes in v3 (also mentioned in individual patches):
> - Allow multi-digit index in in_tree(). Fixes test failures in
>   test/bind.py
> 
> - s/DM_TESTF/UT_TESTF/g
> 
> - Fix merge conflicts in test.dts
> 
> - Rebase on latest master.
> 
> Changes in v2:
> - Add comments explaining the need for regmap_field.
> 
> - Set regmap->width to a default of REGMAP_SIZE_32 in regmap_alloc() to
>   avoid the checks in regmap_{read,write}().
> 
> - Use calloc() instead of using malloc() and memset() to initialize a
>   regmap to zero.
> 
> - Update comments on regmap_{read,write}() and
>   regmap_raw_{read,write}().
> 
> - Drop comments explaining two non-existent fields in struct reg_field.
> 
> - Add a comment with example explaining REG_FIELD().
> 
> - Add Simon's Reviewed-by trailers.
> 
> Jean-Jacques Hiblot (3):
>   regmap: Add devm_regmap_init()
>   regmap: Add support for regmap fields
>   test: dm: Add tests for regmap managed API and regmap fields
> 
> Pratyush Yadav (6):
>   regmap: zero out the regmap on allocation
>   regmap: Allow specifying read/write width
>   regmap: Allow left shifting register offset before access
>   regmap: Add regmap_init_mem_range()
>   regmap: Allow devices to specify regmap range start and size in config
>   test/py: allow multi-digit index in in_tree()
> 
>  arch/sandbox/dts/test.dts  |  13 +++
>  drivers/core/regmap.c      | 163 ++++++++++++++++++++++++++++-
>  include/regmap.h           | 205 ++++++++++++++++++++++++++++++++++---
>  test/dm/regmap.c           | 198 +++++++++++++++++++++++++++++++++++
>  test/py/tests/test_bind.py |   2 +-
>  5 files changed, 563 insertions(+), 18 deletions(-)
> 
> --
> 2.28.0
> 

-- 
Regards,
Pratyush Yadav
Texas Instruments India

  parent reply	other threads:[~2020-09-30 13:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  4:34 [PATCH v3 0/9] regmap: Add managed API, regmap fields, regmap config Pratyush Yadav
2020-09-24  4:34 ` [PATCH v3 1/9] regmap: Add devm_regmap_init() Pratyush Yadav
2020-10-01 14:08   ` Tom Rini
2020-09-24  4:34 ` [PATCH v3 2/9] regmap: zero out the regmap on allocation Pratyush Yadav
2020-10-01 14:08   ` Tom Rini
2020-09-24  4:34 ` [PATCH v3 3/9] regmap: Allow specifying read/write width Pratyush Yadav
2020-10-01 14:08   ` Tom Rini
2020-09-24  4:34 ` [PATCH v3 4/9] regmap: Allow left shifting register offset before access Pratyush Yadav
2020-10-01 14:08   ` Tom Rini
2020-09-24  4:34 ` [PATCH v3 5/9] regmap: Add regmap_init_mem_range() Pratyush Yadav
2020-10-01 14:08   ` Tom Rini
2020-09-24  4:34 ` [PATCH v3 6/9] regmap: Allow devices to specify regmap range start and size in config Pratyush Yadav
2020-10-01 14:08   ` Tom Rini
2020-09-24  4:34 ` [PATCH v3 7/9] regmap: Add support for regmap fields Pratyush Yadav
2020-10-01 14:08   ` Tom Rini
2020-09-24  4:34 ` [PATCH v3 8/9] test/py: allow multi-digit index in in_tree() Pratyush Yadav
2020-10-01 14:09   ` Tom Rini
2020-09-24  4:34 ` [PATCH v3 9/9] test: dm: Add tests for regmap managed API and regmap fields Pratyush Yadav
2020-10-01 14:09   ` Tom Rini
2020-09-30 13:58 ` Pratyush Yadav [this message]
2020-09-30 15:25   ` [PATCH v3 0/9] regmap: Add managed API, regmap fields, regmap config Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200930135840.v74gxkm353olf6wt@ti.com \
    --to=p.yadav@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox