All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vaibhav Gupta <vaibhavgupta40@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Bjorn Helgaas <bjorn@helgaas.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Bjorn Helgaas <helgaas@kernel.org>,
	linux-usb@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: generic power management for USB subsystem similar to PCI one?
Date: Tue, 21 Jul 2020 21:23:14 +0530	[thread overview]
Message-ID: <20200721155314.GA395319@gmail.com> (raw)

Hello,
Currently I am working on removing legacy power management .suspend() and
.resume() callbacks from PCI subsystem. The updates aim to give power management
control to PCI core and let drivers do the only device-specific jobs without
using any PCI helper functions.

I was wondering if similar changes can be applied to the USB subsystem?
I explored and found that .suspend() in USB drivers also accept the pm_message_t
type argument.
Also, .suspend() and .resume() in usb drivers, accept "struct usb_interface *"
type argument which seems similar to PCI legacy drivers accepting
"struct pci_dev*" type.

Moreover, "struct usb_device_driver" seems analogous to "struct pci_driver" as
it also has .suspend() and .resume() callback. Also, it has a bitfield
"generic_subclass:1" which is described as, " @generic_subclass: if set to 1,
the generic USB driver's probe, disconnect, resume and suspend functions will be
called in addition to the driver's own, so this part of the setup does not need
to be replicated. "

So the generic PM, talked about in USB drivers, is similar to PCI one? The
non-generic PM in USB is similar to legacy PM in PCI?

A similar update for the USB subsystem is possible?

--Vaibhav Gupta

             reply	other threads:[~2020-07-21 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 15:53 Vaibhav Gupta [this message]
2020-07-21 16:27 ` generic power management for USB subsystem similar to PCI one? Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200721155314.GA395319@gmail.com \
    --to=vaibhavgupta40@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn@helgaas.com \
    --cc=helgaas@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.