mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 00/11] net: dsa: ksz9477: use regmap to add I2C support next to SPI
Date: Thu, 12 Jan 2023 15:58:04 +0100	[thread overview]
Message-ID: <20230112145804.GX24755@pengutronix.de> (raw)
In-Reply-To: <20230111132956.1153359-1-a.fatoum@pengutronix.de>

On Wed, Jan 11, 2023 at 02:29:45PM +0100, Ahmad Fatoum wrote:
> The Linux DSA driver supports both I2C and SPI as management interface
> by using regmaps as abstraction. barebox regmaps were not quite that
> powerful yet, so we rework our regmaps to support optional formatting
> and then use that to make the KSZ driver work with either I2C or SPI
> transports.
> 
> This series has been tested with both an I2C-connected KSZ8563 and
> a SPI-connected KSZ9563, both of which are supported by the barebox
> KSZ9477 driver.
> 
> v1 -> v2:
>   - Use cdev access size encoded in flags to arrive at correct
>     regmap to use (md -b / md -w works correctly now)
>   - Changed regmap_init_multi prototype to not take an array
>   - Added option for 64bit regmap in regmap_init_multi
>   - Have regmap_init return -ENOSYS if formatted regmap support
>     is needed, but is not compiled in (previously it crashed).
> 
> Ahmad Fatoum (11):
>   regmap: consolidate reg/val format into regmap_format
>   regmap: support formatted read and write
>   regmap: port regmap_init_spi
>   regmap: factor out regmap cdev size calculation
>   net: dsa: ksz9477: switch to regmap_init_spi
>   net: dsa: ksz9477: create regmap cdev for switch registers
>   drivers: base: regmap: introduce REGMAP_I2C
>   dev: add dev_bus_is_spi/i2c helpers
>   net: dsa: ksz9477: refactor to prepare i2c support
>   regmap: i2c: use formatted I/O
>   net: ksz9477: add I2C support

Applied, thanks

Sascha

> 
>  drivers/base/Kconfig               |   2 +
>  drivers/base/regmap/Kconfig        |  14 +
>  drivers/base/regmap/Makefile       |   5 +-
>  drivers/base/regmap/internal.h     |  35 +-
>  drivers/base/regmap/regmap-fmt.c   | 574 +++++++++++++++++++++++++++++
>  drivers/base/regmap/regmap-i2c.c   |  50 ++-
>  drivers/base/regmap/regmap-multi.c | 104 ++++++
>  drivers/base/regmap/regmap-spi.c   |  42 +++
>  drivers/base/regmap/regmap.c       |  66 +++-
>  drivers/mfd/Kconfig                |   4 +
>  drivers/net/Kconfig                |   4 +-
>  drivers/net/ksz9477.c              | 190 +++-------
>  drivers/net/ksz_common.h           | 154 ++++++++
>  drivers/rtc/Kconfig                |   1 +
>  drivers/video/ssd1307fb.c          |   4 +-
>  include/i2c/i2c.h                  |   5 +
>  include/regmap.h                   |  82 +++++
>  include/spi/spi.h                  |   5 +
>  18 files changed, 1166 insertions(+), 175 deletions(-)
>  create mode 100644 drivers/base/regmap/Kconfig
>  create mode 100644 drivers/base/regmap/regmap-fmt.c
>  create mode 100644 drivers/base/regmap/regmap-multi.c
>  create mode 100644 drivers/base/regmap/regmap-spi.c
>  create mode 100644 drivers/net/ksz_common.h
> 
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2023-01-12 14:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 13:29 Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 01/11] regmap: consolidate reg/val format into regmap_format Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 02/11] regmap: support formatted read and write Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 03/11] regmap: port regmap_init_spi Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 04/11] regmap: factor out regmap cdev size calculation Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 05/11] net: dsa: ksz9477: switch to regmap_init_spi Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 06/11] net: dsa: ksz9477: create regmap cdev for switch registers Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 07/11] drivers: base: regmap: introduce REGMAP_I2C Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 08/11] dev: add dev_bus_is_spi/i2c helpers Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 09/11] net: dsa: ksz9477: refactor to prepare i2c support Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 10/11] regmap: i2c: use formatted I/O Ahmad Fatoum
2023-01-11 13:29 ` [PATCH v2 11/11] net: ksz9477: add I2C support Ahmad Fatoum
2023-01-12 14:58 ` Sascha Hauer [this message]

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=20230112145804.GX24755@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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