[PATCH v3 2/3] nvmem: lan9662-otp: add support for LAN969x
Claudiu Beznea
claudiu.beznea at tuxon.dev
Sat May 16 09:27:08 PDT 2026
Hi, Robert,
> static int lan9662_otp_probe(struct platform_device *pdev)
> @@ -196,6 +194,7 @@ static int lan9662_otp_probe(struct platform_device *pdev)
>
> otp_config.priv = otp;
> otp_config.dev = dev;
> + otp_config.size = (uintptr_t) device_get_match_data(dev);
>
> nvmem = devm_nvmem_register(dev, &otp_config);
>
> @@ -203,7 +202,14 @@ static int lan9662_otp_probe(struct platform_device *pdev)
> }
>
> static const struct of_device_id lan9662_otp_match[] = {
> - { .compatible = "microchip,lan9662-otpc", },
> + {
> + .compatible = "microchip,lan9662-otpc",
> + .data = (const void *) SZ_8K,
> + },
> + {
> + .compatible = "microchip,lan9691-otpc",
> + .data = (const void *) SZ_16K,
> + },
Some checks from checkpatch:
[Checkpatch] CHECK: No space is necessary after a cast
#51: FILE: drivers/nvmem/lan9662-otpc.c:197:
+ otp_config.size = (uintptr_t) device_get_match_data(dev);
CHECK: No space is necessary after a cast
#62: FILE: drivers/nvmem/lan9662-otpc.c:207:
+ .data = (const void *) SZ_8K,
CHECK: No space is necessary after a cast
#66: FILE: drivers/nvmem/lan9662-otpc.c:211:
+ .data = (const void *) SZ_16K,
total: 0 errors, 0 warnings, 3 checks, 44 lines checked
More information about the linux-arm-kernel
mailing list