[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOoeyxUthDO8wo5fbMuNyJBd-YKD9TrCE5Lr3ve=Z+rndm6X5g@mail.gmail.com>
Date: Wed, 12 Feb 2025 10:27:33 +0800
From: Ming Yu <a0282524688@...il.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: tmyu0@...oton.com, lee@...nel.org, linus.walleij@...aro.org, brgl@...ev.pl,
andi.shyti@...nel.org, mkl@...gutronix.de, mailhol.vincent@...adoo.fr,
andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, wim@...ux-watchdog.org,
linux@...ck-us.net, jdelvare@...e.com, alexandre.belloni@...tlin.com,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-i2c@...r.kernel.org, linux-can@...r.kernel.org, netdev@...r.kernel.org,
linux-watchdog@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-rtc@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH v7 5/7] watchdog: Add Nuvoton NCT6694 WDT support
Dear Christophe,
Thank you for reviewing,
Christophe JAILLET <christophe.jaillet@...adoo.fr> 於 2025年2月8日 週六 上午4:30寫道:
>
> Le 07/02/2025 à 08:45, Ming Yu a écrit :
> > This driver supports Watchdog timer functionality for NCT6694 MFD
> > device based on USB interface.
>
> ...
>
> > +static int nct6694_wdt_probe(struct platform_device *pdev)
> > +{
> > + const struct mfd_cell *cell = mfd_get_cell(pdev);
> > + struct device *dev = &pdev->dev;
> > + struct nct6694 *nct6694 = dev_get_drvdata(pdev->dev.parent);
> > + struct nct6694_wdt_data *data;
> > + struct watchdog_device *wdev;
> > +
> > + data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> > + if (!data)
> > + return -ENOMEM;
> > +
> > + data->msg = devm_kzalloc(dev, sizeof(union nct6694_wdt_msg),
> > + GFP_KERNEL);
> > + if (!data->msg)
> > + return -ENOMEM;
> > +
> > + data->dev = dev;
> > + data->nct6694 = nct6694;
> > + data->wdev_idx = cell->id;
> > +
> > + wdev = &data->wdev;
> > + wdev->info = &nct6694_wdt_info;
> > + wdev->ops = &nct6694_wdt_ops;
> > + wdev->timeout = timeout;
> > + wdev->pretimeout = pretimeout;
> > + if (timeout < pretimeout) {
> > + dev_warn(data->dev, "pretimeout < timeout. Setting to zero\n");
> > + wdev->pretimeout = 0;
> > + }
> > +
> > + wdev->min_timeout = 1;
> > + wdev->max_timeout = 255;
> > +
> > + devm_mutex_init(dev, &data->lock);
>
> Error handling?
> (also apply for patch 1/7 and 6/7)
>
I will add error handling for these in the next patch.
Best regards,
Ming
Powered by blists - more mailing lists