From patchwork Sat Oct 6 21:18:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10629337 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 E1741112B for ; Sat, 6 Oct 2018 21:23:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2B5528CE4 for ; Sat, 6 Oct 2018 21:23:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5EBD28CFA; Sat, 6 Oct 2018 21:23:48 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7087C28CE4 for ; Sat, 6 Oct 2018 21:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/b1torm0cyuiVcHTBNxUgkrR3gLaXH6Nk3V5u3j3+GM=; b=jQ8eS6uZvKs9P5VQC5fWRDE2R4 AMqBZjwimd8BHUkmqRLbmVgG1kol5+C5ViVLj5z9V1i4/0/av+djSprZ407NPz4/ZHSGPPJ4muuaW wBjbEmMTl70AreILHpQIJynXYDwGlNah8M3VOODKAxm+WXqMINmTGW8hsEgpurzQCHEbKO7sZrdZo wr7Z1SF/W5ODV0ylxVkVDysd7cm9qfxGggFrCg5K0DRVI46/BEOvfua6VH4xNu6HdqxddPJH8OYhP bA7OFQ6c1qn8r2sI/dAE3maeDtxdd5DnLwxwUI/+n1bpL3jGM362uNULtf3odIYIfalz5VZxj2HSn 9k6rVa/Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g8u2v-0000Y6-Fp; Sat, 06 Oct 2018 21:23:33 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g8u04-0007hL-CZ for linux-arm-kernel@lists.infradead.org; Sat, 06 Oct 2018 21:20:46 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id CED9720790; Sat, 6 Oct 2018 23:20:09 +0200 (CEST) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1538860809; x= 1541452810; bh=ruX3wZR0GTvecoOmNyFlvQ1sc+zejmHze/zVBbMEiUA=; b=Z +QbnGZyfyBMPI3gsGxPPDQL0+T8kdMYNwDE1mWjnDDD0PS4kJ8CVJxbNHSQtlTQd yXZ3qx06Z36tWOTHKMO76N0CAuzCQGRainReSSucpatylm1vazRgub8BdvEV39ja REL8y0+E0LpCa53/Iiqf4QfA8OW/KBzgE5/l8pTo2UQ02W1igpYLqDu4p7HPP3Ll 6+0ghn4XYxjnzgHjiyddseFqHYRu6GvFgOJlWxRNdT0BKyfJhS0tpzN/8fMw+sLg MlFAFDg8VZSXEXHmPc2dzrwe9f/1riNXWlRPmIIRmLwoIR5+aQxhyA0B/uzSNq22 bD53JMzuQM95pf9kN+KbFVvxyDJIN/8CwnqsHxfzuOU+8z0YxqoLtGWukg/hMcw3 y11L5TNTecGeoxPs9dhfVcGb+KLQaYo8ICSwjhvscSUQt18hhIgBh7m02+5FqPsQ diWTXqjRcsDeNm5AD/i+4sEfvPx8ct4sGvkdmZPL0JaX9/Mv40OO4b+hZhQ/yFGe GOs+d+9xehfcaGYBiHmNufz64N768MPVHqzSG+i0cjKgFAZcuKzidAMyZVt8COw7 BQ2zmi+6MuX3ofoF0vJOoYymHSUyLAJ99+4v/9M0NP+1BCMNgqUaQ2nv3aracH/V eBVY58KGRTlOE2ywRaMLIfH3I/84nOFEcMPkOrLrao= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id T9ymSrKY-3T3; Sat, 6 Oct 2018 23:20:09 +0200 (CEST) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id 729211FBEE; Sat, 6 Oct 2018 23:20:08 +0200 (CEST) From: Oskari Lemmela To: Sebastian Reichel , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v2 5/6] mfd: axp20x: add support AXP803 AC and battery power supplies Date: Sun, 7 Oct 2018 00:18:35 +0300 Message-Id: <20181006211836.28253-6-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181006211836.28253-1-oskari@lemmela.net> References: <20181004193410.7265-1-oskari@lemmela.net> <20181006211836.28253-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181006_142036_769289_1337193F X-CRM114-Status: GOOD ( 12.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Quentin Schulz , Oskari Lemmela , Lee Jones , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP AXP803 is compatible with AXP813. Adding needed cells for AC and battery power supplies. AXP813 AC power supply cell added. Signed-off-by: Oskari Lemmela --- drivers/mfd/axp20x.c | 22 +++++++++++++++++++++- include/linux/mfd/axp20x.h | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 0be511dd93d0..215f0b009728 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -731,8 +731,23 @@ static const struct mfd_cell axp803_cells[] = { .name = "axp221-pek", .num_resources = ARRAY_SIZE(axp803_pek_resources), .resources = axp803_pek_resources, + }, { + .name = "axp20x-regulator" + }, { + .name = "axp20x-gpio", + .of_compatible = "x-powers,axp813-gpio", + }, { + .name = "axp813-adc", + .of_compatible = "x-powers,axp813-adc", + }, { + .name = "axp20x-battery-power-supply", + .of_compatible = "x-powers,axp813-battery-power-supply", + }, { + .name = "axp20x-ac-power-supply", + .of_compatible = "x-powers,axp813-ac-power-supply", + .num_resources = ARRAY_SIZE(axp20x_ac_power_supply_resources), + .resources = axp20x_ac_power_supply_resources, }, - { .name = "axp20x-regulator" }, }; static const struct mfd_cell axp806_self_working_cells[] = { @@ -778,6 +793,11 @@ static const struct mfd_cell axp813_cells[] = { }, { .name = "axp20x-battery-power-supply", .of_compatible = "x-powers,axp813-battery-power-supply", + }, { + .name = "axp20x-ac-power-supply", + .of_compatible = "x-powers,axp813-ac-power-supply", + .num_resources = ARRAY_SIZE(axp20x_ac_power_supply_resources), + .resources = axp20x_ac_power_supply_resources, }, }; diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index 517e60eecbcb..2302b620d238 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -266,6 +266,7 @@ enum axp20x_variants { #define AXP288_RT_BATT_V_H 0xa0 #define AXP288_RT_BATT_V_L 0xa1 +#define AXP813_ACIN_PATH_CTRL 0x3a #define AXP813_ADC_RATE 0x85 /* Fuel Gauge */