From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F325B286417 for ; Tue, 17 Feb 2026 15:55:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771343727; cv=none; b=QnN0xlPZ/qvh6NBMqB5C16sfUCu32XmodwTNK4UOeGPmGBxJYP/vT3lJP41ATQZb36FsazfUqZByHXERqaODcowNo/rF75sf3Dy2/jzciPULSCkTb8V+jY23t3+QI91HbP4OcOlFVu5zAyy5W8fj9FUEXC3Tl+M5dqB2QyZBe0k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771343727; c=relaxed/simple; bh=L35H+GtnkTeyAXIt5VKWZipstf0JFx3wlvaCD9nuMjc=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=AjpRP4DB+Nb73SkR2e2VyTMXMclhwmlmmQgoF45EVQasUm7I8N+XhHi2LqhxNcRrmkCROfTxrvPcOcf+2CaaULYl4jBzpK287QStGbXEmGkE59U2Ymt4PE5lkaqdSbY58jEzd51Dgu8Xjeo9ZM8BJL3KsENfQPRUt6iCFQPTw7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hHeAwEQh; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hHeAwEQh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76C1DC4CEF7; Tue, 17 Feb 2026 15:55:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771343726; bh=L35H+GtnkTeyAXIt5VKWZipstf0JFx3wlvaCD9nuMjc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=hHeAwEQh5pggpZi66sbFrursUDExIHmjWVEl22QsQLdKORuAtxb7kgVW1D0u/UW1O Qq+pSU/KRGwGSQNstMk9cyjQYSzwMBBZwr7eBPxF4pKe0RQA6Looii+F2dM8yvYbKI rmyqW1w52d48uucOwHQrbTlBD0dlYpVyLmfYx13AjLt7I5DHYoAl8Cfukq2hthY1Fp cp5GhuBhzbEnRsR5KPJQ3Tqq/9DV1QfOcHIEoK6V4LuUlCwKTmQf5wu8JVjO86mUM/ wZerxaiKWTvEXH6PQRFyY9Rnh8eb2nIOQI2OKRUE2FlEb7jeHOcXBTj9A99dOuJyTo 1v4tVut66hKxw== Date: Tue, 17 Feb 2026 09:55:25 -0600 From: Bjorn Helgaas To: Vaibhav Gupta Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Bjorn Helgaas , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] mtd: rawnand: cafe: Use generic power management' Message-ID: <20260217155525.GA3377374@bhelgaas> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260216090415.675368-1-vaibhavgupta40@gmail.com> On Mon, Feb 16, 2026 at 09:02:44AM +0000, Vaibhav Gupta wrote: > Switch to the generic PCI power management framework and remove legacy > callbacks like .resume(). With the generic framework, the standard PCI > related work like: > - pci_save/restore_state() > - pci_enable/disable_device() > - pci_set_power_state() > is handled by the PCI core. > > This driver should implement only cafe_nand specific operations in its > callback function for resume. Looks good to me, thanks for doing this! I think the commit log is a bit overly specific since this driver never did any of the PCI-related work it mentions. IMO something like this would be sufficient: Switch from PCI power management to the generic power management framework so the pci_driver hooks can eventually be retired. Reviewed-by: Bjorn Helgaas > Signed-off-by: Vaibhav Gupta > --- > drivers/mtd/nand/raw/cafe_nand.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c > index 66385c4fb994..af771c379ec1 100644 > --- a/drivers/mtd/nand/raw/cafe_nand.c > +++ b/drivers/mtd/nand/raw/cafe_nand.c > @@ -837,9 +837,10 @@ static const struct pci_device_id cafe_nand_tbl[] = { > > MODULE_DEVICE_TABLE(pci, cafe_nand_tbl); > > -static int cafe_nand_resume(struct pci_dev *pdev) > +static int cafe_nand_resume(struct device *dev) > { > uint32_t ctrl; > + struct pci_dev *pdev = to_pci_dev(dev); > struct mtd_info *mtd = pci_get_drvdata(pdev); > struct nand_chip *chip = mtd_to_nand(mtd); > struct cafe_priv *cafe = nand_get_controller_data(chip); > @@ -877,12 +878,14 @@ static int cafe_nand_resume(struct pci_dev *pdev) > return 0; > } > > +static DEFINE_SIMPLE_DEV_PM_OPS(cafe_nand_ops, NULL, cafe_nand_resume); > + > static struct pci_driver cafe_nand_pci_driver = { > .name = "CAFÉ NAND", > .id_table = cafe_nand_tbl, > .probe = cafe_nand_probe, > .remove = cafe_nand_remove, > - .resume = cafe_nand_resume, > + .driver.pm = &cafe_nand_ops, > }; > > module_pci_driver(cafe_nand_pci_driver); > -- > 2.53.0 >