Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp7000926rdb; Fri, 15 Dec 2023 14:46:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IE45BGDKG7n9J5DPtHXWhBHH00dDcCjzP+wMz1PNrmkAMePGVObjBYRG/ufQtE3PqSdhOKN X-Received: by 2002:a17:902:eccf:b0:1cf:a70f:3a2d with SMTP id a15-20020a170902eccf00b001cfa70f3a2dmr14820296plh.63.1702680398759; Fri, 15 Dec 2023 14:46:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702680398; cv=none; d=google.com; s=arc-20160816; b=tVLsI1brYS046QEXNI8X4TCWigECH5V9VFLkYXw5H2amzYyQpMwEsiwog6bHteE2/j eEwViaxT6qPuMwkhx4MnE1pTC6ofy4dFVFzYFnBpbqM/fMQGBND22mq8gFxMpadIqPoo XEv7DuHDYWr/cMvN2UuJaEo8q6bWhgfWfMpYD4TBcqedkSnEGH5qBLu9BRaTjMXIJ4id P4wOUl3krHfO9b9gg8Pv6PHELYKjA0b/ax91M/eNGTxWT9sLiADrax+ubmn6xYkJZFWR UfEA2fryWpZA2FE+XQva2LoBQshYh3rxkdP96WrhGr7hcwlWG1LiS/6YQwfxpJIwWkkP FUuw== ARC-Message-Signature: i=1; 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; bh=WJu5tSKtN5MJU/0LWsVT43OP4Afvkdotx+bxE18O/Ow=; fh=n7y6rBLc88nEAAWMKEkAFj+EReJPZyUl4UeMEtnpKR0=; b=l3T63GdewD5QNHfek+lZllILslLZb/XoY/PodYJl0NUKLSGIPqjzJPeiEGuy1i1Xij fPVm39mtoU4IKIvQJsZ0aOCUPkCvpKRZ5H74wIfVCfw+Nh8LXOTqYmeN4GydIoBAP0mm g8TWhIVMVqetSXV6QVeaVJKVQwfPcnlDYQ5I6LWEyF30Wm4oW1EQPZs6oQuXf5yLGy1x BtcTaxf+PEQZJDHtSG+0OLE8MlESnWge83TY9cwQZt01EqaYytKCKRHYd/TVjWdLJ2oF b0GzQRbLWtpQl9kDLcQGrBfA6Gy7UO3HUd/EfLJK5F/PlCF2sOMtNVrHLDkfoFFiY1Hi yaVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1787-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1787-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t12-20020a170902a5cc00b001d049eca370si13354228plq.589.2023.12.15.14.46.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 14:46:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1787-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1787-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1787-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 73156284002 for ; Fri, 15 Dec 2023 22:46:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07DC518EC6; Fri, 15 Dec 2023 22:46:28 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id B3A9218EAC for ; Fri, 15 Dec 2023 22:46:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 288613 invoked by uid 1000); 15 Dec 2023 17:46:24 -0500 Date: Fri, 15 Dec 2023 17:46:24 -0500 From: Alan Stern To: Yinghua Yang Cc: gregkh@linuxfoundation.org, zachary.zuzzio@motorolasolutions.com, Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Oliver Neukum , Lukas Bulwahn , Wentong Wu , Sakari Ailus , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH] usb: misc: Add driver for Motorola Solutions security accessories Message-ID: <26c70a69-f18f-4c82-a520-7943be0e1961@rowland.harvard.edu> References: <20231215211218.2313996-1-Yinghua.Yang@motorolasolutions.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: <20231215211218.2313996-1-Yinghua.Yang@motorolasolutions.com> On Fri, Dec 15, 2023 at 03:12:10PM -0600, Yinghua Yang wrote: > New USB driver that sets power/control to autosuspend for Motorola > Solutions security accessories. The new driver only changes the power > control for specific USB devices, normal read/write/ioctl of the usb > device uses the unmodified usbfs. > > The rationale for a vendor specific driver was to allow for autosuspend > behavior on Linux installations that are battery powered and do not > allow user modifications to udev settings (e.g. embedded Linux, Android, > etc.). The idealistic generic approach that would allow any USB device > that supports autosuspend to change the power control could not be found > without a change to the USB standard or substantial change to the usbfs > architecture. > > Signed-off-by: Yinghua Yang > --- It seems silly to write a kernel driver for this. Isn't there any way to handle it in userspace? All you would need is a simple shell script. Alan Stern