Message ID | 20200215065826.739102-1-gch981213@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | rewrite mtk-quadspi spi-nor driver with spi-mem | expand |
On Sat, Feb 15, 2020 at 02:58:24PM +0800, Chuanhong Guo wrote: > To keep patchset small for easier reviewing, there will be 3 patchsets > including this one. > 1. add the new driver, which is this patchset. > 2. update existing dts for the new driver: > spi-max-frequency is missing in current mtk-quadspi binding. Old > driver parses child node manually so it doesn't need this, but > new spi-mem driver is probed via spi subsystem which requires the > presence of spi-max-frequency. Since this doesn't break old driver > support, I'll send this separately as a standalone patch. This is an ABI break so you shouldn't be doing this, if the existing binding works it should continue to work. > 3. removing the old driver. I'll create this commit after 1 and 2 are > applied to avoid possible rebasing due to any changes in the old > driver. This isn't great as it means we have a period with two drivers for the same thing in tree which is at best going to be confusing. There's no advantage to splitting this out.
Hi! On Tue, Feb 18, 2020 at 8:55 PM Mark Brown <broonie@kernel.org> wrote: > This is an ABI break so you shouldn't be doing this, if the existing > binding works it should continue to work. The missing spi-max-frequency is the only part preventing old device tree to work with this driver. If the goal is to make existing dt binding work, I could patch dt using of_add_property in v2. I saw similar device tree patching for legacy bindings in pinctrl-single driver. > > > 3. removing the old driver. I'll create this commit after 1 and 2 are > > applied to avoid possible rebasing due to any changes in the old > > driver. > > This isn't great as it means we have a period with two drivers for the > same thing in tree which is at best going to be confusing. There's no > advantage to splitting this out. Got it. I'll add this patch in v2. -- Regards, Chuanhong Guo
On Thu, Feb 20, 2020 at 07:58:06AM +0800, Chuanhong Guo wrote: > On Tue, Feb 18, 2020 at 8:55 PM Mark Brown <broonie@kernel.org> wrote: > > This is an ABI break so you shouldn't be doing this, if the existing > > binding works it should continue to work. > The missing spi-max-frequency is the only part preventing old > device tree to work with this driver. > If the goal is to make existing dt binding work, I could patch dt using > of_add_property in v2. I saw similar device tree patching for legacy > bindings in pinctrl-single driver. That's fine I think, so long as old DTs continue to work.
On Thu, Feb 20, 2020 at 07:58:06AM +0800, Chuanhong Guo wrote: > Hi! > > On Tue, Feb 18, 2020 at 8:55 PM Mark Brown <broonie@kernel.org> wrote: > > This is an ABI break so you shouldn't be doing this, if the existing > > binding works it should continue to work. > > The missing spi-max-frequency is the only part preventing old > device tree to work with this driver. > If the goal is to make existing dt binding work, I could patch dt using > of_add_property in v2. I saw similar device tree patching for legacy > bindings in pinctrl-single driver. You should should really only need 'spi-max-frequency' if the max freq is less than the minimum of the host and device max freq. Rob
Hi! On Wed, Feb 26, 2020 at 1:31 AM Rob Herring <robh@kernel.org> wrote: > > On Thu, Feb 20, 2020 at 07:58:06AM +0800, Chuanhong Guo wrote: > > Hi! > > > > On Tue, Feb 18, 2020 at 8:55 PM Mark Brown <broonie@kernel.org> wrote: > > > This is an ABI break so you shouldn't be doing this, if the existing > > > binding works it should continue to work. > > > > The missing spi-max-frequency is the only part preventing old > > device tree to work with this driver. > > If the goal is to make existing dt binding work, I could patch dt using > > of_add_property in v2. I saw similar device tree patching for legacy > > bindings in pinctrl-single driver. I just noticed that of_add_property isn't a exported symbol, which means that device tree patching isn't possible unless driver is builtin. > > You should should really only need 'spi-max-frequency' if the max freq > is less than the minimum of the host and device max freq. But current spi framework forces that a "spi-max-frequency" property is present. [0] Should we patch spi framework then? [0] https://elixir.bootlin.com/linux/latest/source/drivers/spi/spi.c#L1951
On Wed, Feb 26, 2020 at 09:31:33AM +0800, Chuanhong Guo wrote: > On Wed, Feb 26, 2020 at 1:31 AM Rob Herring <robh@kernel.org> wrote: > > You should should really only need 'spi-max-frequency' if the max freq > > is less than the minimum of the host and device max freq. > But current spi framework forces that a "spi-max-frequency" property > is present. [0] > Should we patch spi framework then? That's one option, yes. As far as I can tell the bindings have always required an explicit frequency specified in the bindings but I've no idea why.