Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796319844; b=202CzKAVfhpXOvvLe9TNpYTJwm+WGp9uY5QyqrFEWfqojwlL6jFn06fu8e0/Eezb3nny p32Vy6cmPD/JcGQiFw9aPWdx/TUoOlJwBzYv5Y+yTOrzdK+2wpjnxAzXvs6ebKGnoiVfG wtvC4UlcwQJpKHSpei+AhmNvFuE7DLpbN4lcQmMYWAiFWih4yxfiOycm/mTBj+smS0rye UXqGAZJj8SvU00Gb3JtydGD7uKmE2oxs+ZqNLNMQzKvhr6nMVWniI0fdqxEqVr2JRm9ny 3T/nakLtdNa6jwRJD6Xwq9kgnEO3mKO538hRMOwsqjUC9tOFx2K0hdC2tGIcnp81gsQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796319844; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To: Organization; bh=1MJVKRffHEbc+UAh88Nv1hw90HVFo+txKY2+fEs/vwg=; b=cKq6kUp7Nn5fk33VHpkhUVeEimBTO7xtiTSZMFXUPGGvW7sWT5MYk1CWNMPpBky/dKwA ILmSORSKoYXq55pHidURCZ5v9LMdkUeVfF2oteiCEuq+fQaA1ENUpdiI6EYxIxLO5owSH f6KTEISVHx3pGBAUtMPt7ImvCoUdy+hoDev8bHjWXPugFB289qhnbVcqI8o2m01MxQCTo 4VU/3u0UYzJe4YwPlWCy0NkyCeFDq742+c7TQfbfNg1wgnGJBjjwJ1mBX7xC220w1ghA3 6oz0X45c1EiVhNYvBORvwRYwcC49JFDedjPPCy+N9ZMeBznCJ5xJMeYa//cYA7/eb2A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eo+hI+l7; arc=none smtp.remote-ip=198.175.65.18 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41093606A322; Thu, 3 Dec 2026 17:44:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 41093606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eo+hI+l7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796319844; x=1827855844; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=1MJVKRffHEbc+UAh88Nv1hw90HVFo+txKY2+fEs/vwg=; b=eo+hI+l7WO7biZJ/0Oo5DHzLbs4p6A3kGgePj1LLJrI/LZFt+qXvT49A S0611SnuJunVCIBNBqSaC8GNfAsIPqg2TEYVzNZTQEaKHgSvqk+8lhk3L 5eLQjBf2msJi6w8xhKCYA6mQ8Ig6xHoOud64F1VZpP1KieLxdKGJJe2ZT dvNSMyUgXpWU68PD20pLdyIJsos2yF4FpHFJSkb+DJi/BnTpkpgQmAXly jNgwiqWiHJgoFS8nMAfdCSUtrjAqDG96u4cehRJAPPY1A59dpZVRHPZlF MudA3N9TLBUV5ClY/9uGvyg48RoI2/EUulRPn5TOd6Aa3SOtcGl16ZA+E A==; X-CSE-ConnectionGUID: 8FeD8HzURKyuO4qLILhOFw== X-CSE-MsgGUID: /SmH5RzyRtKqE6PWDj2otw== X-IronPort-AV: E=McAfee;i="6800,10657,11985"; a="5307722" X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="5307722" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 09:44:03 -0800 X-CSE-ConnectionGUID: IZ9hLI7GTmCFR3B60+ZWEQ== X-CSE-MsgGUID: U6TG5IZ+SHevB5AlbjURlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="13940740" Received: from inaky-mobl1.amr.corp.intel.com (HELO localhost) ([10.245.244.115]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 09:44:01 -0800 Date: Thu, 3 Dec 2026 19:43:58 +0200 From: Andy Shevchenko To: "Shih-Yuan Lee (FourDollars)" Cc: Mark Brown , Mika Westerberg , Lukas Wunner , Daniel Mack , Haojian Zhuang , Robert Jarzmik , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v17 5/6] spi: pxa2xx-pci: restore LPSS private register state across S3 resume Message-ID: References: <20260930160629.1822-1-fourdollars@debian.org> <20260930160629.1822-6-fourdollars@debian.org> X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Wed, Dec 02, 2026 at 08:00:23PM +0800, Shih-Yuan Lee (FourDollars) wrote: > On Thu, Oct 1, 2026 at 3:20 PM Andy Shevchenko > wrote: > > On Thu, Oct 01, 2026 at 12:06:28AM +0800, Shih-Yuan Lee wrote: ... > > No, as I told earlier please find a way how to not add a code duplication. > > Agreed — I will avoid duplicating the LPSS private register save/restore > logic in v18. > > As noted in my reply to Mika, on MacBook8,1 (Wildcat Point-LP) the > controller at 00:15.4 [8086:9ce6] is enumerated as an independent PCI > function rather than via intel-lpss-pci, and drivers/acpi/x86/lpss.c > also skips its ACPI companion (\_SB_.PCI0.SPI1 / INT33C1) because it > uses PCI BAR0 on pci_bus_type. Yes, I have just read that. > For v18, I am preparing a prerequisite patch that extracts the common > LPSS private register definitions (LPSS_RESETS*, LPSS_PRV_REG_COUNT) and > helpers (lpss_deassert_reset(), lpss_save_ctx(), lpss_restore_ctx()) > from drivers/acpi/x86/lpss.c into include/linux/platform_data/x86/lpss.h, > so both drivers/acpi/x86/lpss.c and drivers/spi/spi-pxa2xx-pci.c share > the exact same implementation without duplication. At least it sounds better than v17 approach. Let's see v18 how it will look like. > Would extracting these helpers into be > acceptable, or would you prefer unifying the PCI-mode LPT/WPT LPSS > save/restore at the PCI PM layer (similar to drivers/pci/pci-mid.c)? Maybe. Let's research your v18 approach first and then we can see if further improvements are possible. > (Also, for the other patches in the series: I have dropped Patch 2 > entirely as you and Mark suggested, fixed the probe ordering in Patch 3, > and applied your style cleanups to Patch 1.) OK. -- With Best Regards, Andy Shevchenko