Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp137708lqc; Thu, 29 Feb 2024 12:36:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUZh81ajHqNemnNAofDi3uMJL8IwieLYKFgjZFtOZMUckmyRv6OLLfs/f9wIspgsvDrR63tjfHBJnha7hjz8rE4iUsUHqc201hGQBUnOw== X-Google-Smtp-Source: AGHT+IHW0dPovR0sYJbRTIfEUQc6E/KKtVT0VT6owrQarRoE/Y+01RuP/iPLDtUMnxL2JANyKhk6 X-Received: by 2002:a05:6e02:1d9c:b0:365:259b:711e with SMTP id h28-20020a056e021d9c00b00365259b711emr175501ila.5.1709238990209; Thu, 29 Feb 2024 12:36:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709238990; cv=pass; d=google.com; s=arc-20160816; b=lQvRbG1rS+ILTOXBi0RUBTuqmbgowwqMyTWIkqZN1uxjyJc8CnX3vQQOnUZrKSIBIW UGxLhrS1mkHRXu8OVCsN3g+205/bSs7QJwoxytWzKi4oNHpngJLMeL/31LNkRK4LNDd5 5y/kzoyPn9WhAyJPQp3YwCfJLoCXPpju0nnpNO8Buj4t93syPJLZmSj+6wbS4fznkj6Z QxWHQH2DrBRiwyux4tvskyzW2SvQeLFtB4ZxxcXo2n3nWuBsVTLcnO8dPwrQaQDhnAcS yY4D6QVFrI3H08OMd5EAmjGh7J7szJkIu2ONXZUW2rXCPr7bFFDwirreWqSzMMSL0Ot5 XyjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iF00x1JYH/TUQf9aemNAq1yK9csbfLBqAz9dvmxiaEQ=; fh=eZnRHOYe2I8OtvTLpWslGUiSew8FNdCH09PmUMEps3A=; b=u97cLJ3AHUqRxtkZrI3+8mHrpy7M3CLYTwCLd1h/PdF99Kim08W6Ogcs+I02tBGSm0 MNh1s8j+dDOYBFbR8jRBNL2dbN30/0nywvGUuNzNQUWEYRN4Yz5ByVIAPK0yOR6maHbt Vc/Vh0bmBnsAYBoquXUdppqHb1fAHfLKhFo8WrEYRytb4WBddsyihSOiqIeq2DdkvUYw K/lgujOoNjSkBo7Gtg9oNjEz9nkGAPOD9HWoMTzcxnyNfG1xmk1nI1M/zbL+lEcFrZGu XhLpJvrea5mTfxnC9A8l+bWbbQPhsOeB3gdfu1ze25yaoTEbKSIPkPOAUmNzwPeyeyRF swkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bNlkcPD/"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-87429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f13-20020a056a001acd00b006e489241e68si2014082pfv.298.2024.02.29.12.36.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 12:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bNlkcPD/"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-87429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C212CB21FDE for ; Thu, 29 Feb 2024 20:34:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8202144049; Thu, 29 Feb 2024 20:34:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="bNlkcPD/" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5C7414403D; Thu, 29 Feb 2024 20:34:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709238870; cv=none; b=t5C+TkWbft88+xze58RdjPG9dSTgSVAhW1jd3xHrpZTRFj32vD8IsoEQwstWwP7mglSy2OHHJqEmHIXZnwOALlfzYY5kB5EAJOp53hCan6eKgHPujRAN6v5mHEmpmAwWt9b0awxmEDdXw+Xgeab4fO1M7ruaQGrJwHeEpnXEMqs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709238870; c=relaxed/simple; bh=IOKmOaZ3f+R9G99MWOPlPCNobJh93nKUWXF4w2ekTL8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fRgGf1w36Zh8aGsZ7ryLCei0U05RInZDpGufgPLRrg/l27F3spQQjEV/8XrA0i0F9pxzDiy0M807zvznJc+BdnjqhNhNVCa3YmWyh1nHMExvVqoKvMr2jjZ0oZ/scXIuU1HaYEPqg1JpVBkfVRFRpZzNjXcElqnQGmI5Ejo2DE8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bNlkcPD/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB7A6C43390; Thu, 29 Feb 2024 20:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709238869; bh=IOKmOaZ3f+R9G99MWOPlPCNobJh93nKUWXF4w2ekTL8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bNlkcPD/X0lmlYMd78MNbai443tQVDwo9uKnP1hs+9G/zFsw+X3iFzIubktGbOZfV n5qYc0N8U5x8JBE9oiHpvwYxHElib4be4iuMwUa1Mvrl2tPYHpCDallMK2n8k2ndu5 hlSolO3NEv/Abhu7oPhu7kdHtnhlerXDaw/TM4GU= Date: Thu, 29 Feb 2024 21:34:26 +0100 From: Greg KH To: Guan-Yu Lin Cc: Florian Fainelli , rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com, andriy.shevchenko@linux.intel.com, rdunlap@infradead.org, james@equiv.tech, broonie@kernel.org, james.clark@arm.com, masahiroy@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v3] PM / core: conditionally skip system pm in device/driver model Message-ID: <2024022901-getaway-bacon-b805@gregkh> References: <20240223143833.1509961-1-guanyulin@google.com> <3208c5b9-5286-48d1-81ab-cc3b2bc4303e@gmail.com> <7292dc5c-dff0-45f0-99b1-f1687451b23f@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Feb 29, 2024 at 05:08:00PM +0800, Guan-Yu Lin wrote: > We want to introduce a mechanism that allows the Linux kernel to make > power transitions for the peripheral based on whether the other > operating system kernel is actively using it. To achieve this, we > propose this patch that adds a sysfs attribute, providing the Linux > kernel with the necessary information. Don't create random user/kernel apis in sysfs for no good reason just because it is "easy" :( If the "other operating system is actively using it" isn't able to be detected by Linux, then Linux shouldn't be able to change the PM state, so this sounds like you need to fix your Linux driver to properly know this information, just like any other device type (think about a sound device that needs to know if it is being used or not, nothing different here.) So please post your Linux driver and we can see what needs to be done there to get this to work properly, odds are you are just missing something. Have a pointer to the code anywhere? Also, as you know, we can NOT add interfaces to the kernel without any real user, so without a driver for your hardware, none of this is able to go anywhere at all, sorry. thanks, greg k-h