stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: twl-core: Fix clock initialization
@ 2018-04-05 11:46 Peter Ujfalusi
  2018-04-06 19:38 ` Peter Ujfalusi
  2018-04-09  3:37 ` Sasha Levin
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2018-04-05 11:46 UTC (permalink / raw)
  To: tony, lee.jones; +Cc: linux-omap, linux-kernel, hns, stable

When looking up the clock we must use the client->dev as device since that
is the one which is probed via DT.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: stable@vger.kernel.org
Fixes: 7e2e6c5758de9 ("mfd: twl-core: Do not create dummy pdata when booted with DT")
---
 drivers/mfd/twl-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index d3133a371e27..c649344fd7f2 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1177,7 +1177,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
 	twl_priv->ready = true;
 
 	/* setup clock framework */
-	clocks_init(&pdev->dev, pdata ? pdata->clock : NULL);
+	clocks_init(&client->dev, pdata ? pdata->clock : NULL);
 
 	/* read TWL IDCODE Register */
 	if (twl_class_is_4030()) {
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: twl-core: Fix clock initialization
  2018-04-05 11:46 [PATCH] mfd: twl-core: Fix clock initialization Peter Ujfalusi
@ 2018-04-06 19:38 ` Peter Ujfalusi
  2018-04-09  3:37 ` Sasha Levin
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2018-04-06 19:38 UTC (permalink / raw)
  To: tony, lee.jones; +Cc: linux-omap, linux-kernel, hns, stable

On 04/05/2018 02:46 PM, Peter Ujfalusi wrote:
> When looking up the clock we must use the client->dev as device since that
> is the one which is probed via DT.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Cc: stable@vger.kernel.org
> Fixes: 7e2e6c5758de9 ("mfd: twl-core: Do not create dummy pdata when booted with DT")

This is not correct, we should only apply it to v4.16 since things worked
before that with the drivers/clk/ti/clk-3xxx.c and
drivers/clk/ti/clk-3xxx-legacy.c

Switching device to look for the fck might fail in pre 4.16.

But if this is the case then we might want to rename the fck clock to the
correct hfclk.

On top of this patch a DT patch for the affected boards will be needed after
4.16 to define the hfclk clock (or if we do not rename it, the fck).

I'll send a v2 on Monday, but would like to hear your opinion on renaming fck
to hfclk from 4.16 onwards (and update the documentation as well). The DT
lookup is broken anyways w/o a patch similar to this.

-- 
Péter


> ---
>  drivers/mfd/twl-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
> index d3133a371e27..c649344fd7f2 100644
> --- a/drivers/mfd/twl-core.c
> +++ b/drivers/mfd/twl-core.c
> @@ -1177,7 +1177,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
>  	twl_priv->ready = true;
>  
>  	/* setup clock framework */
> -	clocks_init(&pdev->dev, pdata ? pdata->clock : NULL);
> +	clocks_init(&client->dev, pdata ? pdata->clock : NULL);
>  
>  	/* read TWL IDCODE Register */
>  	if (twl_class_is_4030()) {
> 


Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: twl-core: Fix clock initialization
  2018-04-05 11:46 [PATCH] mfd: twl-core: Fix clock initialization Peter Ujfalusi
  2018-04-06 19:38 ` Peter Ujfalusi
@ 2018-04-09  3:37 ` Sasha Levin
  1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2018-04-09  3:37 UTC (permalink / raw)
  To: Sasha Levin, Peter Ujfalusi, tony, lee.jones
  Cc: linux-omap, linux-kernel, stable, stable

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 7e2e6c5758de mfd: twl-core: Do not create dummy pdata when booted with DT.

The bot has also determined it's probably a bug fixing patch. (score: 99.0131)

The bot has tested the following trees: v4.16, v4.15.15, v4.14.32, v4.9.92, v4.4.126.

v4.16: Build OK!
v4.15.15: Build OK!
v4.14.32: Build OK!
v4.9.92: Build OK!
v4.4.126: Build OK!

--
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-09  3:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-05 11:46 [PATCH] mfd: twl-core: Fix clock initialization Peter Ujfalusi
2018-04-06 19:38 ` Peter Ujfalusi
2018-04-09  3:37 ` Sasha Levin

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).