From patchwork Mon Feb 25 03:31:05 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: 10828183 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 3E42817EF for ; Mon, 25 Feb 2019 03:32:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A03C2AD63 for ; Mon, 25 Feb 2019 03:32:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E5772AE80; Mon, 25 Feb 2019 03:32:19 +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 B8F202AD63 for ; Mon, 25 Feb 2019 03:32:18 +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=PLA/wJuI1yrAy4fAsIfVflQpSA8ExTwx+DGKdL9RX40=; b=L75xeACZs8xM9r 4wU8cbfPv9YnyF0pCde0bo5HczA1MeqH16GMGCpxZgGHXJANwWFJYn/Zoqnpj3HNWZoimS0qzhGX5 blQ3Unxvu8R4Z49vhifYLI+WtDAmZcg4JInt3njFHHBv5OZi2+UAWF/kuU5pKhxUjmUU71BonPFnQ KkFwNr4bDkteLEK2S3kshyNrX8QHVj7wITHnv5E4ew0LB9w8smG+P8EiNghvuQxY775VRaFvkMMnH 7esz1rT5pnhdS9XFx3Tmi+hJjpz/JZMgSYl5xt1iCTwgtlkPkdtLW+7eyu9SvuM+FVrdcvgupyn/v Os0ZXd1BxDb1wWx5ksPQ==; 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 1gy704-00009R-CY; Mon, 25 Feb 2019 03:32:16 +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 1gy6zF-0007cN-Cu for linux-arm-kernel@lists.infradead.org; Mon, 25 Feb 2019 03:31:26 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id 63C9F5FF38; Mon, 25 Feb 2019 11:31:16 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland , Lee Jones , Sebastian Reichel Subject: [PATCH v2 7/9] mfd: axp20x: add USB power supply mfd cell to AXP813 Date: Mon, 25 Feb 2019 11:31:05 +0800 Message-Id: <20190225033107.17326-8-wens@csie.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190225033107.17326-1-wens@csie.org> References: <20190225033107.17326-1-wens@csie.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190224_193125_621389_A6761689 X-CRM114-Status: UNSURE ( 9.17 ) 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] Acked-for-MFD-by: Lee Jones Signed-off-by: Chen-Yu Tsai --- Changes since v1: - Made axp803_usb_power_supply_resources[] constant - Added Lee's acked-by --- drivers/mfd/axp20x.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 3c97f2c0fdfe..902f9f27e748 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 const 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", }, };