From patchwork Tue Jan 29 08:55:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Zhang X-Patchwork-Id: 1032611 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nvidia.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nvidia.com header.i=@nvidia.com header.b="pAF86/L2"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43pgN10VXCz9sDr for ; Tue, 29 Jan 2019 19:56:33 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727810AbfA2I4K (ORCPT ); Tue, 29 Jan 2019 03:56:10 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:2024 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727145AbfA2I4K (ORCPT ); Tue, 29 Jan 2019 03:56:10 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 29 Jan 2019 00:56:10 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 29 Jan 2019 00:56:09 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 29 Jan 2019 00:56:09 -0800 Received: from HQMAIL108.nvidia.com (172.18.146.13) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 29 Jan 2019 08:56:09 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 29 Jan 2019 08:56:08 +0000 Received: from localhost.localdomain (Not Verified[10.19.225.143]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Tue, 29 Jan 2019 00:56:08 -0800 From: Mark Zhang To: , , , , , CC: , Mark Zhang , Laxman Dewangan , Venkat Reddy Talla Subject: [PATCH v2 1/4] mfd: max77620: Add backup battery charger support Date: Tue, 29 Jan 2019 16:55:28 +0800 Message-ID: <20190129085531.32364-2-markz@nvidia.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190129085531.32364-1-markz@nvidia.com> References: <20190129085531.32364-1-markz@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1548752170; bh=OUDyElPhiPwMVEx8CTwkTQaz+hQEf3MSZtYJeqdam4Y=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=pAF86/L2m8P2dYwJRqXXYnVclp7zOdiFSlhpawszWnzcWfUY4TUeDURVBnCneNZkX vLTG0gO9kNGvlPVpO3tnk1tGhrL/VbNfcajeGB+qx3dDkRioAvKNJQE5/EwxvIdomF SruJpt2TeTfmeGSgA/C280nnWJ891gcRl7UIbe2lPfyw4zkiQc3NsAyVtxSdfkF2Re PawlLfgF8Z00CyRVEB8FG503TtmYGKQlSdpMbm3SWVc6SZfrg7UpXVXu/6q7duJ06l L2zQVfa3O8o0XFuGm9RBIWEm4M87iXOx9IBDPbclmhsfGKyLmYVvvz9t3SmZJFSkgj CQPFT0UySGMAQ== Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Add PMIC configurations for backup battery charger, which is a constant voltage and constant current style charger with a series output resistance. The max77620 register CNFGBBC(addr: 0x04) defines the parameters of backup battery charger. This patch adds support for it. Signed-off-by: Laxman Dewangan Signed-off-by: Venkat Reddy Talla Signed-off-by: Mark Zhang --- drivers/mfd/max77620.c | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c index d8ddd1a6f304..f58143103185 100644 --- a/drivers/mfd/max77620.c +++ b/drivers/mfd/max77620.c @@ -398,6 +398,82 @@ static int max77620_initialise_fps(struct max77620_chip *chip) return 0; } +static int max77620_init_backup_battery_charging(struct max77620_chip *chip) +{ + struct device *dev = chip->dev; + struct device_node *np; + u32 pval; + u8 config; + int charging_current; + int charging_voltage; + int resistor; + int ret; + + np = of_get_child_by_name(dev->of_node, "backup-battery"); + if (!np) { + dev_info(dev, "Backup battery charging support disabled\n"); + ret = regmap_update_bits(chip->rmap, MAX77620_REG_CNFGBBC, + MAX77620_CNFGBBC_ENABLE, 0); + if (ret < 0) + dev_err(dev, "Failed to update CNFGBBC: %d\n", ret); + return ret; + } + + ret = of_property_read_u32(np, + "maxim,backup-battery-charging-current", &pval); + charging_current = (!ret) ? pval : 50; + + ret = of_property_read_u32(np, + "maxim,backup-battery-charging-voltage", &pval); + charging_voltage = (!ret) ? pval : 2500000; + charging_voltage /= 1000; + + ret = of_property_read_u32(np, + "maxim,backup-battery-output-resister", &pval); + resistor = (!ret) ? pval : 1000; + + config = MAX77620_CNFGBBC_ENABLE; + if (charging_current <= 50) + config |= 0 << MAX77620_CNFGBBC_CURRENT_SHIFT; + else if (charging_current <= 100) + config |= 3 << MAX77620_CNFGBBC_CURRENT_SHIFT; + else if (charging_current <= 200) + config |= 0 << MAX77620_CNFGBBC_CURRENT_SHIFT; + else if (charging_current <= 400) + config |= 3 << MAX77620_CNFGBBC_CURRENT_SHIFT; + else if (charging_current <= 600) + config |= 1 << MAX77620_CNFGBBC_CURRENT_SHIFT; + else + config |= 2 << MAX77620_CNFGBBC_CURRENT_SHIFT; + + if (charging_current > 100) + config |= MAX77620_CNFGBBC_LOW_CURRENT_DISABLE; + + if (charging_voltage <= 2500) + config |= 0 << MAX77620_CNFGBBC_VOLTAGE_SHIFT; + else if (charging_voltage <= 3000) + config |= 1 << MAX77620_CNFGBBC_VOLTAGE_SHIFT; + else if (charging_voltage <= 3300) + config |= 2 << MAX77620_CNFGBBC_VOLTAGE_SHIFT; + else + config |= 3 << MAX77620_CNFGBBC_VOLTAGE_SHIFT; + + if (resistor <= 100) + config |= 0 << MAX77620_CNFGBBC_RESISTOR_SHIFT; + else if (resistor <= 1000) + config |= 1 << MAX77620_CNFGBBC_RESISTOR_SHIFT; + else if (resistor <= 3000) + config |= 2 << MAX77620_CNFGBBC_RESISTOR_SHIFT; + else if (resistor <= 6000) + config |= 3 << MAX77620_CNFGBBC_RESISTOR_SHIFT; + + ret = regmap_write(chip->rmap, MAX77620_REG_CNFGBBC, config); + if (ret < 0) + dev_err(dev, "Reg 0x%02x write failed, %d\n", + MAX77620_REG_CNFGBBC, ret); + return ret; +} + static int max77620_read_es_version(struct max77620_chip *chip) { unsigned int val; @@ -483,6 +559,10 @@ static int max77620_probe(struct i2c_client *client, if (ret < 0) return ret; + ret = max77620_init_backup_battery_charging(chip); + if (ret < 0) + return ret; + ret = devm_mfd_add_devices(chip->dev, PLATFORM_DEVID_NONE, mfd_cells, n_mfd_cells, NULL, 0, regmap_irq_get_domain(chip->top_irq_data)); From patchwork Tue Jan 29 08:55:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Zhang X-Patchwork-Id: 1032610 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nvidia.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nvidia.com header.i=@nvidia.com header.b="Q7dc592W"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43pgMz4pp2z9sMM for ; Tue, 29 Jan 2019 19:56:31 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727850AbfA2I4P (ORCPT ); Tue, 29 Jan 2019 03:56:15 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:2035 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727145AbfA2I4M (ORCPT ); Tue, 29 Jan 2019 03:56:12 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 29 Jan 2019 00:56:13 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Tue, 29 Jan 2019 00:56:12 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Tue, 29 Jan 2019 00:56:12 -0800 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 29 Jan 2019 08:56:11 +0000 Received: from HQMAIL103.nvidia.com (172.20.187.11) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 29 Jan 2019 08:56:11 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL103.nvidia.com (172.20.187.11) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 29 Jan 2019 08:56:11 +0000 Received: from localhost.localdomain (Not Verified[10.19.225.143]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Tue, 29 Jan 2019 00:56:11 -0800 From: Mark Zhang To: , , , , , CC: , Mark Zhang Subject: [PATCH v2 2/4] mfd: max77620: add documentation for backup battery charging Date: Tue, 29 Jan 2019 16:55:29 +0800 Message-ID: <20190129085531.32364-3-markz@nvidia.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190129085531.32364-1-markz@nvidia.com> References: <20190129085531.32364-1-markz@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1548752173; bh=B2Xjyu1hXNJ6DFzr0YfoY4Ut0RKFKDHRJ5eLSK1VsuM=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=Q7dc592WyV5z9BMubEU1mp/rNOBmjAVFBUP/hqlfqRJjyFLpXS/SwAD72fHOPOuh9 DVhHlqafvlry/aYzmHdM5q2g2pGXeQm5znOqgLUWSKrWV6KnQ5VDAJvS65OKwZ43T2 HkbVUTbo9+5A2eTvwjFG6V8Bbrc6KGySvZBuhXezoVkOLP37hrScqFbpWYGOetVPt/ jCk4Cndv2WUU6E4iGSiRI8fiR4OFDap1ePT0Zbn6zePRszIh5teYR4R8GHTtQVZpOt XAwF4K0TDMDuaOVauu66UmvCGfUYsuPOpyapjanYzZWas/ZmXvI++PTpANDexgHEjN C6ktIgcbuLJiQ== Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Adding documentation for 3 new backup battery charging dts properties: - maxim,backup-battery-charging-current - maxim,backup-battery-charging-voltage - maxim,backup-battery-output-resister Signed-off-by: Mark Zhang --- .../devicetree/bindings/mfd/max77620.txt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/max77620.txt b/Documentation/devicetree/bindings/mfd/max77620.txt index 9c16d51cc15b..484b17e4fba5 100644 --- a/Documentation/devicetree/bindings/mfd/max77620.txt +++ b/Documentation/devicetree/bindings/mfd/max77620.txt @@ -122,6 +122,26 @@ For DT binding details of different sub modules like GPIO, pincontrol, regulator, power, please refer respective device-tree binding document under their respective sub-system directories. +Backup Battery: +============== +This sub-node configure charging backup battery of the device. Device has +support of charging the backup battery. The subnode name is "backup-battery". +The property for backup-battery child nodes as: +Presence of this child node will enable the backup battery charging. + +Optional properties: + -maxim,backup-battery-charging-current: Charging current setting. + The device supports 50/100/200/400/600/800uA. + If this property is unavailable then it will + charge with 50uA. + -maxim,backup-battery-charging-voltage: Charging Voltage Limit Setting. + Device supports 2500000/3000000/3300000/350000uV. + Default will be set to 2500mV. The voltage will be roundoff + to nearest lower side if other than above is configured. + -maxim,backup-battery-output-resister: Output resistor on Ohm. + Device supports 100/1000/3000/6000 Ohms. + Default will be set to 1000 Ohm. + Example: -------- #include From patchwork Tue Jan 29 08:55:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Zhang X-Patchwork-Id: 1032608 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nvidia.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nvidia.com header.i=@nvidia.com header.b="IS8C+n3s"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43pgMv49ZGz9sDX for ; Tue, 29 Jan 2019 19:56:27 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727897AbfA2I4Q (ORCPT ); Tue, 29 Jan 2019 03:56:16 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:4764 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727867AbfA2I4Q (ORCPT ); Tue, 29 Jan 2019 03:56:16 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 29 Jan 2019 00:55:35 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 29 Jan 2019 00:56:15 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 29 Jan 2019 00:56:15 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 29 Jan 2019 08:56:14 +0000 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 29 Jan 2019 08:56:14 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 29 Jan 2019 08:56:14 +0000 Received: from localhost.localdomain (Not Verified[10.19.225.143]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Tue, 29 Jan 2019 00:56:14 -0800 From: Mark Zhang To: , , , , , CC: , Mark Zhang , "Laxman Dewangan" , Venkat Reddy Talla Subject: [PATCH v2 3/4] mfd: max77620: Add low battery monitor support Date: Tue, 29 Jan 2019 16:55:30 +0800 Message-ID: <20190129085531.32364-4-markz@nvidia.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190129085531.32364-1-markz@nvidia.com> References: <20190129085531.32364-1-markz@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1548752136; bh=BgG6FUugC1CevREJ1krBzbps1BGj7dMGa+3M+zudQjU=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=IS8C+n3sj6zoBQx9m0diEhLB9G43DtLLPVrvriYTNg0MaJXC+osEaZPBlQfhwytr8 dT8ssw94ROFIZJ3oV8oD6rcAogg/B0jSVbnxt1w4X2eFsxGujrR7p/53AiCIdvRwC0 3ShL+okLBCIObiDnZIQCDrHxFIpY74NmcZdp5T5tWZKRQPzF8jxE2q6MRHyjKWKMaZ qldGwWtjxMEsVU0jp4iE4Ix0Ra81xAwIbZSphNqljGf4JP4fUjfhR8/WCGBDy4jJKT dp7KKObDwSA8LKOmXnOrlwfofHX3gGXwzb0jTXdVlUTFtFv++vrxgp/uHN9oKqThjJ QWM+dQTtsY9IA== Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org This patch adds PMIC configurations for low-battery monitoring by handling max77620 register CNFGGLBL1. Signed-off-by: Laxman Dewangan Signed-off-by: Venkat Reddy Talla Signed-off-by: Mark Zhang --- drivers/mfd/max77620.c | 57 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c index f58143103185..9e50d145afd8 100644 --- a/drivers/mfd/max77620.c +++ b/drivers/mfd/max77620.c @@ -474,6 +474,57 @@ static int max77620_init_backup_battery_charging(struct max77620_chip *chip) return ret; } +static int max77620_init_low_battery_monitor(struct max77620_chip *chip) +{ + struct device *dev = chip->dev; + struct device_node *np; + bool pval; + u8 mask = 0; + u8 val = 0; + int ret; + + np = of_get_child_by_name(dev->of_node, "low-battery-monitor"); + if (!np) { + dev_info(dev, "Low battery monitoring support disabled\n"); + return 0; + } + + pval = of_property_read_bool(np, "maxim,low-battery-dac-enable"); + if (pval) { + mask |= MAX77620_CNFGGLBL1_LBDAC_EN; + val |= MAX77620_CNFGGLBL1_LBDAC_EN; + } + + pval = of_property_read_bool(np, "maxim,low-battery-dac-disable"); + if (pval) + mask |= MAX77620_CNFGGLBL1_LBDAC_EN; + + pval = of_property_read_bool(np, "maxim,low-battery-shutdown-enable"); + if (pval) { + mask |= MAX77620_CNFGGLBL1_MPPLD; + val |= MAX77620_CNFGGLBL1_MPPLD; + } + + pval = of_property_read_bool(np, "maxim,low-battery-shutdown-disable"); + if (pval) + mask |= MAX77620_CNFGGLBL1_MPPLD; + + pval = of_property_read_bool(np, "maxim,low-battery-reset-enable"); + if (pval) { + mask |= MAX77620_CNFGGLBL1_LBRSTEN; + val |= MAX77620_CNFGGLBL1_LBRSTEN; + } + + pval = of_property_read_bool(np, "maxim,low-battery-reset-disable"); + if (pval) + mask |= MAX77620_CNFGGLBL1_LBRSTEN; + + ret = regmap_update_bits(chip->rmap, MAX77620_REG_CNFGGLBL1, mask, val); + if (ret < 0) + dev_err(dev, "Reg CNFGGLBL1 update failed: %d\n", ret); + return ret; +} + static int max77620_read_es_version(struct max77620_chip *chip) { unsigned int val; @@ -563,7 +614,11 @@ static int max77620_probe(struct i2c_client *client, if (ret < 0) return ret; - ret = devm_mfd_add_devices(chip->dev, PLATFORM_DEVID_NONE, + ret = max77620_init_low_battery_monitor(chip); + if (ret < 0) + return ret; + + ret = devm_mfd_add_devices(chip->dev, PLATFORM_DEVID_NONE, mfd_cells, n_mfd_cells, NULL, 0, regmap_irq_get_domain(chip->top_irq_data)); if (ret < 0) { From patchwork Tue Jan 29 08:55:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Zhang X-Patchwork-Id: 1032606 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nvidia.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nvidia.com header.i=@nvidia.com header.b="RyDDsCMU"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43pgMs4RRLz9sDX for ; Tue, 29 Jan 2019 19:56:25 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727931AbfA2I4S (ORCPT ); Tue, 29 Jan 2019 03:56:18 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:2044 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727913AbfA2I4S (ORCPT ); Tue, 29 Jan 2019 03:56:18 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 29 Jan 2019 00:56:18 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Tue, 29 Jan 2019 00:56:17 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Tue, 29 Jan 2019 00:56:17 -0800 Received: from HQMAIL102.nvidia.com (172.18.146.10) by HQMAIL103.nvidia.com (172.20.187.11) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 29 Jan 2019 08:56:17 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL102.nvidia.com (172.18.146.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 29 Jan 2019 08:56:17 +0000 Received: from localhost.localdomain (Not Verified[10.19.225.143]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Tue, 29 Jan 2019 00:56:16 -0800 From: Mark Zhang To: , , , , , CC: , Mark Zhang Subject: [PATCH v2 4/4] mfd: max77620: add documentation for low battery monitoring Date: Tue, 29 Jan 2019 16:55:31 +0800 Message-ID: <20190129085531.32364-5-markz@nvidia.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190129085531.32364-1-markz@nvidia.com> References: <20190129085531.32364-1-markz@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1548752178; bh=L9LH9hSL3Ib/CS/ZOqBpbZI2CIcUfJ74WbkHuzn+K/w=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=RyDDsCMU3jyqr4fxrC2MNB5vSblqUiIOiBB3vczowS/uXpMyxOtb3ovu+iodJO/JL hRusacVkzDY/n5hI/ULv4fZYPN4X2xbKsSDp6+Ma32evh2hXRVR5VVqKD8PMp/bq8Q cqtEIZYx+FcwCC0mHgjFO9RaWGM+qbOVVjAQJzZq7oj15QepfaaVMfmgwuX+1VVxzh 8n1+zp4A6eYKeCFEX6dzoEL/b3qDmZxjfISgfsPOxnT7XnZw+wHMzbRnI3vAi3SoF0 CsHoflTZauu9XDUeG5JxRa4/IzizdXUZXP5oiSvAFlRwL2zn8+FzEgUB0dZSCMs36R TiP4VmF/51Xfw== Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Adding documentation for low battery monitor properties: - maxim,low-battery-dac-enable - maxim,low-battery-dac-disable - maxim,low-battery-shutdown-enable - maxim,low-battery-shutdown-disable - maxim,low-battery-reset-enable - maxim,low-battery-reset-disable Signed-off-by: Mark Zhang --- Documentation/devicetree/bindings/mfd/max77620.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/max77620.txt b/Documentation/devicetree/bindings/mfd/max77620.txt index 484b17e4fba5..5fed0a463b80 100644 --- a/Documentation/devicetree/bindings/mfd/max77620.txt +++ b/Documentation/devicetree/bindings/mfd/max77620.txt @@ -142,6 +142,20 @@ Optional properties: Device supports 100/1000/3000/6000 Ohms. Default will be set to 1000 Ohm. +Low-Battery Monitor: +================== +This sub-node configure low battery monitor configuration registers. Device has +support for low-battery monitor configuration through child DT node +"low-battery-monitor". + +Optional properties: + - maxim,low-battery-dac-enable: Enable low battery DAC. + - maxim,low-battery-dac-disable: Disable low battery DAC. + - maxim,low-battery-shutdown-enable: Enable low battery shutdown. + - maxim,low-battery-shutdown-disable: Disable low battery shutdown. + - maxim,low-battery-reset-enable: Enable low battery reset. + - maxim,low-battery-reset-disable: Disable low battery reset. + Example: -------- #include