Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp974392ybt; Wed, 17 Jun 2020 19:36:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPvUvnIWTa/dNhqgSDyTMq26nQUJu1j+zVWSKr+soc2QfII+cAQt3zyG+tCNxwaPsaNYpY X-Received: by 2002:a05:6402:1153:: with SMTP id g19mr1932118edw.127.1592447770614; Wed, 17 Jun 2020 19:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592447770; cv=none; d=google.com; s=arc-20160816; b=UYC1vZ+hGXEN+Y9HTdCoRmOota3tgs8PXk3cJt+xBma75Igp53i//cWT3AWPf5RnQL uEoM2xx3pLSpGQAYmBYg+AwbUEto0kLkMw6+XnWgm/EkFCM6xCPw9oxAE8tAqqIE8L9p GMrokAt9qWK0Han3IWl2/yUdQ/b4hhZDL5J+nP0Oyyr287KN8dOO5CCq0ncMMGFavRnQ FOWqJ+O8OLmxQhzMFiuAx1rSs900TS9fLSz8RkDzNJL6cRrwZ8iUbGCHZACl1mx1pFe6 zHY5tU+T/g7WerVZoIDgCQZkoLsDUxGRSvPib8mm6bI/VvlWbozH51zJE0n5sQfxMxOu dpVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=N6N0zK0C7iIRis+mzVWSZ+sDWoWZIH+1U/lpoEx/CWg=; b=sd8GJMU91DnXiZc3i7BCxUPvujXPkwStSUTn9TCuofw0kiSwtyYiJcZDz9kR0dBa5x f7pj/bcOZQmgOZ8Ctqjdi1u22gPEiGyyCl49eJjY7pX1ndEjosOCcdOjfGFh7g1YoVFX Zx7t/1UasjTMIqCSUeygFD3dmr8GEr/+t+b+ubaIhIT3zzKw43NviH453q/XuAA1Fatx 77ods1gtngiuL0Rihf41OG76Nu/6tIAn/8mUcY1TUqVEiz7LdyOxkIFmDrA/ZFliTW90 9QUFvGqWdvWnNkV9h9eRplPJiyb6gO4NluCSPacJ2Fj4S2AmazKZTR0Uog43Sa8sioGK KvOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LszBUIfv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm27si1026089edb.308.2020.06.17.19.35.48; Wed, 17 Jun 2020 19:36:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LszBUIfv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729578AbgFRCeJ (ORCPT + 99 others); Wed, 17 Jun 2020 22:34:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:44274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728278AbgFRBOf (ORCPT ); Wed, 17 Jun 2020 21:14:35 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B230221D7E; Thu, 18 Jun 2020 01:14:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592442874; bh=IgxoX0dS7tQSm492V5SCVu1eGtYviV5OFE6vUo6NCXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LszBUIfvimymPLQXwwylFVUcDTKosxudXH54mAbhkfHvPzTgyc69iinRO/gIYhsQO FGE7U6m5HfhFxUD4b8tBuacK+UBcmM3JRHlTpPKmoVlxJLWpEzh/KzIgxFF8n4ReyU p2ccx/D6lG3SV6IqMvdL4mZYSKnnnEuIe+IE2bL8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Sasha Levin , linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.7 300/388] ARM: davinci: fix build failure without I2C Date: Wed, 17 Jun 2020 21:06:37 -0400 Message-Id: <20200618010805.600873-300-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200618010805.600873-1-sashal@kernel.org> References: <20200618010805.600873-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 147922f91965e734664374a3f226adfeaa586d72 ] The two supplies are referenced outside of #ifdef CONFIG_I2C but defined inside, which breaks the build if that is not built-in: mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v' ARRAY_SIZE(fixed_supplies_1_8v), 1800000); ^ mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v' mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v' mach-davinci/board-dm644x-evm.c:860:49: error: use of undeclared identifier 'fixed_supplies_1_8v' regulator_register_always_on(0, "fixed-dummy", fixed_supplies_1_8v, I don't know if the regulators are used anywhere without I2C, but always registering them seems to be the safe choice here. On a related note, it might be best to also deal with CONFIG_I2C=m across the file, unless this is going to be moved to DT and removed really soon anyway. Link: https://lore.kernel.org/r/20200527133746.643895-1-arnd@arndb.de Fixes: 5e06d19694a4 ("ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33") Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/mach-davinci/board-dm644x-evm.c | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 3461d12bbfc0..a5d3708fedf6 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -655,19 +655,6 @@ static struct i2c_board_info __initdata i2c_info[] = { }, }; -/* Fixed regulator support */ -static struct regulator_consumer_supply fixed_supplies_3_3v[] = { - /* Baseboard 3.3V: 5V -> TPS54310PWP -> 3.3V */ - REGULATOR_SUPPLY("AVDD", "1-001b"), - REGULATOR_SUPPLY("DRVDD", "1-001b"), -}; - -static struct regulator_consumer_supply fixed_supplies_1_8v[] = { - /* Baseboard 1.8V: 5V -> TPS54310PWP -> 1.8V */ - REGULATOR_SUPPLY("IOVDD", "1-001b"), - REGULATOR_SUPPLY("DVDD", "1-001b"), -}; - #define DM644X_I2C_SDA_PIN GPIO_TO_PIN(2, 12) #define DM644X_I2C_SCL_PIN GPIO_TO_PIN(2, 11) @@ -700,6 +687,19 @@ static void __init evm_init_i2c(void) } #endif +/* Fixed regulator support */ +static struct regulator_consumer_supply fixed_supplies_3_3v[] = { + /* Baseboard 3.3V: 5V -> TPS54310PWP -> 3.3V */ + REGULATOR_SUPPLY("AVDD", "1-001b"), + REGULATOR_SUPPLY("DRVDD", "1-001b"), +}; + +static struct regulator_consumer_supply fixed_supplies_1_8v[] = { + /* Baseboard 1.8V: 5V -> TPS54310PWP -> 1.8V */ + REGULATOR_SUPPLY("IOVDD", "1-001b"), + REGULATOR_SUPPLY("DVDD", "1-001b"), +}; + #define VENC_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) /* venc standard timings */ -- 2.25.1