Re: [RESEND PATCH v16 mfd 1/8] mfd: ocelot: add helper to get regmap from a resource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 05 Sep 2022, Colin Foster wrote:

> Several ocelot-related modules are designed for MMIO / regmaps. As such,
> they often use a combination of devm_platform_get_and_ioremap_resource()
> and devm_regmap_init_mmio().
> 
> Operating in an MFD might be different, in that it could be memory mapped,
> or it could be SPI, I2C... In these cases a fallback to use IORESOURCE_REG
> instead of IORESOURCE_MEM becomes necessary.
> 
> When this happens, there's redundant logic that needs to be implemented in
> every driver. In order to avoid this redundancy, utilize a single function
> that, if the MFD scenario is enabled, will perform this fallback logic.
> 
> Signed-off-by: Colin Foster <colin.foster@xxxxxxxxxxxxxxxx>
> Reviewed-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> ---
> v16
>     * Add Andy Reviewed-by tag
> 
> v15
>     * Add missed errno.h and ioport.h includes
>     * Add () to function references in both the commit log and comments
> 
> v14
>     * Add header guard
>     * Change regs type from u32* to void*
>     * Add Reviewed-by tag
> 
> ---
>  MAINTAINERS                |  5 +++
>  include/linux/mfd/ocelot.h | 62 ++++++++++++++++++++++++++++++++++++++
>  2 files changed, 67 insertions(+)
>  create mode 100644 include/linux/mfd/ocelot.h

Applied, thanks.

-- 
Lee Jones [李琼斯]



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux