From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753192AbdLNOQ6 (ORCPT ); Thu, 14 Dec 2017 09:16:58 -0500 Received: from mga12.intel.com ([192.55.52.136]:21728 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752016AbdLNOQy (ORCPT ); Thu, 14 Dec 2017 09:16:54 -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,400,1508828400"; d="scan'208";a="13454291" Message-ID: <1513261011.7000.75.camel@linux.intel.com> Subject: Re: [PATCH V2] ACPI / LPSS: Add device link for CHT SD card dependency on I2C From: Andy Shevchenko To: Adrian Hunter , "Rafael J. Wysocki" , Mika Westerberg Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Carlo Caione , Hans de Goede Date: Thu, 14 Dec 2017 16:16:51 +0200 In-Reply-To: <1512637396-17000-1-git-send-email-adrian.hunter@intel.com> References: <1512637396-17000-1-git-send-email-adrian.hunter@intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- Andy Shevchenko Intel Finland Oy