Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1471362ybt; Thu, 9 Jul 2020 07:51:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzivpvHFPvcogt4TrIba4Y2plvUYNqz7xmtFjaRzFhWfvC+nNqinCg8Z79PdvCq+eUgSt7I X-Received: by 2002:a17:907:426c:: with SMTP id nx20mr55916973ejb.548.1594306315927; Thu, 09 Jul 2020 07:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594306315; cv=none; d=google.com; s=arc-20160816; b=CQA+mXFnF/N4TWs3WTk65N88wL17wvU/5E9rbXriGrBNqJ/DI03yWY8qVI76tzQA9D TdLkozNP1Uy4mQaLwVzoY6vaHp36BHRg0o4w+HT3YCLMMNiW6DziwvNZ9sjD/DgeI2KT bsY1Fe0MrEI28+RbB533UhNEBJ+iiTwKIxI5PeZ5aihkDxcnVkglXG1sJ+DeXzk5dOmf o6lySRo4CfLrojQwVinUTIAdK23WaPc2QWCdMZZ2BeE82QqrlhFsOWdZriS1czNJlbei ySn2yWcRpZGIezKsTWB9cTUKe+IjE2yQFa/GQyky/h6hsG01lw08L8MJSgQJRyD5BDyr kZFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0Kim3CdbxyyOIhVT8nqi+K5F5C7o279gFE7n8I2AhGw=; b=y/n2p/fSgzYWxj8FZMjdM32sqkBCi3jWUyQ3DHORHgG63uKNrSkbf9aSvWADZ+2Ari Q6HzmYlXBAI2afuJZZ6rUYmlf3vy1WZzvG6eMspKqPGwPAyc12U4u4D0TeL26iN7341X KU4YnX8XlAkTEWP1D6JLQqTb+iwbPVoW2IatEuL41sMZKxd/M1s3yyKxKmSYtikS77Im NS0zAsTHMkMWcRvzXUI3wv54lrUMl+HfvfDBKfuq6B4GDDTekcIqKXcM0GI+/h8VGnwL xhmULxAe4iUB5vpKp35Z/i4kQV7O+tJFVR2F/+mJPZ9me+Q/j4S3li8w37TEyFGP1wvk P9yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PCMgMMIM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si2363180eds.291.2020.07.09.07.51.33; Thu, 09 Jul 2020 07:51:55 -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; dkim=pass header.i=@chromium.org header.s=google header.b=PCMgMMIM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726722AbgGIOuK (ORCPT + 99 others); Thu, 9 Jul 2020 10:50:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726371AbgGIOuK (ORCPT ); Thu, 9 Jul 2020 10:50:10 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E32F9C08C5CE for ; Thu, 9 Jul 2020 07:50:09 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id mn17so1220723pjb.4 for ; Thu, 09 Jul 2020 07:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0Kim3CdbxyyOIhVT8nqi+K5F5C7o279gFE7n8I2AhGw=; b=PCMgMMIMPYgEiSOnn0WY5wKtX6cQ7Z+UAnP1iiRucoEQNv/MdRE5U9c5KpDE2lrLCt kkxmc4qkOKMgwTMSCezsgykchuRt1xzNJss9K4+HJBnMdi7Zw5W/8Z+vfTGJXDvz42Q8 XIw6BtvVUeg3ghXbZOO7MBapqShWQ1NOc4too= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0Kim3CdbxyyOIhVT8nqi+K5F5C7o279gFE7n8I2AhGw=; b=AptkGjRakr5l9BYuflYdSnR5HQy/PxADCsO9HppGvnapO2bAvOGrSKcYwPiPqM9Cwr iKmOBFDGyMra2gKiW/gMXpiesLbHSaGkKA/RXxM4xlJ2rxA571qW/p5vBXR2hAsbqYaU NkaJ/22MX6ejPBOT0dChxEH2K87ewM4ktR20DOpaiEN+4eXMxNM55Q8vJaLtmbsoLWXS V1nAT57zkRePiuexKwkG3XLEnW7eYm9Q+tHZ/o4uY16TdfWSXi1IiEIg9YrTEe2fQq9b btPFgpNoGPtNWXSBGEGCx2Fw6wvTjTll3fNfgvXBTr1mtd8TMm3KoBHRuOwUzq11Atr+ OlKw== X-Gm-Message-State: AOAM533oTPTLm8T6mbpm1fLeqjgBPSeHQy+AuBHdhFP6bWoxCZKLP5eO YgMPHMl0Pqwed8VPR8zmCOXbu4ILtbw= X-Received: by 2002:a17:90a:26a4:: with SMTP id m33mr423518pje.124.1594306209193; Thu, 09 Jul 2020 07:50:09 -0700 (PDT) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com. [209.85.210.176]) by smtp.gmail.com with ESMTPSA id u20sm3342154pfk.91.2020.07.09.07.50.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Jul 2020 07:50:09 -0700 (PDT) Received: by mail-pf1-f176.google.com with SMTP id m9so1132819pfh.0 for ; Thu, 09 Jul 2020 07:50:08 -0700 (PDT) X-Received: by 2002:a05:6122:78d:: with SMTP id k13mr41715186vkr.28.1594305878997; Thu, 09 Jul 2020 07:44:38 -0700 (PDT) MIME-Version: 1.0 References: <20200708163922.1.I0b701fc23eca911a5bde4ae4fa7f97543d7f960e@changeid> <23e53f2b-02b0-2c9b-a165-4ca5a2c84a89@codeaurora.org> In-Reply-To: <23e53f2b-02b0-2c9b-a165-4ca5a2c84a89@codeaurora.org> From: Doug Anderson Date: Thu, 9 Jul 2020 07:44:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] spi: spi-geni-qcom: Set the clock properly at runtime resume To: Rajendra Nayak Cc: Mark Brown , Andy Gross , Bjorn Andersson , linux-arm-msm , Akash Asthana , Georgi Djakov , Stephen Boyd , Maulik Shah , ctheegal@codeaurora.org, Matthias Kaehlcke , LKML , linux-spi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Jul 9, 2020 at 1:55 AM Rajendra Nayak wrote: > > > On 7/9/2020 5:09 AM, Douglas Anderson wrote: > > In the patch ("spi: spi-geni-qcom: Avoid clock setting if not needed") > > we avoid a whole pile of clock code. As part of that, we should have > > restored the clock at runtime resume. Do that. > > > > It turns out that, at least with today's configurations, this doesn't > > actually matter. That's because none of the current device trees have > > an OPP table for geni SPI yet. That makes dev_pm_opp_set_rate(dev, 0) > > a no-op. This is why it wasn't noticed in the testing of the original > > patch. It's still a good idea to fix, though. > > good catch, without this (and with OPP tables added) we would end up removing > the performance vote on suspend and never put it back unless the rate changes. > Perhaps a similar change would be needed for spi-qcom-qspi too? The quad spi already patch had this fix and it actually mattered there. That's what made me go look back and realize that I needed the fix in the geni SPI. See: https://lore.kernel.org/r/20200707131607.1.Ia7cb4f41ce93d37d0a764b47c8a453ce9e9c70ef@changeid I'll send a v2 of that with Akash's suggestion of checking the return value, though. -Doug