lkml.org 
[lkml]   [2022]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2 2/2] nvmem: lan9662-otp: add support.
    From
    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

    \
     
     \ /
      Last update: 2022-08-26 08:43    [W:3.184 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site