From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D259C4338F for ; Wed, 11 Aug 2021 21:05:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 705E06104F for ; Wed, 11 Aug 2021 21:05:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231927AbhHKVFk (ORCPT ); Wed, 11 Aug 2021 17:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbhHKVFj (ORCPT ); Wed, 11 Aug 2021 17:05:39 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D699C061765 for ; Wed, 11 Aug 2021 14:05:15 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id x12so4909435wrr.11 for ; Wed, 11 Aug 2021 14:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ouGt/9O7zCwkqsd+XI3jlrIi47Q+9Wmfqujy0Iy9BkY=; b=TFHV85vyl5NNfVlhI43yxXYsFeFh9wWv1ozmNfJQ3Wqs1J/L4IUedNzg2A86sRvYPv aBgzKbdJ3ZmoOvm8rKZ9FajZkW6bOw7UJm8g0smnvikhT4EE/qAMb5de8FLw3vyXXBgJ OBde5l5EVUXWqD832IEuhocPrPzxUp7QB54LotUhAOUFjrqtEq9SvlxmOyfufG7S6Sl5 +2o+Zs7LAoqkiG2HxRYcTuDiI3RwizrXV8o/APQUT0dEtOvx0mDYy7s7I9WV5wksrUps MM4OFT1WlqIl1cZjvWDtGo/T1rwNml9v4nsY0BEvX+ILiE0NliIRLarkqpVFcClp0UlU YyGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ouGt/9O7zCwkqsd+XI3jlrIi47Q+9Wmfqujy0Iy9BkY=; b=VCPsNibt2ohCzh9atYMnpoAl7C8wob/++hCZBI9c1KTVslSObEdbTViciE4vFG88th WKqySoidZSFl5uQNZCAC/Odft200C5lPAGo4uN+WW9SkS/+Q+aF+M7nJgMQx+PU4/aww OgWboqpnvwmeseXBEwF9bI6s/14T4Mzhj9MYwBGEu5s/eKNgzftYkqlrJQjlGTloMIhd cZZ8rmczdUGzhPLOCy1IbTJMTIAuo1OXv5gy9JNaaXjZhArwIMwGGaRnq874Hhw0t7Si 2eorRfy5CZeEjjNFxu8N9aitKPysy5oFQmgaZLxf5qY/ml84J02eUpOaQg65OH+fFRzk yGJQ== X-Gm-Message-State: AOAM533Kp7i6ryAJIkUWCb25zOyf8Zz+ZHbRah4R49w9jUDdsqDvUi0s Aelyeta+TvKnETPLtjSQ5L0qCK8JZ0vHBw== X-Google-Smtp-Source: ABdhPJxqTuSWRjxkQ2ldYk7AaqS8spAgGoyqDJVXBJFvkF2NZgJBsMJIlugyGXsj5YW3J5hco+oTTg== X-Received: by 2002:adf:e101:: with SMTP id t1mr358102wrz.215.1628715913796; Wed, 11 Aug 2021 14:05:13 -0700 (PDT) Received: from ?IPv6:2003:ea:8f10:c200:988:dfda:c500:b22? (p200300ea8f10c2000988dfdac5000b22.dip0.t-ipconnect.de. [2003:ea:8f10:c200:988:dfda:c500:b22]) by smtp.googlemail.com with ESMTPSA id d9sm479148wrw.26.2021.08.11.14.05.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Aug 2021 14:05:13 -0700 (PDT) Subject: Re: [PATCH v2 1/9] i2c: i801: Improve disabling runtime pm To: Andy Shevchenko Cc: Jean Delvare , "linux-i2c@vger.kernel.org" References: <10690555-2317-4916-70b8-870708858f9b@gmail.com> From: Heiner Kallweit Message-ID: <3f225422-b343-eaef-0a95-9d15a5a378f2@gmail.com> Date: Wed, 11 Aug 2021 22:03:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On 11.08.2021 17:41, Andy Shevchenko wrote: > On Fri, Aug 06, 2021 at 11:12:18PM +0200, Heiner Kallweit wrote: >> Setting the autosuspend delay to a negative value disables runtime pm in >> a little bit smarter way, because we need no cleanup when removing the >> driver. Note that this is safe when reloading the driver, because the >> call to pm_runtime_set_autosuspend_delay() in probe() will reverse the >> effect. See update_autosuspend() for details. > > ... > >> * BIOS is accessing the host controller so prevent it from >> * suspending automatically from now on. >> */ >> - pm_runtime_get_sync(&pdev->dev); >> + pm_runtime_set_autosuspend_delay(&pdev->dev, -1); > > I dunno if it's being discussed, but with this you effectively allow user to > override the setting. It may screw things up AFAIU the comment above. > No, this hasn't been discussed. At least not now. Thanks for the hint. This attribute is writable for the root user, so we could argue that the root user has several options to break the system anyway.