From patchwork Thu Feb 7 06:45:33 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: 10800463 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 5340C922 for ; Thu, 7 Feb 2019 06:47:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E2962CC31 for ; Thu, 7 Feb 2019 06:47:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30A772D141; Thu, 7 Feb 2019 06:47:14 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 D5DF42CC31 for ; Thu, 7 Feb 2019 06:47:13 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=BcAEauGEJ9RwJy9ehqZzCYI+d4vODyOifp3JJNN7l9I=; b=GGVa7y12x/xksV VRKimrbVJXETyCkfk5yfd+oCcveXHRsZ+ooTr2bINKIjjXt2KQyud69dQEYsZX92Ne4HJ8Pcjs9pQ N48Qjd6VcHNuUtjn/sXYMWcOXRfC00fXsd/l0z9QPDuPGUYpMc4Kp6MPx1XcI/khW7Cz8tZy7uA2F dizeqZwXk7XGDP0Z/fA2tSlBIYXJopuKnvlMJ885W090T32ORBL5vcPrIkzTKat1ED4kD2bTl4MAJ dEGkFsvRlv5ihQ0dfZsbLXwl5TiesLG6HPmu4uwsk2/HIMkqQ2og2fJoOof1HRx4D4yN9kYBSx2HK rmN8og7L8yQMvQtHHweQ==; 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 1grdSo-0007Bi-45; Thu, 07 Feb 2019 06:47:10 +0000 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76] helo=wens.csie.org) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1grdRU-0005uY-Eo for linux-arm-kernel@lists.infradead.org; Thu, 07 Feb 2019 06:45:49 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id C97AD5FDC1; Thu, 7 Feb 2019 14:45:39 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland , Lee Jones , Sebastian Reichel Subject: [RFT PATCH 7/9] mfd: axp20x: add USB power supply mfd cell to AXP813 Date: Thu, 7 Feb 2019 14:45:33 +0800 Message-Id: <20190207064535.9226-8-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190206_224548_618286_3B668404 X-CRM114-Status: UNSURE ( 8.67 ) X-CRM114-Notice: Please train this message. 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, Quentin Schulz , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Hans de Goede , linux-sunxi@googlegroups.com, Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org 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 From: Quentin Schulz The AXP813 has a VBUS power input. Now that the axp20x_usb_power driver supports this variant, we can add an mfd cell for it to use it. Signed-off-by: Quentin Schulz [wens@csie.org: add commit message] Signed-off-by: Chen-Yu Tsai --- drivers/mfd/axp20x.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 3c97f2c0fdfe..17b115845993 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -198,6 +198,12 @@ static const struct resource axp22x_usb_power_supply_resources[] = { DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"), }; +/* AXP803 and AXP813/AXP818 share the same interrupts */ +static struct resource axp803_usb_power_supply_resources[] = { + DEFINE_RES_IRQ_NAMED(AXP803_IRQ_VBUS_PLUGIN, "VBUS_PLUGIN"), + DEFINE_RES_IRQ_NAMED(AXP803_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"), +}; + static const struct resource axp22x_pek_resources[] = { DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_PEK_RIS_EDGE, "PEK_DBR"), DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_PEK_FAL_EDGE, "PEK_DBF"), @@ -793,6 +799,11 @@ static const struct mfd_cell axp813_cells[] = { .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-usb-power-supply", + .num_resources = ARRAY_SIZE(axp803_usb_power_supply_resources), + .resources = axp803_usb_power_supply_resources, + .of_compatible = "x-powers,axp813-usb-power-supply", }, };