Received: by 10.213.65.68 with SMTP id h4csp1003711imn; Fri, 6 Apr 2018 12:43:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Ldm7YnYPUfMLSeVPmgvKw0lCnYkY+4tMlBAL4bR+HEVEvzPrrRJSlObO2oPmZcyfYKxVu X-Received: by 10.99.113.70 with SMTP id b6mr2247885pgn.126.1523043794787; Fri, 06 Apr 2018 12:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523043794; cv=none; d=google.com; s=arc-20160816; b=iAWkuPUnMnh9R1gkJbW+A4rV23tuXHIFJmJnlO4hsAS5z0ldq0CRItwDztLFtqjGrm uGBjVYEz6akJ8eKYsYeUQcSB+Cq6eX0I+l0xGLAi1rS6MRCvUpGr0aPm5eZPiVlQNUJn L0NPj+MO0MQRgbxs6w4yMdkoKS889onWsedlzay1fyRACuMknXp8pI9sgDkMsFk5l0Ih CT79ncSRZVwmH6q9gljmMhgNvMrIbmeLMNY+TW/9XPyAOtUj7jKztpvIf7pF9Mcoex8N F70SWEy9qYimrH99xZzby+ukA/pjUX13gcNLhmdVGjTGSOz5bpNFPOV1EAvOkYA07Lfo DSvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=hlol09TCau+OdC9FTVOzWvmkY7GvfAdrV03NV06k06k=; b=xKJUBSzjDg9XOtGHzRgh9W6COJN5L/D1G+IxpBYXTyqbuhQfN0U7FfY1nLr02P8qDk AKaU2jnOY6YBRLhdnT7kFS+/6nwNdXx1JelsiaMfxN96LyP1mwQz73vlsm49fbvooRyf rzMWx9ow6zG6vUwtKZfZdnzJDedhpocsFZKoPtV+zq6L/UtTbHHWpsz+hX6/SDLsEnhh Q8dsWUaTfJ2UgCC+IKT1Grki913mlDKeipLwmQopaUuKhpmENPp8G8vbz5D8PTW1xUyg I6liYDKG1baTDPiEXvMkr4F67nTPUntISILEDqhH7TFIAkQyWSVcdrDOlozBDHo8MjZz WTjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PWFIblb3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6-v6si5639638pls.714.2018.04.06.12.42.35; Fri, 06 Apr 2018 12:43:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PWFIblb3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751558AbeDFTjS (ORCPT + 99 others); Fri, 6 Apr 2018 15:39:18 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:44631 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbeDFTjR (ORCPT ); Fri, 6 Apr 2018 15:39:17 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w36Jd3xZ002780; Fri, 6 Apr 2018 14:39:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1523043543; bh=jrQgb07vDq8NvFtmetnMCsuTOKfj+Ff+42ANyucXVIA=; h=Subject:From:To:CC:References:Date:In-Reply-To; b=PWFIblb3y10mdklKDoUCH/OEDhqI3VbcJl69dMrQgWAHAw/+p1wCNzpapiJqmboH5 Lown2RVat9w/PMbsocrUpVIbdhDg/tSPcWSO33ssnqHVbeR1WtgmUpP7ExdACQNcQx QRQ3Y1G94ZweCt4qEt7P9bhHBBpUuQ8WjYX9KmgI= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w36Jd3wx014035; Fri, 6 Apr 2018 14:39:03 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 6 Apr 2018 14:39:03 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Fri, 6 Apr 2018 14:39:03 -0500 Received: from [172.22.5.0] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w36Jcxtr003165; Fri, 6 Apr 2018 14:39:00 -0500 Subject: Re: [PATCH] mfd: twl-core: Fix clock initialization From: Peter Ujfalusi To: , CC: , , , References: <20180405114636.16294-1-peter.ujfalusi@ti.com> Message-ID: <8a06e6f0-3350-5cb0-48fa-3fd770421aca@ti.com> Date: Fri, 6 Apr 2018 22:38:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180405114636.16294-1-peter.ujfalusi@ti.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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