Messages in this thread | | | Date | Fri, 26 Aug 2022 09:43:03 +0300 | Subject | Re: [PATCH v2 2/2] nvmem: lan9662-otp: add support. | From | Krzysztof Kozlowski <> |
| |
On 25/08/2022 23:40, Horatiu Vultur wrote: > +static int lan9662_otp_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct nvmem_device *nvmem; > + struct lan9662_otp *otp; > + > + otp = devm_kzalloc(&pdev->dev, sizeof(*otp), GFP_KERNEL); > + if (!otp) > + return -ENOMEM; > + > + otp->dev = dev; > + otp->base = devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(otp->base)) > + return PTR_ERR(otp->base); > + > + otp_config.priv = otp; > + otp_config.dev = dev; > + > + nvmem = devm_nvmem_register(dev, &otp_config); > + > + return PTR_ERR_OR_ZERO(nvmem); > +} > + > +static const struct of_device_id lan9662_otp_match[] = { > + { .compatible = "microchip,lan9662-otp", }, > + { .compatible = "microchip,lan9668-otp", },
Why do you need two compatibles here? Your bindings are saying only one is needed...
Best regards, Krzysztof
| |