Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp461468img; Thu, 21 Mar 2019 01:50:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIOGD6gKTxwgGpZDwBFejX2NjdnRbAJJ/aZBCuj31S29ECOIu5AzeMbpjxQ5w/E1O5hs3T X-Received: by 2002:a17:902:b707:: with SMTP id d7mr2350410pls.91.1553158248045; Thu, 21 Mar 2019 01:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553158248; cv=none; d=google.com; s=arc-20160816; b=BgyYSl7pLRXuxOBMe/qSK70vVbO/yTafAsBFeG0mtGZTZRbSsf9vXywDXpQ0FVWmLJ 9MjB2VKJ0ttMBHt73yiHBhl1ZyAhveycBAghJ/CixrUofqxKbPZht8mZR1+5C59UdjWO ic4lB2hJpkI6kBKgewQf0TRKvm/kPCVkWdnBM5nVOIAbfREPIeWFDElMexBaZHTCHDza 8NvQ/l31R7khMMGRHam+1HadGP1QRUNweBmlG5RWmcB3dAo8Ok1xoB2DeeSfDx8vXOWI HGA0M0wi+O4BkJf+FM0qtla8IS08+CHQLFD3pDKCLVpCQocfxT9q0jqMrOogvt+iCfEg 0CEw== 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=gOi3pcZN5bcVWvKbbDXe4lqS/NnP2ubnOehqRiF3+IY=; b=OqvhAIow7yCO4B8vaQwx7Tnb1xgnPtOL65pEbewn5AXcsikDaEMxjBgavNRAmRgTti OpTGvs02ibQVBxAv1jlL/PGOA+4CtaveHGfTd36qt5Jzori8yHmlJu1VVQUnrVUiWAIu pRk1HIL2iq9iLBMOlO0ZRDn6Rc+hVsQj58gFbEUt9H+WJ98gPfdoQcOLBUFZhVMd2s5J DlfHB3E+J6KptXRDNnLSDDcanb3mKnDxq5p98c3phEHdVfW6tK2w1Rr7/buOannYGuj2 1IFkb6Ge6+5yYCWjFxf2JxIl6WHAJ0jjz/oP2tqCJ9sX5BEqAO+g+c2qTHSe6S/NuhdP BYig== 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 y24si1308922pfm.127.2019.03.21.01.50.33; Thu, 21 Mar 2019 01:50:48 -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 S1728132AbfCUItK (ORCPT + 99 others); Thu, 21 Mar 2019 04:49:10 -0400 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76]:41502 "EHLO wens.csie.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728094AbfCUItF (ORCPT ); Thu, 21 Mar 2019 04:49:05 -0400 Received: by wens.csie.org (Postfix, from userid 1000) id 54F71600B6; Thu, 21 Mar 2019 16:48:59 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Lee Jones , Sebastian Reichel Cc: Quentin Schulz , 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 , Chen-Yu Tsai Subject: [PATCH v3 7/9] mfd: axp20x: add USB power supply mfd cell to AXP813 Date: Thu, 21 Mar 2019 16:48:48 +0800 Message-Id: <20190321084850.20769-8-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: 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", }, }; -- 2.20.1