Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3886307pxu; Mon, 12 Oct 2020 04:04:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUFu37zio69qqigGrxplusT1KpYlBLbqiIJdaskX6EnA0qsFAnjXJDL3x2rTvvj+RgTaaI X-Received: by 2002:a17:906:bc42:: with SMTP id s2mr27009085ejv.251.1602500686317; Mon, 12 Oct 2020 04:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602500686; cv=none; d=google.com; s=arc-20160816; b=yBgnQWtT6v4nZXKc5Qx+stTcOSNXW1r3Rd4xXqBerhgwwx32vn2TjDMy4lMvaKFBlK wpUproiwWUSMdT/7qHLIRYmG/JhDdph41xgIMfva9CXSUqwe9/s11y427p7IL9YltNcp nXVZNMldocel5P7gcJqT8bcWW8YcA2jIeOyuSriAfEKIhKXkqAja7qex6GbDxdc/w0zM oma+mvPoxBiC/wHhAqvwMxgyRnmyLzNn8cLkcjV4qCWx7HITE8Zeepbj2YQeNcaY0LIU u9YGDHVAaRNtmZkPGWRLIMBjyy4TRWcpaGLJ8qGqnqs/FXn1CtuZM5yrWs6dvUancT6s XquA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from; bh=C65MaZqNgxYwvsavq/XEtvE/OjF+CNcm+DpHd1wVEdY=; b=oOD2jKIOz4tsIsPuOqGMDpHNBlhpXt1N+zFGejB6cW+2NO37WRvnhbHbNiBQdf4sP9 XsJ9Zs3omg0kLk+pmoqajmBR2aPGxdT/FBXVIZEzutBQzDWhJNzo+soTGBlqKuhrFzbI uCwPzuHWQH0bTCmvNaYHBnoDVq/AOh2eBH/0CgAk2TAhbxVJlwvSmj+1n/ayTrODlyvW IrIsZrpu+vuVdhPixmRQTyDqcZ9fRa9cwLxz69Qz4ljgFKj4r8bUGu4OiDQSLk45T5eN 2UaOZzlnlaYLlRzF/1cX+kE4OIHunSLVlejfvHNNLfY5txetZJq58s8iutobC8Ior185 sbQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nz21si12315286ejb.179.2020.10.12.04.04.23; Mon, 12 Oct 2020 04:04:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387976AbgJLLBE (ORCPT + 99 others); Mon, 12 Oct 2020 07:01:04 -0400 Received: from mailout04.rmx.de ([94.199.90.94]:33509 "EHLO mailout04.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387706AbgJLLBE (ORCPT ); Mon, 12 Oct 2020 07:01:04 -0400 Received: from kdin02.retarus.com (kdin02.dmz1.retloc [172.19.17.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout04.rmx.de (Postfix) with ESMTPS id 4C8whW66vqz3r0h8; Mon, 12 Oct 2020 13:00:59 +0200 (CEST) Received: from mta.arri.de (unknown [217.111.95.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by kdin02.retarus.com (Postfix) with ESMTPS id 4C8whK1HBLz2TTNp; Mon, 12 Oct 2020 13:00:49 +0200 (CEST) Received: from n95hx1g2.localnet (192.168.54.46) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 12 Oct 2020 12:59:35 +0200 From: Christian Eggers To: Sascha Hauer CC: Mark Brown , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , , , , Clark Wang Subject: Re: [PATCH] spi: imx: Revert "spi: imx: enable runtime pm support" Date: Mon, 12 Oct 2020 12:59:34 +0200 Message-ID: <2670390.HS4A6M72fu@n95hx1g2> Organization: Arnold & Richter Cine Technik GmbH & Co. Betriebs KG In-Reply-To: <20201009073944.GA11648@pengutronix.de> References: <20201009042738.26602-1-ceggers@arri.de> <20201009073944.GA11648@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Originating-IP: [192.168.54.46] X-RMX-ID: 20201012-130049-4C8whK1HBLz2TTNp-0@kdin02 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sascha, On Friday, 9 October 2020, 09:39:44 CEST, Sascha Hauer wrote: > On Fri, Oct 09, 2020 at 06:27:38AM +0200, Christian Eggers wrote: > > This reverts commit 525c9e5a32bd7951eae3f06d9d077fea51718a6c. > > > > If CONFIG_PM is disabled, the system completely freezes on probe as > > nothing enables the clock of the SPI peripheral. > > Instead of reverting it, why not just fix it? > > Normally the device should be brought to active state manually in probe > before pm_runtime takes over, then CONFIG_PM disabled doesn't hurt. > Using pm_runtime to put the device to active state initially has the > problem you describe. prior introducing runtime pm for spi-imx, the clock was "manually" enabled and disabled around each transfer (so the power usage should already have been optimal). If we would manually enable the clock in probe() as you suggested, for users without CONFIG_PM there would be a drawback compared with the previous state (as the clock will always be on now). What is the benefit of controlling the SPI clock with runtime PM instead of doing it manually? As I have no experience with runtime PM, hopefully somebody else can fix (or revert) this. @Clark: I forgot to put you on CC on my initial message. You can find the full discussion here: https://lore.kernel.org/patchwork/patch/1318736/ Best regards Christian