Re: [PATCH v3 3/4] spi: Patch Macronix SPI controller driver according to MX25F0A MFD driver

From: Mark Brown
Date: Wed May 01 2019 - 22:41:47 EST


On Tue, Apr 30, 2019 at 06:23:21PM +0800, masonccyang@xxxxxxxxxxx wrote:

> > It'd be much better to describe what the above actually means - what
> > changes have been made in the introduction of the MFD driver? It does
> > feel like there's not as much abstraction as I'd expect between the MFD
> > and the child, there's a lot of peering into the parent and enabling and
> > disabling individual clocks for example rather than either having this
> > hidden behind a function or just having the clocks owned by the child
> > driver.

> Do you mean I should remove ps_clk/send_clk/send_dly_clk resource from MFD

> and patch them to spi-mxic.c ?

> Or any other ?

I think you need to have a clear idea that you can explain as to what
the MFD is and how it's split up. What's being abstracted, what's not
and why. Without knowing anything about the device or what the series
is trying to accomplish it's hard to be sure exactly what the best thing
to do is.

> The driver also isn't using the MFD interfaces to pass through
> > the register subblocks for the IP - instead the child driver is peering
> > straight into the MFD structure and looking at a variable in there.

> Patch regmap for mfd, nand and spi ?
> or any other patches is needed ?

This is a memory mapped device so there should be no need to use regmap
unless you want to. The MFD subsystem has facilities for passing
through memory regions to subdevices.

Attachment: signature.asc
Description: PGP signature