From: "Marek Behún" <kabel@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>,
Arnd Bergmann <arnd@arndb.de>,
soc@kernel.org, arm@kernel.org, Andy Shevchenko <andy@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
linux-watchdog@vger.kernel.org,
Wim Van Sebroeck <wim@linux-watchdog.org>
Subject: Re: [PATCH v3 5/7] platform: cznic: turris-omnia-mcu: Add support for MCU watchdog
Date: Mon, 23 Oct 2023 16:59:59 +0200 [thread overview]
Message-ID: <20231023165959.104f6843@dellmb> (raw)
In-Reply-To: <2439af40-0c78-6b41-1746-c71b67af217a@roeck-us.net>
On Mon, 23 Oct 2023 07:47:44 -0700
Guenter Roeck <linux@roeck-us.net> wrote:
> On 10/23/23 07:31, Marek Behún wrote:
> > Add support for the watchdog mechanism provided by the MCU.
> >
> > Signed-off-by: Marek Behún <kabel@kernel.org>
>
> Any reason for keeping this out of drivers/watchdog ?
Because this whole thing is compiled as one driver, turris-omnia-mcu.ko.
The whole driver is specific for one device, the Turris Omnia router.
Splitting it into separate modules would be unnecessary, the driver is
meant to provide all the Turris Omnia MCU functionality.
I've seen this done in various platform drivers.
Moreover, all of the functionality lives at one I2C address, so only
one I2C client is used.
Originally it was one .c file, but I split it into 4 files to make it
easier to review.
You can look at the other patches at
https://patchwork.kernel.org/project/linux-soc/list/?series=795666
> > + if (!(mcu->features & FEAT_WDT_PING))
> > + return 0;
> > +
>
> Why check this here and not in the calling code ?
No particular reason, just wanted to keep the calling code cleaner.
> > @@ -36,6 +37,9 @@ struct omnia_mcu {
> > struct rtc_device *rtcdev;
> > u32 rtc_alarm;
> > bool front_button_poweron;
> > +
> > + /* MCU watchdog */
> > + struct watchdog_device wdt;
>
> This should be internal to the watchdog driver.
As explained above, all functionality is provided in one kernel module.
This makes sense here since the driver is meant to provide all
MCU functionality and it is specific for Turris Omnia.
Marek
next prev parent reply other threads:[~2023-10-23 15:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 14:31 [PATCH v3 0/7] Turris Omnia MCU driver Marek Behún
2023-10-23 14:31 ` [PATCH v3 1/7] dt-bindings: arm: add cznic,turris-omnia-mcu binding Marek Behún
2023-10-23 14:31 ` [PATCH v3 2/7] platform: cznic: Add preliminary support for Turris Omnia MCU Marek Behún
2023-10-23 14:31 ` [PATCH v3 3/7] platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs Marek Behún
2023-10-23 20:04 ` Andy Shevchenko
2023-10-26 16:14 ` Marek Behún
2023-10-23 14:31 ` [PATCH v3 4/7] platform: cznic: turris-omnia-mcu: Add support for poweroff and wakeup Marek Behún
2023-10-23 19:40 ` Andy Shevchenko
2023-10-26 16:16 ` Marek Behún
2023-10-23 14:31 ` [PATCH v3 5/7] platform: cznic: turris-omnia-mcu: Add support for MCU watchdog Marek Behún
2023-10-23 14:47 ` Guenter Roeck
2023-10-23 14:59 ` Marek Behún [this message]
2023-10-23 15:03 ` Mark Brown
2023-10-23 15:09 ` Marek Behún
2023-10-23 14:31 ` [PATCH v3 6/7] ARM: dts: turris-omnia: Add MCU system-controller node Marek Behún
2023-10-23 14:31 ` [PATCH v3 7/7] ARM: dts: turris-omnia: Add GPIO key node for front button Marek Behún
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231023165959.104f6843@dellmb \
--to=kabel@kernel.org \
--cc=andy@kernel.org \
--cc=arm@kernel.org \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=gregory.clement@bootlin.com \
--cc=linus.walleij@linaro.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=soc@kernel.org \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox