Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp48653pxv; Thu, 8 Jul 2021 14:48:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFWIv83O5BQSV0B7h2I3g87Z6hfo+0Y9XbxOrGy2Y2Pek4t/tacrD5B9cxDqsdGds3o2Fh X-Received: by 2002:a05:6402:2813:: with SMTP id h19mr40853389ede.39.1625780912095; Thu, 08 Jul 2021 14:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625780912; cv=none; d=google.com; s=arc-20160816; b=pfLwUXyhYilzMLdcbrOvRwsIXGA2oqE7NkcIfNBKo1xyl/vuR2X5kiUGMwV/qWzPxR eIp8pjKcAVBbSRAfrwIA9ymLvNOjY/0KM3O1UeO8p6VywBym1oDdt3q8sOCSV8c7V4mc HSvH4Qs/HsiRF5bDnbCtkL3321qoPwzvQ93Tu5hETT7z5czrhYF8Uq72x6mAGtLF1eUi Z4kfnfVDpsfE2QdxyZ6TiRAoBSKnGADglco63a6EBvH6dwaBD/b2sMjVd9iyvPhhrZwy ax0icbd2ZxmYLHny8zTSy6qmfuU+w0N2eLmwggY/NU0vKBusCI2TpJhCOZ+aWDznPW4h hfwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=+BKGXQT1+8qHaALZLSEKnwjIGrpDlMTGlElm0w391No=; b=pwayPj+TyVcOPiCYmhQDbzv3GFDd0tGn3c4kdZzl5RGxJZXoKUY/Xy18F+stLLKRNY ZRFO4x3AZg/9jJfRQ13kIQCqcIZCGvS8dcv+UQO5WmiF8n+u0LUn4mMOKArMenuEvDdh 0TaiUGQCnV3QcP1n8rxLgeu7j5p3ypIxABvKNhfIp87Jiq0TDujU/E6FIMtBsndZjeEO 7badVyfsf2cF0/6gwa83T7ENHZc6Y0uxki4/9fgrwruu6l3LK9UG2hZB3MJ5tz35rBSa CWrEMzvH0sT2VtKZM4hmjtBLKgHe05Hw2WC+qMUan0MBvptSpJNO/f1+JM39S22VYc+X Wd/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oXC1SpBo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si4433083edt.284.2021.07.08.14.48.09; Thu, 08 Jul 2021 14:48:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oXC1SpBo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231417AbhGHVtu (ORCPT + 99 others); Thu, 8 Jul 2021 17:49:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:41352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231314AbhGHVtu (ORCPT ); Thu, 8 Jul 2021 17:49:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E7F961606; Thu, 8 Jul 2021 21:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625780827; bh=mrhrj7r8a/qXiw0M9WJaa1DCHBkLNSRdzlM6SWlPTKE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=oXC1SpBo1ZihpDDEULeQAk6w2SDXIHgfxJgsYjq252DCnaUUT30xkukiAfUimCtXc BMR4woyeM+Rfd2iwqsrQBBHBN4Z9DEITqKxG6L73lW/gFVxxPEcUCT68YEpg2JXB+l 5VOi6QrEUCacBgxZl/id89uBAGiL0ocodTd01YmA5eLsrCJU/mNOyWJ0tLjMC7K1Pg 9dxITECxLSUyGGlO+GMCKNFMEtJZb4/frXQYucndDj9mSlw/INEpUX10Mial7LAX3D jDRTmyfx1pjrDE/DW8FBsDyLz4bh8FfIkmvrfhvCkDzvocl6CTHRc7bTglGlbBLbwF 5AJBC3yoMdehA== Date: Thu, 8 Jul 2021 16:47:06 -0500 From: Bjorn Helgaas To: Andy Shevchenko Cc: Vaibhav Gupta , linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan , bjorn@helgaas.com, andy@kernel.org, Linus Walleij , Bartosz Golaszewski , "Rafael J. Wysocki" , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH v1] gpio: ml: ioh: Convert to dev_pm_ops Message-ID: <20210708214706.GA1059661@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc linux-pci] On Thu, Apr 02, 2020 at 11:23:27PM +0300, Andy Shevchenko wrote: > On Thu, Apr 2, 2020 at 11:16 PM Bjorn Helgaas wrote: > > On Thu, Apr 02, 2020 at 09:33:46PM +0300, Andy Shevchenko wrote: > > > On Thu, Apr 2, 2020 at 6:52 PM Vaibhav Gupta wrote: > > > > > > > > Convert the legacy callback .suspend() and .resume() > > > > to the generic ones. > > > > > > Thank you for the patch. > > > > > > Rather then doing this I think the best approach is to unify gpio-pch > > > and gpio-ml-ioh together. > > > Under umbrella of the task, the clean ups like above are highly > > > appreciated. > > > > I'd be all in favor of that, but what Vaibhav is working toward is > > eliminating use of legacy PM in PCI drivers. I think unifying drivers > > is really out of scope for that project. > > > > If you'd rather leave gpio-ml-ioh.c alone for now, I suggest that > > Vaibhav move on to other PCI drivers that use legacy PM. If we > > convert all the others away from legacy PM and gpio-ml-ioh.c is the > > only one remaining, then I guess we can revisit this :) > > Then skip this driver for good. > > > Or, maybe converting gpio-ml-ioh.c now, along the lines of > > 226e6b866d74 ("gpio: pch: Convert to dev_pm_ops"), would be one small > > step towards the eventual unification, by making gpio-pch and > > gpio-ml-ioh a little more similar. > > I think it will delay the real work here (very old code motivates > better to get rid of it then semi-fixed one). With respect, I think it is unreasonable to use the fact that gpio-ml-ioh and gpio-pch should be unified to hold up the conversion of gpio-ml-ioh to generic power management. I do not want to skip gpio-ml-ioh for good, because it is one of the few remaining drivers that use the legacy PCI PM interfaces. We are very close to being able to remove a significant amount of ugly code from the PCI core. gpio-ml-ioh and gpio-pch do look quite similar, and no doubt it would be great to unify them. But without datasheets or hardware to test, that's not a trivial task, and I don't think that burden should fall on anyone who wants to make any improvements to these drivers. Another alternative would be to remove legacy PCI PM usage (ioh_gpio_suspend() and ioh_gpio_resume()) from gpio-ml-ioh. That would mean gpio-ml-ioh wouldn't support power management at all, which isn't a good thing, but maybe it would be even more motivation to unify it with gpio-pch (which has already been converted by 226e6b866d74 ("gpio: pch: Convert to dev_pm_ops"))? Bjorn