From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Franklin S Cooper Jr <fcooper@ti.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
netdev@vger.kernel.org, linux-can@vger.kernel.org,
wg@grandegger.com, mkl@pengutronix.de, robh+dt@kernel.org,
quentin.schulz@free-electrons.com
Subject: Re: [PATCH 1/3] can: m_can: Make hclk optional
Date: Thu, 20 Jul 2017 12:42:33 +0300 [thread overview]
Message-ID: <11cb765b-d69a-d7d5-b1e4-b55200764e63@cogentembedded.com> (raw)
In-Reply-To: <20170719230926.10872-2-fcooper@ti.com>
Hello!
On 7/20/2017 2:09 AM, Franklin S Cooper Jr wrote:
> Hclk is the MCAN's interface clock. However, for OMAP based devices such as
> DRA7 SoC family the interface clock is handled by hwmod. Therefore, this
> interface clock is managed by hwmod driver via pm_runtime_get and
> pm_runtime_put calls. Therefore, this interface clock isn't defined in DT
> and thus the driver shouldn't fail if this clock isn't found.
>
> Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
> ---
> drivers/net/can/m_can/m_can.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> index f4947a7..7fe9145 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -1568,8 +1568,13 @@ static int m_can_plat_probe(struct platform_device *pdev)
> hclk = devm_clk_get(&pdev->dev, "hclk");
> cclk = devm_clk_get(&pdev->dev, "cclk");
>
> - if (IS_ERR(hclk) || IS_ERR(cclk)) {
> - dev_err(&pdev->dev, "no clock found\n");
> + if (IS_ERR(hclk)) {
> + dev_warn(&pdev->dev, "can't find hclk\n");
> + hclk = 0;
s/0/NULL/.
[...]
MBR, Sergei
next prev parent reply other threads:[~2017-07-20 9:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 23:09 [PATCH 0/3] can: m_can: Add PM Runtime Support Franklin S Cooper Jr
[not found] ` <20170719230926.10872-1-fcooper-l0cyMroinI0@public.gmane.org>
2017-07-19 23:09 ` [PATCH 1/3] can: m_can: Make hclk optional Franklin S Cooper Jr
2017-07-20 9:42 ` Sergei Shtylyov [this message]
2017-07-19 23:09 ` [PATCH 2/3] can: m_can: Update documentation to indicate that hclk may be optional Franklin S Cooper Jr
2017-07-24 19:20 ` Rob Herring
2017-07-19 23:09 ` [PATCH 3/3] can: m_can: Add PM Runtime Franklin S Cooper Jr
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=11cb765b-d69a-d7d5-b1e4-b55200764e63@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=devicetree@vger.kernel.org \
--cc=fcooper@ti.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=quentin.schulz@free-electrons.com \
--cc=robh+dt@kernel.org \
--cc=wg@grandegger.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).