Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1140333ybg; Tue, 2 Jun 2020 02:21:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqUxeBOZVZqXA2m9uK3WsRylgg4x8VEBZip3Z66FktPj/RlJmiIK7UjWgGuCvNeNl+Z+Ue X-Received: by 2002:a17:906:651:: with SMTP id t17mr23758516ejb.394.1591089668107; Tue, 02 Jun 2020 02:21:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591089668; cv=none; d=google.com; s=arc-20160816; b=PMBHHRzlpvcM1Ae6wnmMPmcK1Wp5UsrtULPewrElPfwofVPEqknjgKwgl/SvvKFxJY OPJBMBKTmrZm/kQ91NZYm+189z7mZsxH7SmMrft1fb4c2qP32GpXt8pm8JywLTgS0e33 juCUZazKIlRLrJDGhwmwH0lWZrQnEl299MtySHAFNgik6ITgcHgYLoR1nRK1khb8Msdd mOL6S4BfmIZLM1gESr/RnakdrFaci2ILPIP6etiF3gYOLNr2Q2A6IFiFgoB4aBudoyFi zRi/P69tF5EmuNPs1Kg2DnlZmG/BBw/XnXwgZBIZZoQUfgr54GrPmy4gQOr931Esc5Q2 jTRQ== 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=HRp5NJcgpD5M8lfp1dgBCoU2NWUCFTruXvAY9gBzvvk=; b=igoabH9YN4yOcguUxGbp2Y4LgK49/roS9x3mlCntaYvSWi7iVigb4kcbmsupOVmoPv 1fVawpVm7ExFGgMCxAVfMG1cNZbDYbw4GZzrExcxwnVtY4dYELApXSmJ7//HU4KHjbjm Q9E6JY5yog9wkSZDVw086uGtAlF0cutHQBQgs8gEjUjICcUlkocsyQ9Gcub/u7alT2ui 6Cz647QQuamDXif+6OlTUTmj6mh5KhiPka6tukXB3uYdgWSXx9Mqnzs0MbKHb4ujt5oE ePKQCE6hlIHCG3M/U/4NJArD2+aEDnIbwU5QDvVthfrQSXxd+iaodj0IHdeJ+KoiMhI1 BrBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xoz6eOIK; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si1162437ejb.695.2020.06.02.02.20.44; Tue, 02 Jun 2020 02:21:08 -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=@ti.com header.s=ti-com-17Q1 header.b=xoz6eOIK; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726596AbgFBJSm (ORCPT + 99 others); Tue, 2 Jun 2020 05:18:42 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:48892 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbgFBJSl (ORCPT ); Tue, 2 Jun 2020 05:18:41 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0529IKFD068269; Tue, 2 Jun 2020 04:18:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1591089500; bh=HRp5NJcgpD5M8lfp1dgBCoU2NWUCFTruXvAY9gBzvvk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=xoz6eOIKkhtxgQJsERCAN6s8rjW8N8YLGgcl2MBUUz5p2Eg03KD9IMxMAXsfnQBjh Qdn3DOiIf9P8UdT4a2RJ1CLUB/UNAOlMlBb0bcN6j+Xic98hxZBNq2rB+kegFpFNeO SXKjKsec1cIcDMAGrlIeSuHj9e5q1kricH+7kB0w= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0529IKYx121479 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 2 Jun 2020 04:18:20 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 2 Jun 2020 04:18:19 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 2 Jun 2020 04:18:19 -0500 Received: from feketebors.localnet (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0529IH14004338; Tue, 2 Jun 2020 04:18:18 -0500 From: Peter Ujfalusi To: Sekhar Nori , Arnd Bergmann CC: , Arnd Bergmann , Bartosz Golaszewski , Russell King , Bin Liu , , Subject: Re: [PATCH] ARM: davinci: fix build failure without I2C Date: Tue, 2 Jun 2020 12:19:00 +0300 Message-ID: <2499396.lGaqSPkdTl@feketebors> In-Reply-To: <20200527133746.643895-1-arnd@arndb.de> References: <20200527133746.643895-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On Wednesday, 27 May 2020 16.37.34 EEST Arnd Bergmann wrote: > The two supplies are referenced outside of #ifdef CONFIG_I2C but > defined inside, which breaks the build if that is not built-in: >=20 > mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifi= er 'fixed_supplies_1_8v' > ARRAY_SIZE(fixed_supplies_1_8v), 180= 0000); > ^ > mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifi= er 'fixed_supplies_1_8v' > mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifi= er 'fixed_supplies_1_8v' > mach-davinci/board-dm644x-evm.c:860:49: error: use of undeclared identifi= er 'fixed_supplies_1_8v' > regulator_register_always_on(0, "fixed-dummy", fixed_supplies_1_8= v, >=20 > I don't know if the regulators are used anywhere without I2C, but > always registering them seems to be the safe choice here. Thanks for fixing this, Reviewed-by: Peter Ujfalusi =20 > On a related note, it might be best to also deal with CONFIG_I2C=3Dm > across the file, unless this is going to be moved to DT and removed > really soon anyway. >=20 > Fixes: 5e06d19694a4 ("ARM: davinci: dm644x-evm: Add Fixed regulators need= ed for tlv320aic33") > Signed-off-by: Arnd Bergmann > --- > arch/arm/mach-davinci/board-dm644x-evm.c | 26 ++++++++++++------------ > 1 file changed, 13 insertions(+), 13 deletions(-) >=20 > diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-dav= inci/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[] = =3D { > }, > }; > =20 > -/* Fixed regulator support */ > -static struct regulator_consumer_supply fixed_supplies_3_3v[] =3D { > - /* 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[] =3D { > - /* 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) > =20 > @@ -700,6 +687,19 @@ static void __init evm_init_i2c(void) > } > #endif > =20 > +/* Fixed regulator support */ > +static struct regulator_consumer_supply fixed_supplies_3_3v[] =3D { > + /* 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[] =3D { > + /* 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) > =20 > /* venc standard timings */ >=20 =2D P=E9ter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Bu= siness ID: 0615521-4. Kotipaikka/Domicile: Helsinki