From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755446AbdLOMBB (ORCPT ); Fri, 15 Dec 2017 07:01:01 -0500 Received: from mga06.intel.com ([134.134.136.31]:5662 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754389AbdLOMA5 (ORCPT ); Fri, 15 Dec 2017 07:00:57 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,404,1508828400"; d="scan'208";a="1893870" Subject: Re: [PATCH V2] ACPI / LPSS: Add device link for CHT SD card dependency on I2C To: Andy Shevchenko , "Rafael J. Wysocki" , Mika Westerberg Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Carlo Caione , Hans de Goede References: <1512637396-17000-1-git-send-email-adrian.hunter@intel.com> <1513261011.7000.75.camel@linux.intel.com> <6618157d-6866-8926-fa6a-40dc4b217ba4@intel.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: Date: Fri, 15 Dec 2017 14:00:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <6618157d-6866-8926-fa6a-40dc4b217ba4@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/12/17 11:10, Adrian Hunter wrote: > On 14/12/17 16:16, Andy Shevchenko wrote: >> On Thu, 2017-12-07 at 11:03 +0200, Adrian Hunter wrote: >>> Some Cherry Trail boards have a dependency between the SDHCI host >>> controller used for SD cards and an external PMIC accessed via I2C. >>> Add a >>> device link between the SDHCI host controller (consumer) and the I2C >>> adapter (supplier). >>> >>> This patch depends on a fix to devices links, namely commit >>> 0ff26c662d5f >>> ("driver core: Fix device link deferred probe"). And also either, >>> commit 126dbc6b49c8 ("PM: i2c-designware-platdrv: Clean up PM handling >>> in >>> probe"), or patch "PM / runtime: Fix handling of suppliers with >>> disabled >>> runtime PM". >>> >> >> Fine with me, though I think below comment worth to address. >> >>> >>> +static const struct x86_cpu_id cht_cpu[] = { >>> + ICPU(INTEL_FAM6_ATOM_AIRMONT), /* Braswell, Cherry >>> Trail */ >>> + {} >>> +}; >> >> I would rather to modify ICPU() macro to accept driver data where we >> just pass an unsigned long value to be assigned as lpss_quirks and >> introduce another quirk. >> >>> + >>> + if (link->cpus && !x86_match_cpu(link->cpus)) >>> + continue; >> >> ...thus, >> >> if (!(lpss_quirks & LPSS_QUIRK_NEED_DEVICE_LINKS)) >> continue; > > The intention is to associate the cpu with the link information i.e. that > link is needed on that cpu. What you are proposing is slightly different. > Spoke with Andy and decided the cpu check could be removed altogether for now, so I will send a V3 shortly.