Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3919926pxb; Tue, 10 Nov 2020 03:38:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKALf8Z43V16dyXfIoO1fmTzxg5vwUWeUJmFZofJIo4GhzDKREtXNWIhjrHajsK5AFw6sK X-Received: by 2002:a17:906:1383:: with SMTP id f3mr19220857ejc.489.1605008292373; Tue, 10 Nov 2020 03:38:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605008292; cv=none; d=google.com; s=arc-20160816; b=HAbsqvjaULCFvPFWyFN7r8tOBrRkSSMJ+tyHA1//jdMmQQv7Q4ZkZWMRXXbSMW47nl 3TE+N1B2FpXl73xoBV0aQinNESo852DwZa86wwWXC3FWcxKq+h8kIgqdiXZL8PuRv5Q/ ahxav41aMp2irnNudaM0fnHYilT99T1qr3HlK9C5JUSatMH8drfAdfOdDVFkAKStxQtS gAtU1FIMxcuz7ilvFCEg66MUuNxL3ouv3XfSyq3KmXEpQpWr53WhcNPrt8EsCZNDShyN JA51Zn9mLcv+LdMrwmp2jtTdpTh72u9jRuaR9Ta1dr8KiBOnaNJNLaS9Euf1s30KuKHk cOKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pzFcB3saT4w6G/BAv+RM/uKpRfamqVzAE0j7UWHsgAc=; b=WyT4PXqkaRwL2TzJrBPQMBA7ssol3N/hvKAG7aRc47x5efMGRAgbqiVj+ERUEg8QpP pmWb6gibZEcqeINAsYE/D1t3bYoCyKQY4j2Ean0rZcUAFn7SEec1wAW8D8V5Bz1mDAi/ UdHOYWinZnnphXB5gN1SHQtsorYFBRE9fzQVcYCGiTrUJe9gIZgpohAPQTDvlbd6vwZx 0xLDNADqnNAAPKWbl8paOBRRsX2rsnpaSHBWFzmOTf8skBQhBqopwnJQAsYcspeFrCRq IesVQW9JVJ3Arm6AZkcw/u/nXD8D1Cm6gyOJI9TWt/suhsRF3OOcITwOuD93TytgA7GH 7+Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sgGscdrb; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si9465462edw.337.2020.11.10.03.37.37; Tue, 10 Nov 2020 03:38:12 -0800 (PST) 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=@kernel.org header.s=default header.b=sgGscdrb; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730059AbgKJLdX (ORCPT + 99 others); Tue, 10 Nov 2020 06:33:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:47092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbgKJLdX (ORCPT ); Tue, 10 Nov 2020 06:33:23 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 48F4F20637; Tue, 10 Nov 2020 11:33:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605008002; bh=XmyBF4mbE1OM1mEytauF8JvdxrN6jCorir7u0p0LO70=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sgGscdrbRU0K1s1G+QBTQ0vVhF5oyvOiueyELT/dbMibG0ZuHTIJ15oVUOEfUs5yh sr/qyAIc1nMcbSEZoFfwGELnMKx0p3Brv/d+H6RCA7GewmCCBkKkB8NORc8ra+cxZc nQ0I6QrQXF5i0zASkVEKGnhen3KYoc72T9XFQ8D0= Date: Tue, 10 Nov 2020 12:34:17 +0100 From: Greg KH To: Bastien Nocera Cc: Linux PM , linux-usb@vger.kernel.org, Linux Kernel Mailing List , "linux-input@vger.kernel.org" , Hans de Goede , Mario Limonciello Subject: Re: How to enable auto-suspend by default Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 10, 2020 at 11:57:07AM +0100, Bastien Nocera wrote: > Hey, > > systemd has been shipping this script to enable auto-suspend on a > number of USB and PCI devices: > https://github.com/systemd/systemd/blob/master/tools/chromiumos/gen_autosuspend_rules.py > > The problem here is twofold. First, the list of devices is updated from > ChromeOS, and the original list obviously won't be updated by ChromeOS > developers unless a device listed exists in a ChromeBook computer, > which means a number of devices that do support autosuspend aren't > listed. > > The other problem is that this list needs to exist at all, and that it > doesn't seem possible for device driver developers (at various levels > of the stack) to opt-in to auto-suspend when all the variants of the > device (or at least detectable ones) support auto-suspend. A driver can say they support autosuspend today, but I think you are concerned about the devices that are controlled by class-compliant drivers, right? And for those, no, we can't do this in the kernel as there are just too many broken devices out there. As proof of this, look at other operating systems. They had to implement the same type of "allowed devices" list that we do. In fact, we did this for Linux because they did this, which means that when hardware manufacturers test their device, they only test with other operating systems and not Linux and so, we need to match what those other OSes do as well. Sorry, greg k-h