linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: freddy.hsin@mediatek.com, sre@kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	wim@linux-watchdog.org, matthias.bgg@gmail.com,
	linux-watchdog@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, robh+dt@kernel.org,
	mark.rutland@arm.com, devicetree@vger.kernel.org
Cc: Chang-An.Chen@mediatek.com, wsd_upstream@mediatek.com
Subject: Re: [PATCH v1 2/4] watchdog: populate reboot mode node in toprgu node of MTK RGU (Reset Generation Unit)
Date: Tue, 26 Nov 2019 04:18:41 -0800	[thread overview]
Message-ID: <ca66e52e-df80-388e-3018-7bf35aef5f43@roeck-us.net> (raw)
In-Reply-To: <1574746490-625-3-git-send-email-freddy.hsin@mediatek.com>

On 11/25/19 9:34 PM, freddy.hsin@mediatek.com wrote:
> From: Freddy Hsin <freddy.hsin@mediatek.com>
> 
> of_platform_population should be added in the probe function of
> toprgu driver, or the reboot mode driver will not be probed
> 
> Signed-off-by: Freddy Hsin <freddy.hsin@mediatek.com>
> ---
>   drivers/watchdog/mtk_wdt.c |    3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
> index 9c3d003..2fb2614 100644
> --- a/drivers/watchdog/mtk_wdt.c
> +++ b/drivers/watchdog/mtk_wdt.c
> @@ -20,6 +20,7 @@
>   #include <linux/types.h>
>   #include <linux/watchdog.h>
>   #include <linux/delay.h>
> +#include <linux/of_platform.h>
>   
>   #define WDT_MAX_TIMEOUT		31
>   #define WDT_MIN_TIMEOUT		1
> @@ -167,6 +168,8 @@ static int mtk_wdt_probe(struct platform_device *pdev)
>   	if (IS_ERR(mtk_wdt->wdt_base))
>   		return PTR_ERR(mtk_wdt->wdt_base);
>   
> +	of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
> +

This seems just wrong. Such a driver should not be a child of the watchdog driver.

Guenter

>   	mtk_wdt->wdt_dev.info = &mtk_wdt_info;
>   	mtk_wdt->wdt_dev.ops = &mtk_wdt_ops;
>   	mtk_wdt->wdt_dev.timeout = WDT_MAX_TIMEOUT;
> 


  reply	other threads:[~2019-11-26 12:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26  5:34 [PATCH v1 0/4] Support MTK reboot mode driver freddy.hsin
2019-11-26  5:34 ` [PATCH v1 1/4] power: reset: add " freddy.hsin
2019-11-26  5:34 ` [PATCH v1 2/4] watchdog: populate reboot mode node in toprgu node of MTK RGU (Reset Generation Unit) freddy.hsin
2019-11-26 12:18   ` Guenter Roeck [this message]
2019-11-26  5:34 ` [PATCH v1 3/4] soc: mediatek: add reboot-mode header freddy.hsin
2019-11-26  5:34 ` [PATCH v1 4/4] dt-binding: power: reset: Add documentation for MTK RGU (Reset Gernation Unit) reboot driver freddy.hsin
2019-12-05 19:08   ` Rob Herring

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=ca66e52e-df80-388e-3018-7bf35aef5f43@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Chang-An.Chen@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=freddy.hsin@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    --cc=wim@linux-watchdog.org \
    --cc=wsd_upstream@mediatek.com \
    /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;
as well as URLs for NNTP newsgroup(s).