From patchwork Mon Nov 14 13:03:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 694511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tHW0h2SKdz9t0J for ; Tue, 15 Nov 2016 00:03:16 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="BXTwHdr3"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932261AbcKNNDO (ORCPT ); Mon, 14 Nov 2016 08:03:14 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:36437 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932203AbcKNNDN (ORCPT ); Mon, 14 Nov 2016 08:03:13 -0500 Received: by mail-lf0-f45.google.com with SMTP id t196so57710479lff.3 for ; Mon, 14 Nov 2016 05:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=VzOi7Nvd6ZaIq/pGG7h715UqdliC3gFRaLtIx0Yd17E=; b=BXTwHdr3ohlOy/YyzpNYT9AFOiwBfwZo48wOK8OvyauWbPNMom7xCYV9juvNIKyvDE wxSO9D55ed/d0izK3W0paWVHnVZWN2uXCEbDH3FsVtz4+5JGsjh5I4BxhC5+cFdmksa6 AWaleARsZcQGQS8NeC7j/HSzCOzvkyGCSPq2g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VzOi7Nvd6ZaIq/pGG7h715UqdliC3gFRaLtIx0Yd17E=; b=QrKJwVKJ8ZW4vDdjsQrsxbC6aa/TYkspe4EPeeoyqUNDipIMHymFrWXcyHbvP7ITHh f7QHgatCPliHhfB2Y5l7sfruLcGvniYnijZvuaK12pdTOK9XKhH5AVllIXCpa6jb6qCj cyef6FpPLuykskOa28fuFMrjtQPk2zw+SrDmPklWXvtJrMncDOYyFxLGYXOb1mqtvCOR 1iNQ9CUjIh/RpWJQByEMBbkXlk/P0m5HXJSd2gzoxjl+fohNQRVi3uUzuhYq4y/n0NxS mNAwKIfTh+FvF8Ajrpkb99jWl8NyZA023N8f1QhLMbVKSbhr576KqbrluqoRCvpFNH3W SC/Q== X-Gm-Message-State: ABUngvdSDxajBdqqlGJABtdrsSVwds4WP4+QRV+na0T8sEmN5xk8Noq+ZDZ06mO7rcdOxnyu X-Received: by 10.25.159.78 with SMTP id i75mr8228010lfe.123.1479128591941; Mon, 14 Nov 2016 05:03:11 -0800 (PST) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id z26sm5010588lja.49.2016.11.14.05.03.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2016 05:03:11 -0800 (PST) From: Linus Walleij To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: Linus Walleij , stable@vger.kernel.org, Jonathan Cameron , Peter Rosin Subject: [PATCH] i2c: mux: fix up dependencies Date: Mon, 14 Nov 2016 14:03:06 +0100 Message-Id: <1479128586-17052-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org We get the following build error from UM Linux after adding an entry to drivers/iio/gyro/Kconfig that issues "select I2C_MUX": ERROR: "devm_ioremap_resource" [drivers/i2c/muxes/i2c-mux-reg.ko] undefined! ERROR: "of_address_to_resource" [drivers/i2c/muxes/i2c-mux-reg.ko] undefined! It appears that the I2C mux core code actually only requires CONFIG_OF, but depends on HAS_IOMEM for historical reasons, while CONFIG_I2C_MUX_REG does *not* have a direct dependency on HAS_IOMEM. This creates a situation where a allyesconfig or allmodconfig for UM Linux will select I2C_MUX, and will implicitly enable I2C_MUX_REG as well, and the compilation will fail for the register driver. Fix this up by making I2C_MUX_REG depend on HAS_IOMEM and the I2C_MUX depend on OF. Cc: stable@vger.kernel.org Reported-by: kbuild test robot Reported-by: Jonathan Cameron Cc: Jonathan Cameron Cc: Peter Rosin Signed-off-by: Linus Walleij --- drivers/i2c/Kconfig | 2 +- drivers/i2c/muxes/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index d223650a97e4..b9e378cfe1d1 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -59,7 +59,7 @@ config I2C_CHARDEV config I2C_MUX tristate "I2C bus multiplexing support" - depends on HAS_IOMEM + depends on OF help Say Y here if you want the I2C core to support the ability to handle multiplexed I2C bus topologies, by presenting each diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index e280c8ecc0b5..96de9ce5669b 100644 --- a/drivers/i2c/muxes/Kconfig +++ b/drivers/i2c/muxes/Kconfig @@ -63,6 +63,7 @@ config I2C_MUX_PINCTRL config I2C_MUX_REG tristate "Register-based I2C multiplexer" + depends on HAS_IOMEM help If you say yes to this option, support will be included for a register based I2C multiplexer. This driver provides access to