From patchwork Mon May 7 20:25:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 157412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id EA959B6FA4 for ; Tue, 8 May 2012 06:26:24 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B7948280FE; Mon, 7 May 2012 22:26:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2bEshMzBFvNw; Mon, 7 May 2012 22:26:21 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8EC14280E8; Mon, 7 May 2012 22:26:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 94D03280E7 for ; Mon, 7 May 2012 22:26:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VdRwA-FK8usd for ; Mon, 7 May 2012 22:26:14 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by theia.denx.de (Postfix) with ESMTPS id 7B569280E2 for ; Mon, 7 May 2012 22:26:13 +0200 (CEST) Received: by yhq56 with SMTP id 56so4399915yhq.3 for ; Mon, 07 May 2012 13:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=E8DFcXA+LeAd4RaUUGR1uZERql1r3iDKta6vwV8pUgM=; b=LxJ5a8F+FuWfW91vJs6UGcNNrlksA4nK30NLEdLsMG0jAMjjjZKYbyVzwz4v08cXd3 4OHfRQkNlVbVluTyAyyWWvG3GTkHtJWVtBcACXdf6ubFjdo7YC3E69h9nt70QaNFM882 b7egGPwU3b/8LE3wCsByc9dmjzkilU86olXCoc5WA1fOU9ZFqF7fbGMJqeOb/ILa/QSG B8WnPdpVQf1PSRgKPiGjMWckct/gAlou0HW9ESiRSKQqPJOqLxiBLyGNyWqcwAi7+PJH iBiFiaaBEiy03IoNchp30YNl4oxsK8PGJn3Z35/6tVHt1gVdjt84m2kUcauKfTo8MX0D MHVA== Received: by 10.236.136.33 with SMTP id v21mr21144331yhi.17.1336422370673; Mon, 07 May 2012 13:26:10 -0700 (PDT) Received: from localhost.localdomain ([201.82.161.72]) by mx.google.com with ESMTPS id h72sm19295998yhm.5.2012.05.07.13.26.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 May 2012 13:26:09 -0700 (PDT) From: Fabio Estevam To: u-boot@lists.denx.de Date: Mon, 7 May 2012 17:25:58 -0300 Message-Id: <1336422361-14245-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.1 Cc: Fabio Estevam Subject: [U-Boot] [PATCH 1/3] pmic: dialog: Avoid name conflicts X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Fabio Estevam As mx53loco board has two variants: one with Dialog PMIC and another with FSL MC34708 PMIC, we need to be able to build both drivers. Change pmic_init() and PMIC_NUM_OF_REGS names to avoid build conflicts when both drivers are present. Signed-off-by: Fabio Estevam Acked-by: Stefano Babic --- board/freescale/mx53loco/mx53loco.c | 2 +- drivers/misc/pmic_dialog.c | 4 ++-- include/dialog_pmic.h | 2 +- include/pmic.h | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index 0dcec9b..7ed5c4e 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -322,7 +322,7 @@ static int power_init(void) unsigned int val, ret; struct pmic *p; - pmic_init(); + pmic_dialog_init(); p = get_pmic(); /* Set VDDA to 1.25V */ diff --git a/drivers/misc/pmic_dialog.c b/drivers/misc/pmic_dialog.c index 7242073..e97af1d 100644 --- a/drivers/misc/pmic_dialog.c +++ b/drivers/misc/pmic_dialog.c @@ -20,13 +20,13 @@ #include #include -int pmic_init(void) +int pmic_dialog_init(void) { struct pmic *p = get_pmic(); static const char name[] = "DIALOG_PMIC"; p->name = name; - p->number_of_regs = PMIC_NUM_OF_REGS; + p->number_of_regs = DIALOG_NUM_OF_REGS; p->interface = PMIC_I2C; p->hw.i2c.addr = CONFIG_SYS_DIALOG_PMIC_I2C_ADDR; diff --git a/include/dialog_pmic.h b/include/dialog_pmic.h index b0925f5..8d43585 100644 --- a/include/dialog_pmic.h +++ b/include/dialog_pmic.h @@ -164,7 +164,7 @@ enum { DA9053_GPID7_REG, DA9053_GPID8_REG, DA9053_GPID9_REG, - PMIC_NUM_OF_REGS, + DIALOG_NUM_OF_REGS, }; #define DA_BUCKCORE_VBCORE_1_250V 0x1E diff --git a/include/pmic.h b/include/pmic.h index 52a1526..6a05b40 100644 --- a/include/pmic.h +++ b/include/pmic.h @@ -55,6 +55,7 @@ struct pmic { }; int pmic_init(void); +int pmic_dialog_init(void); int check_reg(u32 reg); struct pmic *get_pmic(void); int pmic_probe(struct pmic *p);