Re: [PATCH 4/6] spi: altera: use regmap instead of direct mmio register access

2020-06-12 Thread Xu Yilun
On Fri, Jun 12, 2020 at 12:52:02PM +0100, Mark Brown wrote: > On Fri, Jun 12, 2020 at 12:43:46PM +0800, Xu Yilun wrote: > > > So we think of creating regmap to abstract the actually register accessing > > detail. The parent device driver creates the regmap of indirect access, > > and it creates th

Re: [PATCH 4/6] spi: altera: use regmap instead of direct mmio register access

2020-06-12 Thread Mark Brown
On Fri, Jun 12, 2020 at 12:43:46PM +0800, Xu Yilun wrote: > So we think of creating regmap to abstract the actually register accessing > detail. The parent device driver creates the regmap of indirect access, > and it creates the spi-altera platform device as child. Spi-altera > driver could just

Re: [PATCH 4/6] spi: altera: use regmap instead of direct mmio register access

2020-06-11 Thread Xu Yilun
On Thu, Jun 11, 2020 at 12:02:11PM +0100, Mark Brown wrote: > On Thu, Jun 11, 2020 at 11:25:09AM +0800, Xu Yilun wrote: > > > + if (pdata && pdata->use_parent_regmap) { > > + hw->regmap = dev_get_regmap(pdev->dev.parent, NULL); > > + if (!hw->regmap) { > > +

Re: [PATCH 4/6] spi: altera: use regmap instead of direct mmio register access

2020-06-11 Thread Mark Brown
On Thu, Jun 11, 2020 at 11:25:09AM +0800, Xu Yilun wrote: > + if (pdata && pdata->use_parent_regmap) { > + hw->regmap = dev_get_regmap(pdev->dev.parent, NULL); > + if (!hw->regmap) { > + dev_err(&pdev->dev, "get regmap failed\n"); > +

[PATCH 4/6] spi: altera: use regmap instead of direct mmio register access

2020-06-10 Thread Xu Yilun
This patch adds support for regmap. It allows this driver to be compatible if low layer register access method is changed in some cases. Signed-off-by: Matthew Gerlach Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Signed-off-by: Russ Weight --- drivers/spi/Kconfig| 1 + drivers/spi/