Re: [RESEND PATCH v16 mfd 8/8] mfd: ocelot: add support for the vsc7512 chip via spi
From: Lee Jones
Date: Thu Sep 08 2022 - 05:44:46 EST
On Mon, 05 Sep 2022, Colin Foster wrote:
> The VSC7512 is a networking chip that contains several peripherals. Many of
> these peripherals are currently supported by the VSC7513 and VSC7514 chips,
> but those run on an internal CPU. The VSC7512 lacks this CPU, and must be
> controlled externally.
>
> Utilize the existing drivers by referencing the chip as an MFD. Add support
> for the two MDIO buses, the internal phys, pinctrl, and serial GPIO.
>
> Signed-off-by: Colin Foster <colin.foster@xxxxxxxxxxxxxxxx>
> Reviewed-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
> ---
>
> v16
> * Includes fixups:
> * ocelot-core.c add includes device.h, export.h, iopoll.h, ioport,h
> * ocelot-spi.c add includes device.h, err.h, errno.h, export.h,
> mod_devicetable.h, types.h
> * Move kconfig.h from ocelot-spi.c to ocelot.h
> * Remove unnecessary byteorder.h
> * Utilize resource_size() function
>
> v15
> * Add missed include bits.h
> * Clean _SIZE macros to make them all the same width (e.g. 0x004)
> * Remove unnecessary ret = ...; return ret; calls
> * Utilize spi_message_init_with_transfers() instead of
> spi_message_add_tail() calls in the bus_read routine
> * Utilize HZ_PER_MHZ from units.h instead of a magic number
> * Remove unnecessary err < 0 checks
> * Fix typos in comments
>
> v14
> * Add Reviewed tag
> * Copyright ranges are now "2021-2022"
> * 100-char width applied instead of 80
> * Remove invalid dev_err_probe return
> * Remove "spi" and "dev" elements from ocelot_ddata struct.
> Since "dev" is available throughout, determine "ddata" and "spi" from
> there instead of keeping separate references.
> * Add header guard in drivers/mfd/ocelot.h
> * Document ocelot_ddata struct
>
> ---
> MAINTAINERS | 1 +
> drivers/mfd/Kconfig | 21 +++
> drivers/mfd/Makefile | 3 +
> drivers/mfd/ocelot-core.c | 161 ++++++++++++++++++++
> drivers/mfd/ocelot-spi.c | 299 ++++++++++++++++++++++++++++++++++++++
> drivers/mfd/ocelot.h | 49 +++++++
> 6 files changed, 534 insertions(+)
> create mode 100644 drivers/mfd/ocelot-core.c
> create mode 100644 drivers/mfd/ocelot-spi.c
> create mode 100644 drivers/mfd/ocelot.h
Applied, thanks.
--
Lee Jones [李琼斯]