Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp998181ybl; Fri, 24 Jan 2020 13:28:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyhq+Ed/CRItl6+mhyQWWyLX1ZH+ZXwQjjXvA+6WkSnWo5a/MG6arw4mbUw/dpE8HSqgod8 X-Received: by 2002:a54:4e8d:: with SMTP id c13mr596777oiy.27.1579901322224; Fri, 24 Jan 2020 13:28:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579901322; cv=none; d=google.com; s=arc-20160816; b=UkNZD/gRl9yDCMl55b/EzEIJxVOl4PS39gvtqacQlfJH6SOA5yTqp2YoR/mK+2ASUm qz5JdUAkeq5QQ7IpDhBMQOwCj/gX95mB2eCdknj9pc23RexP2lvJDkk+XCrT9XwDRnIb 3lr2rg37wGWJH3XuVIFu7gVssNWru1TO8FYKUMDEPt6s/iUPywUPY9sA3+paKUXz26aN do1G7P0jrE8R9URdk8fDHMbH4YxJiUwRHxiJt4C+WaEAd+yczUiJmpOcGMWjge/GkDOa VM+hX/2nTjFTrb70EL5vR28Xw2f6vmDyBxUF65svsZP7/D4sGm0nf7nvnHnLrqvK8BGX bsSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=vG3tvGD/QRBqdgtOXjx5zOUsGHCK/ABAITDFK51OWYc=; b=J3OvbZPtmjLPvFtweeo1DMRgERBE5x64wyLpPSYjKD+zKoFWXjqX49nr1L96znM9lx KXlOVwHz0d+Mz76bLEVf29eggkacF0HNVxuXiW6YGf3ASCXr6Jfuq+UrzRHI1eN2rczD dZhhefnF7uoAYEfqg98jv2YLIG1GMz5XvvIAW5OL3z2b1g5VI8b/EEAo+QnTfmp1epsX vYX1ZPzbPdTClKiFLjEnM8cl7FLn66xHR0sMeip6VYlH2gbyXTG1bLcNBy5+FLFJMp+m EOfv91wqGBICI25cKy9EK9eVcEJj+BB0UDYM3zR3kX88bpOlAcGCCkBLOGQD9XK6omJa UdWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=i11zhh4E; 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 f15si358330oij.160.2020.01.24.13.28.30; Fri, 24 Jan 2020 13:28:42 -0800 (PST) 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=i11zhh4E; 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 S2392308AbgAXTxT (ORCPT + 99 others); Fri, 24 Jan 2020 14:53:19 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:33234 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391581AbgAXTxT (ORCPT ); Fri, 24 Jan 2020 14:53:19 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 00OJrCoA082355; Fri, 24 Jan 2020 13:53:12 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1579895592; bh=vG3tvGD/QRBqdgtOXjx5zOUsGHCK/ABAITDFK51OWYc=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=i11zhh4EApu8nwWvLZH7bsEx134pNpg6OXOl7i64JLV/NRj9qIz7qcSgc02tmyWOD DNPRTrWkaz0dGxoq1jvYVMwkhj4mcqh16wGhmxcUAck/L3wRso7+v+XI1s10nWbGGb VlWO6CUV/tRJo44ctePh7SliyIxuyvhwy40VEWXc= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 00OJrCCX090059 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Jan 2020 13:53:12 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Fri, 24 Jan 2020 13:53:12 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Fri, 24 Jan 2020 13:53:12 -0600 Received: from [10.250.65.13] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 00OJrCv1053018; Fri, 24 Jan 2020 13:53:12 -0600 Subject: Re: [PATCH v2] can: tcan4x5x: Turn on the power before parsing the config To: Marc Kleine-Budde CC: , , References: <20191210163204.28225-1-dmurphy@ti.com> <4a2e80f0-13c5-df7b-65af-25f86ca48f2a@pengutronix.de> From: Dan Murphy Message-ID: <3a67743b-aec6-ba4e-14a6-c2ab327e1eae@ti.com> Date: Fri, 24 Jan 2020 13:50:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <4a2e80f0-13c5-df7b-65af-25f86ca48f2a@pengutronix.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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 Marc On 1/2/20 6:38 AM, Marc Kleine-Budde wrote: > On 12/10/19 5:32 PM, Dan Murphy wrote: >> The parse config function now performs action on the device either >> reading or writing and a reset. If the regulator is managed it needs >> to be turned on. So turn on the regulator if available if the parsing >> fails then turn off the regulator. > Another BTW: > Consider converting the switching of the vsup to runtime_pm. > > Yet another one: > Why do you disable the clocks in the error path of tcan4x5x_can_probe(), > but never enable them? > >> out_clk: >> if (!IS_ERR(mcan_class->cclk)) { >> clk_disable_unprepare(mcan_class->cclk); >> clk_disable_unprepare(mcan_class->hclk); >> } > - please move the clock handling from the m_can.c to the individual > driver > - please move the clock handling to runtime_pm in the individual driver > - remove the obsolete m_can_class_get_clocks() > - make runtime_pm mandatory Ack to the above I have made these changes locally.  Will submit next week. Dan > regards, > Marc >