Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Bjorn Helgaas <bjorn@helgaas.com>,
	Vaibhav Gupta <vaibhav.varodek@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Stanislaw Gruszka <stf_xl@wp.pl>,
	Helmut Schaa <helmut.schaa@googlemail.com>,
	Vaibhav Gupta <vaibhavgupta40@gmail.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v1] rt2x00: pci: use generic power management
Date: Sun,  2 Aug 2020 15:14:14 +0000 (UTC)
Message-ID: <20200802151414.A7508C433CA@smtp.codeaurora.org> (raw)
In-Reply-To: <20200717110928.454867-1-vaibhavgupta40@gmail.com>

Vaibhav Gupta <vaibhavgupta40@gmail.com> wrote:

> Drivers using legacy PM have to manage PCI states and device's PM states
> themselves. They also need to take care of configuration registers.
> 
> With improved and powerful support of generic PM, PCI Core takes care of
> above mentioned, device-independent, jobs.
> 
> The callbacks make use of PCI helper functions like
> pci_save/restore_state(), pci_enable/disable_device() and
> pci_set_power_state() to do required operations. In generic mode, they are
> no longer needed.
> 
> Change function parameter in both .suspend() and .resume() to
> "struct device*" type. Use dev_get_drvdata() to get drv data.
> 
> The .suspend() callback is invoking rt2x00lib_suspend() which needs to be
> modified as generic rt2x00pci_suspend() has no pm_message_t type argument,
> passed to it, which is required by it according to its declaration.
> Although this variable remained unused in the function body. Hence, remove
> it from the function definition & declaration.
> 
> rt2x00lib_suspend() is also invoked by rt2x00usb_suspend() and
> rt2x00soc_suspend(). Thus, modify the functional call accordingly in their
> function body.
> 
> Earlier, .suspend() & .resume() were exported and were used by the
> following drivers:
>     - drivers/net/wireless/ralink/rt2x00/rt2400pci.c
>     - drivers/net/wireless/ralink/rt2x00/rt2500pci.c
>     - drivers/net/wireless/ralink/rt2x00/rt2800pci.c
>     - drivers/net/wireless/ralink/rt2x00/rt61pci.c
> 
> Now, we only need to bind "struct dev_pm_ops" variable to
> "struct pci_driver". Thus, make the callbacks static. Declare an
> "extern const struct dev_pm_ops" variable and bind PM callbacks to it. Now,
> export the variable instead and use it in respective drivers.
> 
> Compile-tested only.
> 
> Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>

Patch applied to wireless-drivers-next.git, thanks.

560a218d1ce6 rt2x00: pci: use generic power management

-- 
https://patchwork.kernel.org/patch/11669881/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 11:09 [PATCH v1] ralink/rt2x00: " Vaibhav Gupta
2020-08-02 15:14 ` Kalle Valo [this message]

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=20200802151414.A7508C433CA@smtp.codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=bhelgaas@google.com \
    --cc=bjorn@helgaas.com \
    --cc=davem@davemloft.net \
    --cc=helgaas@kernel.org \
    --cc=helmut.schaa@googlemail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stf_xl@wp.pl \
    --cc=vaibhav.varodek@gmail.com \
    --cc=vaibhavgupta40@gmail.com \
    /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

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git