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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 26ECBC43613 for ; Thu, 20 Jun 2019 14:43:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 050302083B for ; Thu, 20 Jun 2019 14:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbfFTOnV (ORCPT ); Thu, 20 Jun 2019 10:43:21 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:44388 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726428AbfFTOnV (ORCPT ); Thu, 20 Jun 2019 10:43:21 -0400 Received: (qmail 2188 invoked by uid 2102); 20 Jun 2019 10:43:20 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Jun 2019 10:43:20 -0400 Date: Thu, 20 Jun 2019 10:43:20 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Mayuresh Kulkarni cc: Oliver Neukum , Greg KH , , Subject: Re: [PATCH] usb: core: devio: add ioctls for suspend and resume In-Reply-To: <1561041295.20348.4.camel@opensource.cirrus.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Thu, 20 Jun 2019, Mayuresh Kulkarni wrote: > > It would be easiest to export the usb_autopm_* API to user space. > > AFAIU, usb_autopm_* API operate on interface rather than on device. > Due to this, they are *indirectly* exposed by appropriate class drivers > to the user-space class drivers cater to. E.g.: USB audio class driver > calls usb_autopm_* APIs when user space calls pcm_open(playback_stream). In fact, the usb_autopm_* API can operate both on interfaces and on devices. It is used both ways in the kernel. Alan Stern