From: Aisheng Dong <aisheng.dong@nxp.com> To: Guenter Roeck <linux@roeck-us.net>, Anson Huang <anson.huang@nxp.com>, "catalin.marinas@arm.com" <catalin.marinas@arm.com>, "will.deacon@arm.com" <will.deacon@arm.com>, "shawnguo@kernel.org" <shawnguo@kernel.org>, "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>, "kernel@pengutronix.de" <kernel@pengutronix.de>, "festevam@gmail.com" <festevam@gmail.com>, "wim@linux-watchdog.org" <wim@linux-watchdog.org>, Andy Gross <andy.gross@linaro.org>, "heiko@sntech.de" <heiko@sntech.de>, "horms+renesas@verge.net.au" <horms+renesas@verge.net.au>, "arnd@arndb.de" <arnd@arndb.de>, "maxime.ripard@bootlin.com" <maxime.ripard@bootlin.com>, "jagan@amarulasolutions.com" <jagan@amarulasolutions.com>, "bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>, "enric.balletbo@collabora.com" <enric.balletbo@collabora.com>, "marc.w.gonzalez@free.fr" <marc.w.gonzalez@free.fr>, "olof@lixom.net" <olof@lixom.net>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org> Cc: dl-linux-imx <linux-imx@nxp.com> Subject: RE: [PATCH V7 3/3] firmware: imx: imx-scu: register build-in child devices Date: Thu, 7 Mar 2019 12:26:47 +0000 [thread overview] Message-ID: <AM0PR04MB421143FF6BAC09F364D748E5804C0@AM0PR04MB4211.eurprd04.prod.outlook.com> (raw) In-Reply-To: <90ff94d9-6f15-5353-c5a1-f2ec5ee744ad@roeck-us.net> [...] > > diff --git a/drivers/firmware/imx/imx-scu.c > > b/drivers/firmware/imx/imx-scu.c index 2bb1a19..df75ead 100644 > > --- a/drivers/firmware/imx/imx-scu.c > > +++ b/drivers/firmware/imx/imx-scu.c ... > > + /* register SCU child devices which are NOT in device tree */ > > + child_pdev = platform_device_register_data(dev, "imx-sc-wdt", > > + PLATFORM_DEVID_NONE, NULL, 0); > > + if (IS_ERR(child_pdev)) > > + dev_warn(dev, "failed to register scu watchdog device %ld!\n", > > + PTR_ERR(child_pdev)); > > + > > I just realized ... since this is not a devm_ function, we now also need error > handling (if devm_of_platform_populate() fails) and a remove function. > Sorry for that - I should have noticed earlier. > It looks strange to me that instantiate the watchdog device in SCU driver which actually does not use SCU. For me, it's actually a watchdog provided by ATF firmware, not SCU. I explained this to Rob in another mail. Let's see Rob's comments on it. If Rob agrees, we can move watchdog node out of SCU and also do not need instantiate it in SCU driver. Regards Dong Aisheng > Guenter > > > return devm_of_platform_populate(dev); > > } > > > >
WARNING: multiple messages have this Message-ID (diff)
From: Aisheng Dong <aisheng.dong@nxp.com> To: Guenter Roeck <linux@roeck-us.net>, Anson Huang <anson.huang@nxp.com>, "catalin.marinas@arm.com" <catalin.marinas@arm.com>, "will.deacon@arm.com" <will.deacon@arm.com>, "shawnguo@kernel.org" <shawnguo@kernel.org>, "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>, "kernel@pengutronix.de" <kernel@pengutronix.de>, "festevam@gmail.com" <festevam@gmail.com>, "wim@linux-watchdog.org" <wim@linux-watchdog.org>, Andy Gross <andy.gross@linaro.org>, "heiko@sntech.de" <heiko@sntech.de>, "horms+renesas@verge.net.au" <horms+renesas@verge.net.au>, "arnd@arndb.de" <arnd@arndb.de>, "maxime.ripard@bootlin.com" <maxime.ripard@bootlin.com>, "jagan@amarulasolutions.com" <jagan@amarulasolutions.com>, "bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>, "enric.balletbo@collabora.com" <enric.balletbo@collabora.com>, "marc.w.gonzalez@free.fr" <marc.w.gonzalez@free.fr>, "olof@lixom.net" <olof@lixom.net>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org> Cc: dl-linux-imx <linux-imx@nxp.com> Subject: RE: [PATCH V7 3/3] firmware: imx: imx-scu: register build-in child devices Date: Thu, 7 Mar 2019 12:26:47 +0000 [thread overview] Message-ID: <AM0PR04MB421143FF6BAC09F364D748E5804C0@AM0PR04MB4211.eurprd04.prod.outlook.com> (raw) In-Reply-To: <90ff94d9-6f15-5353-c5a1-f2ec5ee744ad@roeck-us.net> [...] > > diff --git a/drivers/firmware/imx/imx-scu.c > > b/drivers/firmware/imx/imx-scu.c index 2bb1a19..df75ead 100644 > > --- a/drivers/firmware/imx/imx-scu.c > > +++ b/drivers/firmware/imx/imx-scu.c ... > > + /* register SCU child devices which are NOT in device tree */ > > + child_pdev = platform_device_register_data(dev, "imx-sc-wdt", > > + PLATFORM_DEVID_NONE, NULL, 0); > > + if (IS_ERR(child_pdev)) > > + dev_warn(dev, "failed to register scu watchdog device %ld!\n", > > + PTR_ERR(child_pdev)); > > + > > I just realized ... since this is not a devm_ function, we now also need error > handling (if devm_of_platform_populate() fails) and a remove function. > Sorry for that - I should have noticed earlier. > It looks strange to me that instantiate the watchdog device in SCU driver which actually does not use SCU. For me, it's actually a watchdog provided by ATF firmware, not SCU. I explained this to Rob in another mail. Let's see Rob's comments on it. If Rob agrees, we can move watchdog node out of SCU and also do not need instantiate it in SCU driver. Regards Dong Aisheng > Guenter > > > return devm_of_platform_populate(dev); > > } > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-03-07 12:27 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-06 1:06 [PATCH V7 1/3] watchdog: imx_sc: Add i.MX system controller watchdog support Anson Huang 2019-03-06 1:06 ` Anson Huang 2019-03-06 1:06 ` [PATCH V7 2/3] arm64: defconfig: add support for i.MX system controller watchdog Anson Huang 2019-03-06 1:06 ` Anson Huang 2019-03-06 16:06 ` Guenter Roeck 2019-03-06 16:06 ` Guenter Roeck 2019-03-06 1:06 ` [PATCH V7 3/3] firmware: imx: imx-scu: register build-in child devices Anson Huang 2019-03-06 1:06 ` Anson Huang 2019-03-06 16:05 ` Guenter Roeck 2019-03-06 16:05 ` Guenter Roeck 2019-03-07 0:46 ` Anson Huang 2019-03-07 0:46 ` Anson Huang 2019-03-07 12:26 ` Aisheng Dong [this message] 2019-03-07 12:26 ` Aisheng Dong 2019-03-06 16:06 ` [PATCH V7 1/3] watchdog: imx_sc: Add i.MX system controller watchdog support Guenter Roeck 2019-03-06 16:06 ` Guenter Roeck 2019-03-07 13:33 ` Aisheng Dong 2019-03-07 13:33 ` Aisheng Dong 2019-03-07 13:56 ` Anson Huang 2019-03-07 13:56 ` Anson Huang 2019-03-07 13:59 ` Aisheng Dong 2019-03-07 13:59 ` Aisheng Dong 2019-03-07 14:13 ` Anson Huang 2019-03-07 14:13 ` Anson Huang 2019-03-08 2:25 ` Aisheng Dong 2019-03-08 2:25 ` Aisheng Dong
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=AM0PR04MB421143FF6BAC09F364D748E5804C0@AM0PR04MB4211.eurprd04.prod.outlook.com \ --to=aisheng.dong@nxp.com \ --cc=andy.gross@linaro.org \ --cc=anson.huang@nxp.com \ --cc=arnd@arndb.de \ --cc=bjorn.andersson@linaro.org \ --cc=catalin.marinas@arm.com \ --cc=enric.balletbo@collabora.com \ --cc=festevam@gmail.com \ --cc=heiko@sntech.de \ --cc=horms+renesas@verge.net.au \ --cc=jagan@amarulasolutions.com \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-watchdog@vger.kernel.org \ --cc=linux@roeck-us.net \ --cc=marc.w.gonzalez@free.fr \ --cc=maxime.ripard@bootlin.com \ --cc=olof@lixom.net \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.org \ --cc=will.deacon@arm.com \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.