[PATCH v7 2/2] watchdog: mtk_wdt: mt8183: Add reset controller

Philipp Zabel p.zabel at pengutronix.de
Thu Jan 2 03:56:45 PST 2020


On Fri, 2019-12-27 at 17:04 +0800, Jiaxin Yu wrote:
> Add reset controller API in watchdog driver.
> Besides watchdog, MTK toprgu module alsa provide sub-system (eg, audio,
> camera, codec and connectivity) software reset functionality.
> 
> Signed-off-by: yong.liang <yong.liang at mediatek.com>
> Signed-off-by: Jiaxin Yu <jiaxin.yu at mediatek.com>
> Reviewed-by: Yingjoe Chen <yingjoe.chen at mediatek.com>
> ---
>  drivers/watchdog/mtk_wdt.c | 105 ++++++++++++++++++++++++++++++++++++-
>  1 file changed, 104 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
> index 9c3d0033260d..c1bc19ab628e 100644
> --- a/drivers/watchdog/mtk_wdt.c
> +++ b/drivers/watchdog/mtk_wdt.c
[...]
> @@ -155,6 +248,7 @@ static int mtk_wdt_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct mtk_wdt_dev *mtk_wdt;
> +	struct mtk_wdt_data *wdt_data;
>  	int err;
>  
>  	mtk_wdt = devm_kzalloc(dev, sizeof(*mtk_wdt), GFP_KERNEL);
> @@ -190,6 +284,13 @@ static int mtk_wdt_probe(struct platform_device *pdev)
>  	dev_info(dev, "Watchdog enabled (timeout=%d sec, nowayout=%d)\n",
>  		 mtk_wdt->wdt_dev.timeout, nowayout);
>  
> +	wdt_data = (struct mtk_wdt_data *)of_device_get_match_data(dev);

The cast is not necessary, otherwise

Reviewed-by: Philipp Zabel <p.zabel at pengutronix.de>

regards
Philipp




More information about the linux-arm-kernel mailing list