Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp632662ybl; Wed, 8 Jan 2020 03:19:56 -0800 (PST) X-Google-Smtp-Source: APXvYqztEDzcgga+ou0GY+iTHV5JHpld7jSIk7uGqRdGocij7Yt6Z7H4KBdwTX6hE1fXoylZDxZf X-Received: by 2002:aca:1111:: with SMTP id 17mr2471261oir.37.1578482396405; Wed, 08 Jan 2020 03:19:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578482396; cv=none; d=google.com; s=arc-20160816; b=lQHPKUi0VWV11F5+u7K1cjnVa8qDazsdp8Ez4tiD1dVJTjZQ7yCcJHb+/uVeXPjAtw CwHWmYo/8aX3RlWn6nHGeHJ0b/yyROt5N7/yiVnCjcE4XIEE6rGYB1AkF/SKeyC4+4FF SFSVuk4n/lqL4kxeYl2VRfjS/YJTDfea8GMobxO2vbFyP8cFiJPiDIVr8O271Mq9unop YpivM4VSboaDAUgPNMf3bsxeCtZ4LXqOofD+UALZ+qQDEhlWPNniboEiZpUAbkx3UEqG c7pVcavTkvwrLks+OkBgDLjBD2DkNRQ9O4xJNM7EBtEvfe7Uj6U+zEet1OQfzunJPtoJ TxZw== 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=OVAWC7eNcQJQCZd6LNXWl9k58uMMTIN1lEE5uD498q4=; b=HY81pttJYNVp4EaBC12xDR8CqwiDEDIvP2aMSb2aIXJj4nqkZRVSF+JlowWffd7/sF csJK5vOJh9yXtMWpTw1zhK+s7/eSO4Oq4hMGioCib3rXC2V4seORdEc8w1p0QbqkuEg2 rWrljkhiYnmPDFsrX/ZISU2CfoBW0nXY/JfwOxazmUTZZh4Bv3LgpTCn5orE92M6djZb Kxv9Td40FSho33rAMoRydtAx4O37XuYZRPpmvLIf8UaBcnPz92JBvXpDipak6fz+Gt/R N9UGjePYmHaK5aJTpc65o1uILTa8d7E71Ki3k3Pl3eqz50JahDvtveSryPs22JCkvn18 /PBw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19si1562124oii.54.2020.01.08.03.19.44; Wed, 08 Jan 2020 03:19:56 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727931AbgAHKsJ (ORCPT + 99 others); Wed, 8 Jan 2020 05:48:09 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:57867 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727478AbgAHKsH (ORCPT ); Wed, 8 Jan 2020 05:48:07 -0500 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ip8se-0000eb-56; Wed, 08 Jan 2020 11:48:04 +0100 Received: from mfe by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1ip8sd-000159-J6; Wed, 08 Jan 2020 11:48:03 +0100 From: Marco Felsch To: support.opensource@diasemi.com, lee.jones@linaro.org, robh+dt@kernel.org, linus.walleij@linaro.org, Adam.Thomson.Opensource@diasemi.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-gpio@vger.kernel.org Subject: [PATCH v4 2/3] mfd: da9062: add support for the DA9062 GPIOs in the core Date: Wed, 8 Jan 2020 11:47:45 +0100 Message-Id: <20200108104746.1765-3-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200108104746.1765-1-m.felsch@pengutronix.de> References: <20200108104746.1765-1-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the da9062 GPIO's aren't available. The patch adds the support to make these available by adding a gpio device with the corresponding irq resources. Furthermore the patch fixes a minor style issue for the onkey device. Signed-off-by: Marco Felsch Acked-by: Linus Walleij Reviewed-by: Adam Thomson Acked-for-MFD-by: Lee Jones --- drivers/mfd/da9062-core.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c index e69626867c26..5290bdc0ddcd 100644 --- a/drivers/mfd/da9062-core.c +++ b/drivers/mfd/da9062-core.c @@ -233,6 +233,14 @@ static struct resource da9062_onkey_resources[] = { DEFINE_RES_NAMED(DA9062_IRQ_ONKEY, 1, "ONKEY", IORESOURCE_IRQ), }; +static struct resource da9062_gpio_resources[] = { + DEFINE_RES_NAMED(DA9062_IRQ_GPI0, 1, "GPI0", IORESOURCE_IRQ), + DEFINE_RES_NAMED(DA9062_IRQ_GPI1, 1, "GPI1", IORESOURCE_IRQ), + DEFINE_RES_NAMED(DA9062_IRQ_GPI2, 1, "GPI2", IORESOURCE_IRQ), + DEFINE_RES_NAMED(DA9062_IRQ_GPI3, 1, "GPI3", IORESOURCE_IRQ), + DEFINE_RES_NAMED(DA9062_IRQ_GPI4, 1, "GPI4", IORESOURCE_IRQ), +}; + static const struct mfd_cell da9062_devs[] = { { .name = "da9062-core", @@ -266,7 +274,13 @@ static const struct mfd_cell da9062_devs[] = { .name = "da9062-onkey", .num_resources = ARRAY_SIZE(da9062_onkey_resources), .resources = da9062_onkey_resources, - .of_compatible = "dlg,da9062-onkey", + .of_compatible = "dlg,da9062-onkey", + }, + { + .name = "da9062-gpio", + .num_resources = ARRAY_SIZE(da9062_gpio_resources), + .resources = da9062_gpio_resources, + .of_compatible = "dlg,da9062-gpio", }, }; -- 2.20.1