Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3783219pxj; Tue, 15 Jun 2021 08:33:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysL1lqrq8rnu+8mooWmkZv0dHHlyaMAxAHrbbVi7l/MrhBg3sMkf7BfvpsZ6XSqs0vAFBH X-Received: by 2002:a17:906:2844:: with SMTP id s4mr83413ejc.263.1623771184998; Tue, 15 Jun 2021 08:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623771184; cv=none; d=google.com; s=arc-20160816; b=OC6vJfduGF2Y6GSMaw+ztlcB9IFQGjPabfmvlZEKS7Bs//oaCjhh5/u8LmSKoV0LP+ +kYaEsJ18SKZcfIZl5EfFmAng3Rq5MViLYXmdNRVsDEsE3hBFXXn6V3FacyuV8+0loZE ZWIJhniwyBhfUSPiAskYPG86iD+YoEQodAM7sh+93o7xZctlFTs3UcDBttatHSQUgM1C NLU+eoN69bqeG70GZUBCLfgPLWT13rmoc+9TX+zx3Dt3QM4oF4zATATBIlU2NEaR1H+k CFN7HW64rl9DYRoXmwrewYUBXYftvFgY5QZoVc4N3u7XHlsKIaS6zXBkMc2jsJKbGatk UA3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ugXKpj4LHdrdyG4UTDs7VBf4QAJNhOpaAQVCLfFAeJw=; b=wgXt2fAYNPhekvj9xft8DKKI5mPfNfryiy94WmLP+9QXkuKszjWATbVlTeGG+tKYAw mEkXOy5npszBwltGfhzpfIYtEYfQtxiLc3SklIS+P0+tMRRX1Ewuhcb1Ta72DjYlNFBS Iqept/wM2NpEXZ0keFizcWlt6UhNu3cmGLG3RS5qX5n3+3yshvvz050Zyn/1Trd7GKP1 C+9mqlcFebWm3FmT07+BxjSlH+1BeJiIVK/y/knnxmow+2dZNY7L10eXINsny9OttZ7A Qexx67HqxlO/cn/v7X48BdNe6Ej9wocJkegSi12kRs3MTDeNK4fexs9eofLzbDW3RVks JlLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J2VlRf6J; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si15498501edi.278.2021.06.15.08.32.41; Tue, 15 Jun 2021 08:33:04 -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=@linaro.org header.s=google header.b=J2VlRf6J; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230487AbhFOPdX (ORCPT + 99 others); Tue, 15 Jun 2021 11:33:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbhFOPdW (ORCPT ); Tue, 15 Jun 2021 11:33:22 -0400 Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 273FBC061767 for ; Tue, 15 Jun 2021 08:31:17 -0700 (PDT) Received: by mail-vk1-xa2a.google.com with SMTP id j19so5044685vkj.0 for ; Tue, 15 Jun 2021 08:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ugXKpj4LHdrdyG4UTDs7VBf4QAJNhOpaAQVCLfFAeJw=; b=J2VlRf6J4osy2PHigG6h59M178uVc3xlDfkFnJCqh43wYbiOesVkB/V0ZbK3cymc/q PiJPytY5WQmxpMKI5bqOCjErVxADBBlqmzzEnV5iKGdvWzgHRQIoCcdglRrob/KSA0fk cZ5AcJAWFT1ngmNWfYziwDSPoaRksFXrIxqEtURPVg0GOfOSDRUDI65uh5H4W488Elul owJ/F6CZ7dpUZvoMWYg/wAyUdGbyCLMUu3vjwi82d/7yuusYsotw+u48pNxlMlYVOlLo MjPAcRy0LVDhbxLLtV5YDTIJ8cR9US673/EP8Fw4ZmsUefZL8XEb7a8D1wm6sPYMUAF7 5jHQ== 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=ugXKpj4LHdrdyG4UTDs7VBf4QAJNhOpaAQVCLfFAeJw=; b=clfTTik1K0Sf0VulvrHiu8sbqTCxM2wbFjWigQIBl0p8QYEYeRiJ4+eikh/cRAuA+z MnIVFJTYfCPL88ndC4vqzK8CbMmiy7186pOLLbRhEgAyMEddy0EHrp7eskdr/pHlb9ih N9+0t0Hxr05XIAt/iKQNTopMLHKr9/eHKDfAjqmbBVfS3OmH99gNunLS2XTK1Cw77huQ /0ISSmBY6zzGJfhUWR5tCPCwMTOPRuaOJrB8mjK8v+uvty9YLix4Q0oTUCxfyhaBIZ9Q vFW0nja9HSaRqgaHCqe1insf+wC81/TXOC220C4mqWrNajr0hXkVrWmk+znoeb8ztKB7 /bEA== X-Gm-Message-State: AOAM532J70dM/YAI/EQGG6nDHIrmOuaid/VnE/Fnx4lxXWL7gPOe6+Ok RclMfLLplGGe54gXbGd2fjp9IGgCleZ3u8QzloZaJA== X-Received: by 2002:a1f:9542:: with SMTP id x63mr5023349vkd.15.1623771075445; Tue, 15 Jun 2021 08:31:15 -0700 (PDT) MIME-Version: 1.0 References: <20210602192758.38735-1-alcooperx@gmail.com> <20210602192758.38735-2-alcooperx@gmail.com> <6acd480a-8928-89bb-0f40-d278294973a1@gmail.com> In-Reply-To: From: Ulf Hansson Date: Tue, 15 Jun 2021 17:30:39 +0200 Message-ID: Subject: Re: [PATCH 2/2] mmc: sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211 To: Florian Fainelli Cc: Linux PM , "Rafael J. Wysocki" , Al Cooper , Linux Kernel Mailing List , Adrian Hunter , BCM Kernel Feedback , DTML , Linux ARM , linux-mmc , Nicolas Saenz Julienne , Ray Jui , Rob Herring , Scott Branden Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [...] > > > >> > >> In all honesty, I am a bit surprised that the Linux device driver model > >> does not try to default the absence of a ->shutdown() to a ->suspend() > >> call since in most cases they are functionally equivalent, or should be, > >> in that they need to save power and quiesce the hardware, or leave > >> enough running to support a wake-up event. > > > > Well, the generall assumption is that the platform is going to be > > entirely powered off, thus moving things into a low power state would > > just be a waste of execution cycles. Of course, that's not the case > > for your platform. > > That assumption may hold true for ACPI-enabled machines but power off is > offered as a general function towards other more flexible and snowflaky > systems (read embedded) as well. > > > > > As I have stated earlier, to me it looks a bit questionable to use the > > kernel_power_off() path to support the use case you describe. On the > > other hand, we may not have a better option at this point. > > Correct, there is not really anything better and I am not sure what the > semantics of something better could be anyway. > > > > > Just a few things, from the top of my head, that we certainly are > > missing to support your use case through kernel_power_off() path > > (there are certainly more): > > 1. In general, subsystems/drivers don't care about moving things into > > lower power modes from their ->shutdown() callbacks. > > 2. System wakeups and devices being affected in the wakeup path, needs > > to be respected properly. Additionally, userspace should be able to > > decide if system wakeups should be enabled or not. > > 3. PM domains don't have ->shutdown() callbacks, thus it's likely that > > they remain powered on. > > 4. Etc... > > For the particular eMMC driver being discussed here this is a no-brainer > because it is not a wake-up source, therefore there is no reason not to > power if off if we can. It also seems proper to have it done by the > kernel as opposed to firmware. Okay, I have applied the $subject patch onto my next branch, along with patch 1/2 (the DT doc change). However, I still think we should look for a proper long term solution, because the kernel_power_off() path does not currently support your use case, with system wakeups etc. I guess it could be a topic that is easier to bring up at the Linux Plumbers Conf, for example. Kind regards Uffe