Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2901567pxv; Mon, 12 Jul 2021 04:51:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVHbi9NDGxJ8omc7CIvraFPibcaQRynl8VfgN4ZjlxKQiEEiF2IyVg5sXhvbievFZZ0EeR X-Received: by 2002:a50:875d:: with SMTP id 29mr41528999edv.340.1626090688678; Mon, 12 Jul 2021 04:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626090688; cv=none; d=google.com; s=arc-20160816; b=QlW/Qp3vQ2jie2b9ANVLw22rcUvIf6190cxNG6vjPxr00WZwb8Gc+cSmHOfCALJ4Tj Ma/HLOTHOCa8xe6j/AVPwv/l5Uzmga3DgJhiyWv5xBaqc/s8wE6/0J4aCOTwcEpZWhx+ Azj9ViGka8r6UIzokfPDLrYFJuIOcxd6QzAhdIzaBZQEhfMDmR0Fz+H3BWAYYgUIbZ+T zsoHBjPtszTXyvqy1Af7ePjXObh+ovnuNH5o/lsFtP9FIM5Q1hfWBQgC54m7b4HuGR+h AMV4CCKYYxghFFUHmk5qJk+J2bHnl47b4ANzfzlzi8s+i/kC0Z7PaHzpqcPbNWDMXwSF OwBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Gwb+UFDvupyMTvHCfCnXcozHpqrLX2gNz+VQt8hjHo8=; b=e4gWlHEns7T5hNlZnA/L4JLr/JtMzSzTncwZF6fnx8c/jx7oYFVKWtqAB8FglcdJDb 4cP/6tN6ylkwPIyipvmok3b19VAG/nmrKxho9zumIUxEM8baD32BmRT5AuRy6Ow4wQmQ cNRlCu3XeFGMSUF5G+Si3FCUVEPnyFUNiVr+QRgc7vuuasUaiIdmkG5S6XvF1MkXrGbo dlPONR+jprVBfJGNjx3yc09sjvPg2RRcy/C8nBHkb+62wFL3wagfL99tnipvQ7tWov+v XAn736q+O/L97bRFTVzbfy99mwKiiX61eSQCY9Yhp6ohdpPs3MLL1Ae7hIuMvzuaTb8R 2GQg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn9si15888584ejc.136.2021.07.12.04.51.02; Mon, 12 Jul 2021 04:51:28 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232683AbhGLLvN (ORCPT + 99 others); Mon, 12 Jul 2021 07:51:13 -0400 Received: from mga05.intel.com ([192.55.52.43]:65221 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230364AbhGLLvM (ORCPT ); Mon, 12 Jul 2021 07:51:12 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10042"; a="295611062" X-IronPort-AV: E=Sophos;i="5.84,232,1620716400"; d="scan'208";a="295611062" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 04:48:21 -0700 X-IronPort-AV: E=Sophos;i="5.84,232,1620716400"; d="scan'208";a="561721690" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 04:48:18 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1m2uQ0-00CD4d-KB; Mon, 12 Jul 2021 14:48:12 +0300 Date: Mon, 12 Jul 2021 14:48:12 +0300 From: Andy Shevchenko To: Bjorn Helgaas 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: References: <20210708214706.GA1059661@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210708214706.GA1059661@bjorn-Precision-5520> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 08, 2021 at 04:47:06PM -0500, Bjorn Helgaas wrote: > 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. Makes sense (1). > 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, Datasheets are publicly available (at least one may google and find some information about those PCH chips). I have in possession the hardware for gpio-pch. I can easily test that part at least. > 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"))? With regard to (1) probably we may exceptionally accept the fix to gpio-ml-ioh, but I really prefer to do the much more _useful_ job on it by unifying the two. -- With Best Regards, Andy Shevchenko