Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp461089img; Thu, 21 Mar 2019 01:50:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyM/XOexcdPlD/veQ7/deBbgqTiM56I6Lb4ylqZa8WGFjvU9msqABq2n8jExLxJ+iUW3zFu X-Received: by 2002:a17:902:1744:: with SMTP id i62mr2360936pli.24.1553158204862; Thu, 21 Mar 2019 01:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553158204; cv=none; d=google.com; s=arc-20160816; b=v4sM0z2rzONuL/9nBx2J5TTLh4VYqd5yjbuvobXfUbnsdFKnJOruWHbwzaNVN6TXR6 pniMN8n3CjkgbeGdm6k6JmJ7zjBNgPoZz0OQNJhIWnuEowd8P4iknbP/h+JkQ+3jD9ru 3GCHkIZWHi4D1MnK22Yk/DWg44+oVtImOUYBj2sCJZ3yUFHfgyS+7cpqCX3Z0/WrUdfm wABIIdqSNyrovpd8UUbipM4Z/VrI9uZpkvfY/TOtvTZIOAk3cP3FFtuRhiR3ghR0udGA hSxWYswCkyu+S6tEJrs0qm49gd/iBrdR0qVow+cW9PCVJKxdXWoM62mtushNWS4RjIqr BqDg== 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; bh=bMXZs//SssL7xVUpVv1edP8R8SUHtlKDOJv/pFrj47w=; b=LI8kBw32zNvDUERDEL5ptvJBDya4S3Eg1IRTE4ZE10G57uhQwxjPM+3QxIBYNOrebt SF8KGf7L6C6QKD7tdayjgeQzJyJke9vA+aVskV8wvFhfquxqo+BYicwY+w9qw5epCURd s+jBT6MrnEWbxlBGwTJIT1AXqducAbZH6Ros465XzfB0XLXgA766tEcpgI6Kflym0CBJ wrsinX/5mjitR47ZRBFHVkN511e6vxmnMqlGxhD79gtfbkiRDC3BjkAu2SXIedky6v/1 wgIocEFftCEoYGK6P4wIFKrua4jiIvTNgI9VePzLZtD4cJs8k3d09kgIfr43hI8wx9MT I3lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9si3875662pgc.164.2019.03.21.01.49.49; Thu, 21 Mar 2019 01:50:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728107AbfCUItE (ORCPT + 99 others); Thu, 21 Mar 2019 04:49:04 -0400 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76]:41416 "EHLO wens.csie.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728054AbfCUItD (ORCPT ); Thu, 21 Mar 2019 04:49:03 -0400 Received: by wens.csie.org (Postfix, from userid 1000) id 356885FDBD; Thu, 21 Mar 2019 16:48:59 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , 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, Hans de Goede Subject: [PATCH v3 3/9] power: supply: axp20x_usb_power: allow disabling input current limiting Date: Thu, 21 Mar 2019 16:48:44 +0800 Message-Id: <20190321084850.20769-4-wens@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190321084850.20769-1-wens@kernel.org> References: <20190321084850.20769-1-wens@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai The AXP PMICs allow the user to disable current limiting on the VBUS input. While read-out of this setting was already supported by the driver, it did not allow the user to configure the PMIC to disable current limiting. Add support for this. Signed-off-by: Chen-Yu Tsai --- drivers/power/supply/axp20x_usb_power.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index cd9b90d79839..e2f353906bb1 100644 --- a/drivers/power/supply/axp20x_usb_power.c +++ b/drivers/power/supply/axp20x_usb_power.c @@ -230,6 +230,11 @@ static int axp20x_usb_power_set_current_max(struct axp20x_usb_power *power, return regmap_update_bits(power->regmap, AXP20X_VBUS_IPSOUT_MGMT, AXP20X_VBUS_CLIMIT_MASK, val); + case -1: + return regmap_update_bits(power->regmap, + AXP20X_VBUS_IPSOUT_MGMT, + AXP20X_VBUS_CLIMIT_MASK, + AXP20X_VBUS_CLIMIT_NONE); default: return -EINVAL; } -- 2.20.1