Re: [PATCH -next 1/2] spi: introduce devm_spi_alloc_controller()

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

 



Hi Mark,

On 2022/9/27 19:21, Mark Brown wrote:
On Tue, Sep 27, 2022 at 05:45:25AM +0200, Lukas Wunner wrote:
On Mon, Sep 26, 2022 at 10:29:32PM +0800, Yang Yingliang wrote:
  extern int devm_spi_register_controller(struct device *dev,
  					struct spi_controller *ctlr);
This doesn't really make sense I'm afraid.  The umbrella term
"spi_controller" can refer to either a master or a slave.
One has to specify on allocation which of the two is desired.
An API which purports to allow allocation of the umbrella term
but defaults to a master behind the scenes seems misleading to me.
Yes, we'd need to either have two wrappers using some more appropriate
terminology than master/slave or have a parameter which specifies the
role.
Do you mean to introduce two more proper wrappers to instead of devm_spi_alloc_master/slave() ?

Thanks,
Yang



[Index of Archives]     [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