From patchwork Wed Mar 19 20:57:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 3861221 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C77649F334 for ; Wed, 19 Mar 2014 20:58:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EAECE201FA for ; Wed, 19 Mar 2014 20:58:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21C3C201F4 for ; Wed, 19 Mar 2014 20:58:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755577AbaCSU5w (ORCPT ); Wed, 19 Mar 2014 16:57:52 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:52364 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753872AbaCSU5v (ORCPT ); Wed, 19 Mar 2014 16:57:51 -0400 Received: from wuerfel.localnet (HSI-KBW-134-3-135-108.hsi14.kabel-badenwuerttemberg.de [134.3.135.108]) by mrelayeu.kundenserver.de (node=mreue102) with ESMTP (Nemesis) id 0MBTfC-1WIA600EvW-00AZla; Wed, 19 Mar 2014 21:57:46 +0100 From: Arnd Bergmann To: Tony Lindgren Cc: arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: Re: [PATCH 24/62] ARM: omap1: select I2C where needed for PMIC Date: Wed, 19 Mar 2014 21:57:42 +0100 Message-ID: <19769201.1MOf3JVGbC@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20140319204619.GB8333@atomide.com> References: <1395257399-359545-1-git-send-email-arnd@arndb.de> <1395257399-359545-25-git-send-email-arnd@arndb.de> <20140319204619.GB8333@atomide.com> MIME-Version: 1.0 X-Provags-ID: V02:K0:a87aGKJLKDt0siyWVXmaDOUDbzeCiX3dblSzjDt2uT8 rmxy7zN0ZoEOoSCsAS56RT6Q00kO2eGLYjd+hZWNDU4bO3lB21 5YakgPkiuqTirFjfMisArzMJSTtw3FRyRfevvq31n0AThwAcPP WDySzIWFS9WoD9u5KMgtwTcGmG7QZ4UAIz0fjkdAksO0kloB5b Gwfd4So93xNnykXpMeTZxnpRxipeNyOhwxkF+aRAAmE16kMVSk W/Du4H4Uefw+9EgoWWhnFXmI1ZdiW+yKNTmcRQJh0qx9gEcytA zMyXh4Ss5DUlSmbjHvKT1mvksZSKNpXnP0O4yqMnGfO/4pDmyp On7UkLPoWVJYrTjumD48= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wednesday 19 March 2014 13:46:19 Tony Lindgren wrote: > * Arnd Bergmann [140319 12:33]: > > The OMAP H2, OSK and OSIRIS machines cannot build without > > I2C and TPS65010 both enabled unconditionally. > > > > In each case, failing to enable CONFIG_I2C results in a > > build or link error, so most consistent solution is to > > ensure that it is impossible to disable those options. > > > > It would be nice to leave CONFIG_I2C as user-selectable, > > but doing that properly would require more work. > > We should not select drivers. How about let's just have > the tps65010 stuff behind an ifdef CONFIG_TPS65010 for > those boards? Good idea. Like this? Arnd Acked-by: Tony Lindgren --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index fd90caf..65d2acb 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -318,6 +318,9 @@ static void __init h2_init_smc91x(void) static int tps_setup(struct i2c_client *client, void *context) { + if (!IS_BUILTIN(CONFIG_TPS65010)) + return -ENOSYS; + tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V | TPS_LDO1_ENABLE | TPS_VLDO1_3_0V); diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index d68909b..3a02621 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -191,6 +191,9 @@ static struct platform_device osk5912_tps_leds = { static int osk_tps_setup(struct i2c_client *client, void *context) { + if (!IS_BUILTIN(CONFIG_TPS65010)) + return -ENOSYS; + /* Set GPIO 1 HIGH to disable VBUS power supply; * OHCI driver powers it up/down as needed. */