Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2872659imb; Mon, 4 Mar 2019 16:55:25 -0800 (PST) X-Google-Smtp-Source: AHgI3IYpBRT+ofQzVmU5xXZOk7v8DVf0JdMCSes3JOc8saYjjdqDvM+8cvRws75bjbKmxxlzoYLt X-Received: by 2002:aa7:8a81:: with SMTP id a1mr22733050pfc.246.1551747325844; Mon, 04 Mar 2019 16:55:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551747325; cv=none; d=google.com; s=arc-20160816; b=DgIDb2gxiBvp1oHmonevzwHU6YowTngepP4WbAtDXcWMIc3zJAX3AzW9DaB2AcGGwF SvTOJtE3ak2+rlAMbsBTpVW/AQMsHj9kR5FHeYdL5+/5HsDqZOuhwA122+AvlTZLU22d cFZP1tqCnKGygc6Ghi+vUN3YlrQx2tsf9Bh2kovD0cwlM7My7LQObM6cwanKRf1VlS8O WZbaA4QLN9DmWCPk1o7/wavh2lJgw718UWwRgec9SsDufXhTAaYwlz5B8i3mf3T+kcG3 HaWjZZ8UHLx5ESt7x+Ulw1tODnDssrXNPo65sh7G0tiaiJbecOC3pWBqnf3JWgvnylC8 gNBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uXNLc6F0UiYjfZcRt3SiykY+FnlXWp8zrd0IEyVbGiI=; b=NZ8uIiXjaVo3Ch/Oq+9cTq822KZD2nSLkQJ+DNcgjJlHOGDVVyX0N3/EN1k3qrZo1U JZj5CTVL17OevbTe8h2EI0U6oxGQiT4SwlVzWoM9ZPsQ+q1lpECOTdE5nbhyUcIIVlYT ukrFdN680o1Vz+/SWaLySIT36iVCh84P4LEo/TnHD9G2BD2IHsobGjT6dTt/1qfQykIk D0V43buIsI6cb+Gx0P5Iiibz37YPATsGKUkBvXDiOC1aGXzXTm7WoP6jzx38KdDHpSAW fJ955jikgXETFE/bL7UDP/jeccsxdWRAxVFjSQCxU8LWsO0YylnsoV2+XkcRHccD2Io3 HNsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JIIfx6d5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 134si6847101pfz.274.2019.03.04.16.55.10; Mon, 04 Mar 2019 16:55:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JIIfx6d5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726895AbfCEAx5 (ORCPT + 99 others); Mon, 4 Mar 2019 19:53:57 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:33965 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726096AbfCEAx5 (ORCPT ); Mon, 4 Mar 2019 19:53:57 -0500 Received: by mail-ot1-f68.google.com with SMTP id 98so5984342oty.1 for ; Mon, 04 Mar 2019 16:53:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uXNLc6F0UiYjfZcRt3SiykY+FnlXWp8zrd0IEyVbGiI=; b=JIIfx6d5jU0HVabG0/g0ik1Fe7QSg+9fGC07k5C6VRy0q1yecBDje6+CPuHLvvRNfU XmOvRGbXGAIoEnRpU0yB9iNcJe9K0mD5Jnqi0q8QDN+p7gV5zMJsgqd34+ztj+5QRHjI McXf+NiYMqtTaGXGWnqB9k9sNjB0yDLZi4J70= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uXNLc6F0UiYjfZcRt3SiykY+FnlXWp8zrd0IEyVbGiI=; b=eGTyS1tvRfcFGPRqZ6deMDyHVBnxPNb2e9zZdDBOfFJdGzXJyf9PtuB/r6i+5rCF9t g7GkhJAVfVGCnSib/Z4bjd+41P8ltDQimb5HZu6DgrDSs5gpQo+EqoO8mN5g68YziAWx zL0SWHKeQ5Bk3yOtUOe3Mxk/DhnEsARuUFym4HwZhT3+9nH9otxhIidLqeub2FhG/H6g GzKq1vinDjmI7IbMuFoe+VuNP/P86N8s5nbMRnLYVkQlEhR6iN8qUW57OwEDJPGIAgeD mYNdckkzsp0Q4yUOgys8ZWIDuqt2DDO7/S19QXFlhGwJ3J7dzfZ2tsZ6k4ITioa6ZS4X yrVw== X-Gm-Message-State: APjAAAVaAQjbTJ/ICVKOEnzyR3T3p/B1ZRYaF74xwfD5EdNk09D0wLxS ACFw/lQ+zAN99vrkTBxtyJjYvf65hHg= X-Received: by 2002:a9d:1991:: with SMTP id k17mr14574180otk.20.1551747235557; Mon, 04 Mar 2019 16:53:55 -0800 (PST) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com. [209.85.167.182]) by smtp.gmail.com with ESMTPSA id q6sm3029092oia.4.2019.03.04.16.53.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2019 16:53:54 -0800 (PST) Received: by mail-oi1-f182.google.com with SMTP id t206so5481363oib.3 for ; Mon, 04 Mar 2019 16:53:53 -0800 (PST) X-Received: by 2002:aca:d803:: with SMTP id p3mr372933oig.111.1551747233600; Mon, 04 Mar 2019 16:53:53 -0800 (PST) MIME-Version: 1.0 References: <20190304200719.1382717-1-arnd@arndb.de> In-Reply-To: <20190304200719.1382717-1-arnd@arndb.de> From: Nick Crews Date: Mon, 4 Mar 2019 17:53:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] platform/chrome: fix wilco-ec dependencies To: Arnd Bergmann Cc: Benson Leung , Enric Balletbo i Serra , Duncan Laurie , Wei Yongjun , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 4, 2019 at 1:06 PM Arnd Bergmann wrote: > > When CROS_EC_LPC is set to =m, we get a link failure for a > builtin wilco-ec module: > > drivers/platform/chrome/wilco_ec/core.o: In function `wilco_ec_remove': > core.c:(.text+0x26): undefined reference to `cros_ec_lpc_mec_destroy' > drivers/platform/chrome/wilco_ec/core.o: In function `wilco_ec_probe': > core.c:(.text+0x18c): undefined reference to `cros_ec_lpc_mec_init' > core.c:(.text+0x224): undefined reference to `cros_ec_lpc_mec_destroy' > drivers/platform/chrome/wilco_ec/mailbox.o: In function `wilco_ec_mailbox': > mailbox.c:(.text+0x104): undefined reference to `cros_ec_lpc_io_bytes_mec' > > The problem with the existing CROS_EC_LPC_MEC dependency is that this > is only for a 'bool' symbol, so the information about the exported > functions being in a module is lost on the way, and we actually have > to depend on both CROS_EC_LPC and CROS_EC_LPC_MEC. Thanks for the catch Arnd. This looks like a workable solution, although it brings up a different question to me: Is it weird for a bool option (such as CROS_EC_LPC_MEC) to depend upon a tristate option (such as CROS_EC_LPC)? It seems like CROS_EC_LPC_MEC should be tristate as well. Would changing this be a better solution? > > Fixes: 7b3d4f44abf0 ("platform/chrome: Add new driver for Wilco EC") > Signed-off-by: Arnd Bergmann > --- > drivers/platform/chrome/wilco_ec/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/chrome/wilco_ec/Kconfig b/drivers/platform/chrome/wilco_ec/Kconfig > index 4a119ced4d0c..e09e4cebe9b4 100644 > --- a/drivers/platform/chrome/wilco_ec/Kconfig > +++ b/drivers/platform/chrome/wilco_ec/Kconfig > @@ -1,6 +1,6 @@ > config WILCO_EC > tristate "ChromeOS Wilco Embedded Controller" > - depends on ACPI && X86 && CROS_EC_LPC_MEC > + depends on ACPI && X86 && CROS_EC_LPC && CROS_EC_LPC_MEC > help > If you say Y here, you get support for talking to the ChromeOS > Wilco EC over an eSPI bus. This uses a simple byte-level protocol > -- > 2.20.0 >