From patchwork Thu Feb 7 06:45:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 10800449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5A8B41575 for ; Thu, 7 Feb 2019 06:46:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49F8C2CC26 for ; Thu, 7 Feb 2019 06:46:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CFB82D156; Thu, 7 Feb 2019 06:46:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D54A32CC26 for ; Thu, 7 Feb 2019 06:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726788AbfBGGpp (ORCPT ); Thu, 7 Feb 2019 01:45:45 -0500 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76]:34030 "EHLO wens.csie.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbfBGGpo (ORCPT ); Thu, 7 Feb 2019 01:45:44 -0500 Received: by wens.csie.org (Postfix, from userid 1000) id A08C45FD06; Thu, 7 Feb 2019 14:45:39 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland , Lee Jones , Sebastian Reichel Cc: Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Quentin Schulz , Hans de Goede Subject: [RFT PATCH 2/9] power: supply: axp20x_usb_power: Fix typo in VBUS current limit macros Date: Thu, 7 Feb 2019 14:45:28 +0800 Message-Id: <20190207064535.9226-3-wens@csie.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207064535.9226-1-wens@csie.org> References: <20190207064535.9226-1-wens@csie.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The VBUS current limit value macros have VBUS typed as VBUC, while the bitmask macro is named correctly. Fix it. Fixes: 69fb4dcada77 ("power: Add an axp20x-usb-power driver") Signed-off-by: Chen-Yu Tsai --- drivers/power/supply/axp20x_usb_power.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index f52fe77edb6f..cd9b90d79839 100644 --- a/drivers/power/supply/axp20x_usb_power.c +++ b/drivers/power/supply/axp20x_usb_power.c @@ -36,10 +36,10 @@ #define AXP20X_VBUS_VHOLD_MASK GENMASK(5, 3) #define AXP20X_VBUS_VHOLD_OFFSET 3 #define AXP20X_VBUS_CLIMIT_MASK 3 -#define AXP20X_VBUC_CLIMIT_900mA 0 -#define AXP20X_VBUC_CLIMIT_500mA 1 -#define AXP20X_VBUC_CLIMIT_100mA 2 -#define AXP20X_VBUC_CLIMIT_NONE 3 +#define AXP20X_VBUS_CLIMIT_900mA 0 +#define AXP20X_VBUS_CLIMIT_500mA 1 +#define AXP20X_VBUS_CLIMIT_100mA 2 +#define AXP20X_VBUS_CLIMIT_NONE 3 #define AXP20X_ADC_EN1_VBUS_CURR BIT(2) #define AXP20X_ADC_EN1_VBUS_VOLT BIT(3) @@ -107,19 +107,19 @@ static int axp20x_usb_power_get_property(struct power_supply *psy, return ret; switch (v & AXP20X_VBUS_CLIMIT_MASK) { - case AXP20X_VBUC_CLIMIT_100mA: + case AXP20X_VBUS_CLIMIT_100mA: if (power->axp20x_id == AXP221_ID) val->intval = -1; /* No 100mA limit */ else val->intval = 100000; break; - case AXP20X_VBUC_CLIMIT_500mA: + case AXP20X_VBUS_CLIMIT_500mA: val->intval = 500000; break; - case AXP20X_VBUC_CLIMIT_900mA: + case AXP20X_VBUS_CLIMIT_900mA: val->intval = 900000; break; - case AXP20X_VBUC_CLIMIT_NONE: + case AXP20X_VBUS_CLIMIT_NONE: val->intval = -1; break; }