Re: [PATCH net-next v2 3/3] net: dsa: microchip: replace unclear KSZ8830 strings
From: Pieter
Date: Mon Sep 02 2024 - 06:15:02 EST
Hi Arun,
> > From: Pieter Van Trappen <pieter.van.trappen@xxxxxxx>
> >
> > Replace uppercase KSZ8830 with KSZ8863
>
> Since KSZ8863/73 sharing same chip id, replacing KSZ8830 with KSZ8863
> is somewhat confusing. Can you elaborate here. I believe, it should
> KSZ88X3_CHIP_ID.
I'm afraid there's no perfect solution here, it's the only chip here
that can't be differentiated by its chip id I believe.
The reason I didn't go for KSZ88X3_CHIP_ID is that the enum requires a
constant as well so `0x88x3` won't work and I wanted to avoid the
following because it would be the only definition where the name and
constant would not match:
--- a/include/linux/platform_data/microchip-ksz.h
+++ b/include/linux/platform_data/microchip-ksz.h
@@ -27,7 +27,7 @@ enum ksz_chip_id {
KSZ8795_CHIP_ID = 0x8795,
KSZ8794_CHIP_ID = 0x8794,
KSZ8765_CHIP_ID = 0x8765,
- KSZ8830_CHIP_ID = 0x8830,
+ KSZ88X3_CHIP_ID = 0x8863,
KSZ8864_CHIP_ID = 0x8864,
KSZ8895_CHIP_ID = 0x8895
Technically it's possible of course, which one has your preference?
Cheers, Pieter