From patchwork Tue Jun 30 13:03:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=A9bastien_Szymanski?= X-Patchwork-Id: 1319871 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=armadeus.com Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49x4LQ6sDdz9sQx for ; Tue, 30 Jun 2020 23:03:58 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F7FF81B78; Tue, 30 Jun 2020 15:03:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=armadeus.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id DD4C781B7D; Tue, 30 Jun 2020 15:03:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 3.mo2.mail-out.ovh.net (3.mo2.mail-out.ovh.net [46.105.58.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F08C681B4F for ; Tue, 30 Jun 2020 15:03:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=armadeus.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sebastien.szymanski@armadeus.com Received: from player788.ha.ovh.net (unknown [10.108.42.170]) by mo2.mail-out.ovh.net (Postfix) with ESMTP id 3E9BA1E073B for ; Tue, 30 Jun 2020 15:03:51 +0200 (CEST) Received: from armadeus.com (91-171-241-78.subs.proxad.net [91.171.241.78]) (Authenticated sender: sebastien.szymanski@armadeus.com) by player788.ha.ovh.net (Postfix) with ESMTPSA id EE9C013E9E30E; Tue, 30 Jun 2020 13:03:40 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-103G00585955308-4c59-4e98-8b5c-de08ce9fa206,C170AC05071B8517D5AA847E6C82A377FC446043) smtp.auth=sebastien.szymanski@armadeus.com From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: u-boot@lists.denx.de Cc: Ye Li , Peng Fan , Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" , Jaehoon Chung , Robin Gong , =?utf-8?q?S=C3=A9bastien_Szymanski?= Subject: [PATCH v2 1/1] power: pmic_pca9450: fix PCA9450A I2C address Date: Tue, 30 Jun 2020 15:03:13 +0200 Message-Id: <20200630130313.32440-1-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Ovh-Tracer-Id: 4050706393243341849 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrtddtgdeftdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpefurogsrghsthhivghnucfuiiihmhgrnhhskhhiuceoshgvsggrshhtihgvnhdrshiihihmrghnshhkihesrghrmhgruggvuhhsrdgtohhmqeenucggtffrrghtthgvrhhnpefhgfegffefieeghfdvlefgtdeiheejvdelvefgvedtgeeffffgjeeutdduhedtfeenucfkpheptddrtddrtddrtddpledurddujedurddvgedurdejkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejkeekrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshgvsggrshhtihgvnhdrshiihihmrghnshhkihesrghrmhgruggvuhhsrdgtohhmpdhrtghpthhtohepuhdqsghoohhtsehlihhsthhsrdguvghngidruggv X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Quoting Ye Li from NXP: "We have confirmed with PMIC team, 0x35 is used only on early chips and not used any more. 0x25 is the final address." Fix it by merging power_pca9450a_init and power_pca9450b_init into one function power_pca9450_init. Signed-off-by: Sébastien Szymanski Reviewed-by: Fabio Estevam Reviewed-by: Ye Li --- Changes for v2: * Quoting Ye Li * Merge both function into one as suggested by Ye Li board/freescale/imx8mp_evk/spl.c | 2 +- drivers/power/pmic/pmic_pca9450.c | 21 +-------------------- include/power/pca9450.h | 3 +-- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index 3b3a854e29..3214718e62 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -68,7 +68,7 @@ int power_init_board(void) struct pmic *p; int ret; - ret = power_pca9450b_init(I2C_PMIC); + ret = power_pca9450_init(I2C_PMIC); if (ret) printf("power init failed"); p = pmic_get("PCA9450"); diff --git a/drivers/power/pmic/pmic_pca9450.c b/drivers/power/pmic/pmic_pca9450.c index 67a9090200..d4f27428bd 100644 --- a/drivers/power/pmic/pmic_pca9450.c +++ b/drivers/power/pmic/pmic_pca9450.c @@ -11,26 +11,7 @@ static const char pca9450_name[] = "PCA9450"; -int power_pca9450a_init(unsigned char bus) -{ - struct pmic *p = pmic_alloc(); - - if (!p) { - printf("%s: POWER allocation error!\n", __func__); - return -ENOMEM; - } - - p->name = pca9450_name; - p->interface = PMIC_I2C; - p->number_of_regs = PCA9450_REG_NUM; - p->hw.i2c.addr = 0x35; - p->hw.i2c.tx_num = 1; - p->bus = bus; - - return 0; -} - -int power_pca9450b_init(unsigned char bus) +int power_pca9450_init(unsigned char bus) { struct pmic *p = pmic_alloc(); diff --git a/include/power/pca9450.h b/include/power/pca9450.h index 5d4f58ca44..5a9a697d62 100644 --- a/include/power/pca9450.h +++ b/include/power/pca9450.h @@ -54,7 +54,6 @@ enum { PCA9450_REG_NUM, }; -int power_pca9450a_init(unsigned char bus); -int power_pca9450b_init(unsigned char bus); +int power_pca9450_init(unsigned char bus); #endif