From patchwork Tue Jun 23 19:54:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 191609 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp1370956ecs; Tue, 23 Jun 2020 14:31:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaOeShzlM0dtoFqZTWYtixt3vRkUGksyf1CE89fqEOvKT5UJ2174z7BbAmkoCy76LdiEGm X-Received: by 2002:a17:906:da02:: with SMTP id fi2mr23035103ejb.41.1592947885907; Tue, 23 Jun 2020 14:31:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592947885; cv=none; d=google.com; s=arc-20160816; b=R91VJd+cqvliyXfKZEh/4cIkoi2Esheqfabo9Ziqcn3PWo1cJyey4DoquXoMqdvuEm 1/BM67MIg7nILySgKN2HqezC+UWA6OKg/vP3dn3ic41r2pHqTxFELbQc1wW/WkZwIH6a 8rQ02kUwZ7yxoKt+BYsXRuzA8MBCA4JRwMQxCp9PF0h8SWD2MHmpotQ3UXy+ijNmDkQg XPeWNcZVB3bKsSS/xwxtpTFrF2b+UFc3gtkhJjb8vsZRhwmak5zP5dsYLG9Ln4qTR1ZR LVG3Ulwxj7LxeadT8F40p101uk29KM3FxnMbg9ClILwF8lV6y9s58pZxD+Ag+vGeYhpW 3ccw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YfY/856XmgxBCX064exqmJPoWl+hynbbL1X+FD0MLmw=; b=Ot+h0bfITzc/DQ96WK9BvSTW1sxEfOxpNd5BS83yMOhuc0LndZ445kDcYFP9cFyd2N 67W8fMEBjqJawr/J5LCXDoEk6yhWeFibHPftypxcKKULT94PFwATh7bgCy3Bv4Kvqc5E pObUFfzT+Na98K8iXeSumRXr+ptpadvINhI/DXwewiYAF19KIxhnLGuUnJ86nouTw9Ar O//t2hgQrg0Xe1lTU5kUGVd7F6ToPUJPTqlmVKJ2YEhvsg6yRmx5qUBepEuxhL9tMUm0 TyiHSGVyfHgTXetyvH3qwB0XMTdCmJH3MXKSy3DKqKNjD6MJOqQWOZjrj8BVkXZraPml sicA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BHL06DaN; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp9si15150364ejc.698.2020.06.23.14.31.25; Tue, 23 Jun 2020 14:31:25 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=BHL06DaN; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389040AbgFWUNI (ORCPT + 15 others); Tue, 23 Jun 2020 16:13:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:55106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389049AbgFWUNH (ORCPT ); Tue, 23 Jun 2020 16:13:07 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C86B420707; Tue, 23 Jun 2020 20:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592943187; bh=B0id1YkkA7LsTGMEM52mppY4qjPCaA8/sPXyQiEZOlk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BHL06DaNLrMwhYSQHoGpoWVAZ6+Ni7/ICnm9eGvBY1CXzeWsmNogTC+nXB5A32pVe Hf3OvboPB0ZJKnbjtcPqsVfWb5A+nOuPYGIlycB+hjmEsDhTbVqlfdku3ZI3c9mgrE uuaZ6EU7TWyz7vYPcaEMBUWgxz3ZRA3bTL4Jg2kw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Sasha Levin Subject: [PATCH 5.7 293/477] ARM: davinci: fix build failure without I2C Date: Tue, 23 Jun 2020 21:54:50 +0200 Message-Id: <20200623195421.408089839@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195407.572062007@linuxfoundation.org> References: <20200623195407.572062007@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.25.1 diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 3461d12bbfc06..a5d3708fedf68 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 */