From: Simon Horman <horms+renesas@verge.net.au> To: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> Subject: [PATCH v2 2/2] spi: sh-hspi: Do not specifically request shyway_clk clock Date: Fri, 14 Mar 2014 07:55:39 +0000 [thread overview] Message-ID: <1394783739-29168-3-git-send-email-horms+renesas@verge.net.au> (raw) In-Reply-To: <1394783739-29168-1-git-send-email-horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> Rather than requesting the shyway_clk call clk_get with the device and a NULL con_id. This is in keeping with the way that clk_get() is called on other drivers used by Renesas Gen 1 SoCs. And I believe it is compatible with supplying clocks via DT, unlike the current code. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> -- It appears to me that the two uses of this driver are the r8a7778 and r8a7779 SoCs. The r8a7779 already clocks setup to allow this driver to continue to work with this change applied. The r8a7778 has clocks incorrectly setup to allow this driver to continue to work with this change applied. This problem is addressed in "ARM: shmobile: r8a7779: Use clks as MSTP007 parent" which is thus a pre-requisite of this patch. v2 * Update changelog --- drivers/spi/spi-sh-hspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c index 82d2f92..e975892 100644 --- a/drivers/spi/spi-sh-hspi.c +++ b/drivers/spi/spi-sh-hspi.c @@ -274,9 +274,9 @@ static int hspi_probe(struct platform_device *pdev) return -ENOMEM; } - clk = clk_get(NULL, "shyway_clk"); + clk = clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) { - dev_err(&pdev->dev, "shyway_clk is required\n"); + dev_err(&pdev->dev, "couldn't get clock\n"); ret = -EINVAL; goto error0; } -- 1.8.5.2
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> To: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> Subject: [PATCH v2 2/2] spi: sh-hspi: Do not specifically request shyway_clk clock Date: Fri, 14 Mar 2014 16:55:39 +0900 [thread overview] Message-ID: <1394783739-29168-3-git-send-email-horms+renesas@verge.net.au> (raw) In-Reply-To: <1394783739-29168-1-git-send-email-horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> Rather than requesting the shyway_clk call clk_get with the device and a NULL con_id. This is in keeping with the way that clk_get() is called on other drivers used by Renesas Gen 1 SoCs. And I believe it is compatible with supplying clocks via DT, unlike the current code. Signed-off-by: Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> -- It appears to me that the two uses of this driver are the r8a7778 and r8a7779 SoCs. The r8a7779 already clocks setup to allow this driver to continue to work with this change applied. The r8a7778 has clocks incorrectly setup to allow this driver to continue to work with this change applied. This problem is addressed in "ARM: shmobile: r8a7779: Use clks as MSTP007 parent" which is thus a pre-requisite of this patch. v2 * Update changelog --- drivers/spi/spi-sh-hspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c index 82d2f92..e975892 100644 --- a/drivers/spi/spi-sh-hspi.c +++ b/drivers/spi/spi-sh-hspi.c @@ -274,9 +274,9 @@ static int hspi_probe(struct platform_device *pdev) return -ENOMEM; } - clk = clk_get(NULL, "shyway_clk"); + clk = clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) { - dev_err(&pdev->dev, "shyway_clk is required\n"); + dev_err(&pdev->dev, "couldn't get clock\n"); ret = -EINVAL; goto error0; } -- 1.8.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-03-14 7:55 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-03-14 7:55 [PATCH v2 0/2] spi: sh-hspi: Do not specifically request shyway_clk clock Simon Horman 2014-03-14 7:55 ` Simon Horman [not found] ` <1394783739-29168-1-git-send-email-horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> 2014-03-14 7:55 ` [PATCH v2 1/2] ARM: shmobile: r8a7779: Use clks as MSTP007 parent Simon Horman 2014-03-14 7:55 ` Simon Horman [not found] ` <1394783739-29168-2-git-send-email-horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> 2014-03-14 8:20 ` Laurent Pinchart 2014-03-14 8:20 ` Laurent Pinchart 2014-03-14 7:55 ` Simon Horman [this message] 2014-03-14 7:55 ` [PATCH v2 2/2] spi: sh-hspi: Do not specifically request shyway_clk clock Simon Horman 2014-03-18 0:32 ` [PATCH v2 0/2] " Simon Horman 2014-03-18 0:32 ` Simon Horman [not found] ` <20140318003254.GB19571-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> 2014-04-10 23:31 ` Simon Horman 2014-04-10 23:31 ` Simon Horman [not found] ` <20140410233120.GE4358-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> 2014-04-11 11:01 ` Mark Brown 2014-04-11 11:01 ` Mark Brown [not found] ` <20140411110141.GS6518-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 2014-04-11 12:32 ` Simon Horman 2014-04-11 12:32 ` Simon Horman
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=1394783739-29168-3-git-send-email-horms+renesas@verge.net.au \ --to=horms+renesas@verge.net.au \ --cc=broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \ --cc=horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \ --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.