Message ID | 20230818075600.24277-5-biju.das.jz@bp.renesas.com (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | OF/ACPI/ID Match table improvements for ak8975 driver | expand |
On Fri, Aug 18, 2023 at 08:55:59AM +0100, Biju Das wrote: > Drop deprecated enums from OF table as corresponding entries > are removed from bindings and it also saves memory. You can't do this. Only sorting by "prefixed first" criteria is possible.
Hi Andy Shevchenko, > Subject: Re: [PATCH v2 4/5] iio: magnetometer: ak8975: Drop deprecated > enums from OF table > > On Fri, Aug 18, 2023 at 08:55:59AM +0100, Biju Das wrote: > > Drop deprecated enums from OF table as corresponding entries are > > removed from bindings and it also saves memory. > > You can't do this. > > Only sorting by "prefixed first" criteria is possible. The rule applies only for fallback compatible. I checked bindings and I don't find any fallback compatibles. All compatibles are just enums. Am I missing anything here?? Cheers, Biju
On Fri, Aug 18, 2023 at 11:40:37AM +0000, Biju Das wrote: > Hi Andy Shevchenko, > > > Subject: Re: [PATCH v2 4/5] iio: magnetometer: ak8975: Drop deprecated > > enums from OF table > > > > On Fri, Aug 18, 2023 at 08:55:59AM +0100, Biju Das wrote: > > > Drop deprecated enums from OF table as corresponding entries are > > > removed from bindings and it also saves memory. > > > > You can't do this. > > > > Only sorting by "prefixed first" criteria is possible. > > The rule applies only for fallback compatible. I checked bindings and I don't > find any fallback compatibles. All compatibles are just enums. Am I missing > anything here?? Yes. As per above patch. The _whole_ world is not under your / our control. NAK to this change, sorry.
Hi Andy Shevchenko, > Subject: Re: [PATCH v2 4/5] iio: magnetometer: ak8975: Drop deprecated > enums from OF table > > On Fri, Aug 18, 2023 at 11:40:37AM +0000, Biju Das wrote: > > Hi Andy Shevchenko, > > > > > Subject: Re: [PATCH v2 4/5] iio: magnetometer: ak8975: Drop > > > deprecated enums from OF table > > > > > > On Fri, Aug 18, 2023 at 08:55:59AM +0100, Biju Das wrote: > > > > Drop deprecated enums from OF table as corresponding entries are > > > > removed from bindings and it also saves memory. > > > > > > You can't do this. > > > > > > Only sorting by "prefixed first" criteria is possible. > > > > The rule applies only for fallback compatible. I checked bindings and > > I don't find any fallback compatibles. All compatibles are just enums. > > Am I missing anything here?? > > Yes. As per above patch. The _whole_ world is not under your / our control. > NAK to this change, sorry. + device tree All drivers that uses OF table and device tree must be based on the device tree documentation on the tree. I agree the _whole_ world is not under your / our control. But we support whatever available on the kernel tree right? why do we care those not in the tree? Cheers, Biju
Hi Andy, CC devicetree On Fri, Aug 18, 2023 at 5:03 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > On Fri, Aug 18, 2023 at 11:40:37AM +0000, Biju Das wrote: > > > Subject: Re: [PATCH v2 4/5] iio: magnetometer: ak8975: Drop deprecated > > > enums from OF table > > > > > > On Fri, Aug 18, 2023 at 08:55:59AM +0100, Biju Das wrote: > > > > Drop deprecated enums from OF table as corresponding entries are > > > > removed from bindings and it also saves memory. > > > > > > You can't do this. > > > > > > Only sorting by "prefixed first" criteria is possible. > > > > The rule applies only for fallback compatible. I checked bindings and I don't > > find any fallback compatibles. All compatibles are just enums. Am I missing > > anything here?? > > Yes. As per above patch. The _whole_ world is not under your / our control. > NAK to this change, sorry. The single user ever in the upstream kernel was fixed in commit 9846210b1ec9bbaa ("ARM: tegra: seaboard: add missing DT vendor prefixes") in v3.8 back in 2012. And it had to be fixed again 9 years later in commit fa0fdb78cb5d4cde ("ARM: dts: am335x: Use correct vendor prefix for Asahi Kasei Corp."). There may be other out-of-tree users, which would be broken by this change. Typically we wait a few years between deprecating a compatible value and removing support from the driver. As Biju is only deprecating these compatible values in PATCH 3/5 of his series, this may be a bit premature. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
On Fri, 18 Aug 2023 17:17:44 +0200 Geert Uytterhoeven <geert@linux-m68k.org> wrote: > Hi Andy, > > CC devicetree > > On Fri, Aug 18, 2023 at 5:03 PM Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > On Fri, Aug 18, 2023 at 11:40:37AM +0000, Biju Das wrote: > > > > Subject: Re: [PATCH v2 4/5] iio: magnetometer: ak8975: Drop deprecated > > > > enums from OF table > > > > > > > > On Fri, Aug 18, 2023 at 08:55:59AM +0100, Biju Das wrote: > > > > > Drop deprecated enums from OF table as corresponding entries are > > > > > removed from bindings and it also saves memory. > > > > > > > > You can't do this. > > > > > > > > Only sorting by "prefixed first" criteria is possible. > > > > > > The rule applies only for fallback compatible. I checked bindings and I don't > > > find any fallback compatibles. All compatibles are just enums. Am I missing > > > anything here?? > > > > Yes. As per above patch. The _whole_ world is not under your / our control. > > NAK to this change, sorry. > > The single user ever in the upstream kernel was fixed in commit > 9846210b1ec9bbaa ("ARM: tegra: seaboard: add missing DT vendor > prefixes") in v3.8 back in 2012. > And it had to be fixed again 9 years later in commit fa0fdb78cb5d4cde > ("ARM: dts: am335x: Use correct vendor prefix for Asahi Kasei Corp."). > > There may be other out-of-tree users, which would be broken by this > change. Typically we wait a few years between deprecating a compatible > value and removing support from the driver. > > As Biju is only deprecating these compatible values in PATCH 3/5 of > his series, this may be a bit premature. Absolutely. I'd go a bit further. Unless there is a maintenance reason to remove these (after a few years from removal in the binding doc) then we never remove them as it can only hurt users. Jonathan > > Gr{oetje,eeting}s, > > Geert > > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
On Mon, Aug 28, 2023 at 9:22 AM Jonathan Cameron <jic23@kernel.org> wrote: > > On Fri, 18 Aug 2023 17:17:44 +0200 > Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > > Hi Andy, > > > > CC devicetree > > > > On Fri, Aug 18, 2023 at 5:03 PM Andy Shevchenko > > <andriy.shevchenko@linux.intel.com> wrote: > > > On Fri, Aug 18, 2023 at 11:40:37AM +0000, Biju Das wrote: > > > > > Subject: Re: [PATCH v2 4/5] iio: magnetometer: ak8975: Drop deprecated > > > > > enums from OF table > > > > > > > > > > On Fri, Aug 18, 2023 at 08:55:59AM +0100, Biju Das wrote: > > > > > > Drop deprecated enums from OF table as corresponding entries are > > > > > > removed from bindings and it also saves memory. > > > > > > > > > > You can't do this. > > > > > > > > > > Only sorting by "prefixed first" criteria is possible. > > > > > > > > The rule applies only for fallback compatible. I checked bindings and I don't > > > > find any fallback compatibles. All compatibles are just enums. Am I missing > > > > anything here?? > > > > > > Yes. As per above patch. The _whole_ world is not under your / our control. > > > NAK to this change, sorry. > > > > The single user ever in the upstream kernel was fixed in commit > > 9846210b1ec9bbaa ("ARM: tegra: seaboard: add missing DT vendor > > prefixes") in v3.8 back in 2012. > > And it had to be fixed again 9 years later in commit fa0fdb78cb5d4cde > > ("ARM: dts: am335x: Use correct vendor prefix for Asahi Kasei Corp."). > > > > There may be other out-of-tree users, which would be broken by this > > change. Typically we wait a few years between deprecating a compatible > > value and removing support from the driver. > > > > As Biju is only deprecating these compatible values in PATCH 3/5 of > > his series, this may be a bit premature. > Absolutely. I'd go a bit further. > Unless there is a maintenance reason to remove these (after a few years from > removal in the binding doc) then we never remove them as it can only hurt users. I'm tracking undocumented compatibles (with 'make dt_compatible_check') in the kernel tree. Dropping the binding makes these undocumented (and now showing up in my diff between Linus and next). So please apply both or none. Rob
On Fri, 6 Oct 2023 09:58:34 -0500 Rob Herring <robh@kernel.org> wrote: > On Mon, Aug 28, 2023 at 9:22 AM Jonathan Cameron <jic23@kernel.org> wrote: > > > > On Fri, 18 Aug 2023 17:17:44 +0200 > > Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > > > > Hi Andy, > > > > > > CC devicetree > > > > > > On Fri, Aug 18, 2023 at 5:03 PM Andy Shevchenko > > > <andriy.shevchenko@linux.intel.com> wrote: > > > > On Fri, Aug 18, 2023 at 11:40:37AM +0000, Biju Das wrote: > > > > > > Subject: Re: [PATCH v2 4/5] iio: magnetometer: ak8975: Drop deprecated > > > > > > enums from OF table > > > > > > > > > > > > On Fri, Aug 18, 2023 at 08:55:59AM +0100, Biju Das wrote: > > > > > > > Drop deprecated enums from OF table as corresponding entries are > > > > > > > removed from bindings and it also saves memory. > > > > > > > > > > > > You can't do this. > > > > > > > > > > > > Only sorting by "prefixed first" criteria is possible. > > > > > > > > > > The rule applies only for fallback compatible. I checked bindings and I don't > > > > > find any fallback compatibles. All compatibles are just enums. Am I missing > > > > > anything here?? > > > > > > > > Yes. As per above patch. The _whole_ world is not under your / our control. > > > > NAK to this change, sorry. > > > > > > The single user ever in the upstream kernel was fixed in commit > > > 9846210b1ec9bbaa ("ARM: tegra: seaboard: add missing DT vendor > > > prefixes") in v3.8 back in 2012. > > > And it had to be fixed again 9 years later in commit fa0fdb78cb5d4cde > > > ("ARM: dts: am335x: Use correct vendor prefix for Asahi Kasei Corp."). > > > > > > There may be other out-of-tree users, which would be broken by this > > > change. Typically we wait a few years between deprecating a compatible > > > value and removing support from the driver. > > > > > > As Biju is only deprecating these compatible values in PATCH 3/5 of > > > his series, this may be a bit premature. > > Absolutely. I'd go a bit further. > > Unless there is a maintenance reason to remove these (after a few years from > > removal in the binding doc) then we never remove them as it can only hurt users. > > I'm tracking undocumented compatibles (with 'make > dt_compatible_check') in the kernel tree. Dropping the binding makes > these undocumented (and now showing up in my diff between Linus and > next). So please apply both or none. > > Rob Given I have some merges in the togreg tree and it's at least in theory non rebasing, I'll revert patch 3 from this series rather than dropping it. Thanks for letting me know. Jonathan
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index 8cfceb007936..295b7be5e36d 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -1074,15 +1074,10 @@ MODULE_DEVICE_TABLE(i2c, ak8975_id); static const struct of_device_id ak8975_of_match[] = { { .compatible = "asahi-kasei,ak8975", .data = &ak_def_array[AK8975] }, - { .compatible = "ak8975", .data = &ak_def_array[AK8975] }, { .compatible = "asahi-kasei,ak8963", .data = &ak_def_array[AK8963] }, - { .compatible = "ak8963", .data = &ak_def_array[AK8963] }, { .compatible = "asahi-kasei,ak09911", .data = &ak_def_array[AK09911] }, - { .compatible = "ak09911", .data = &ak_def_array[AK09911] }, { .compatible = "asahi-kasei,ak09912", .data = &ak_def_array[AK09912] }, - { .compatible = "ak09912", .data = &ak_def_array[AK09912] }, { .compatible = "asahi-kasei,ak09916", .data = &ak_def_array[AK09916] }, - { .compatible = "ak09916", .data = &ak_def_array[AK09916] }, {} }; MODULE_DEVICE_TABLE(of, ak8975_of_match);
Drop deprecated enums from OF table as corresponding entries are removed from bindings and it also saves memory. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> --- v2: * New patch --- drivers/iio/magnetometer/ak8975.c | 5 ----- 1 file changed, 5 deletions(-)