On Tue, Sep 27, 2022 at 07:57:05PM +0800, Yang Yingliang wrote: > 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() ? Honestly I don't think there's room for (or a need for) improvement here. Thanks, Lukas