From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753716AbdHUB3l (ORCPT ); Sun, 20 Aug 2017 21:29:41 -0400 Received: from gloria.sntech.de ([95.129.55.99]:49378 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753485AbdHUB25 (ORCPT ); Sun, 20 Aug 2017 21:28:57 -0400 From: Heiko Stuebner To: lee.jones@linaro.org Cc: chenjh@rock-chips.com, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner Subject: [PATCH v9 RESEND 9/9] mfd: rk808: Add RK805 power key support Date: Mon, 21 Aug 2017 03:28:42 +0200 Message-Id: <20170821012842.17875-10-heiko@sntech.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170821012842.17875-1-heiko@sntech.de> References: <20170821012842.17875-1-heiko@sntech.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joseph Chen Signed-off-by: Joseph Chen Acked-for-MFD-by: Lee Jones Signed-off-by: Heiko Stuebner --- drivers/mfd/rk808.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c index c803d2d5dfb7..216fbf6adec9 100644 --- a/drivers/mfd/rk808.c +++ b/drivers/mfd/rk808.c @@ -94,6 +94,19 @@ static struct resource rtc_resources[] = { } }; +static struct resource rk805_key_resources[] = { + { + .start = RK805_IRQ_PWRON_FALL, + .end = RK805_IRQ_PWRON_FALL, + .flags = IORESOURCE_IRQ, + }, + { + .start = RK805_IRQ_PWRON_RISE, + .end = RK805_IRQ_PWRON_RISE, + .flags = IORESOURCE_IRQ, + } +}; + static const struct mfd_cell rk805s[] = { { .name = "rk808-clkout", }, { .name = "rk808-regulator", }, @@ -103,6 +116,10 @@ static const struct mfd_cell rk805s[] = { .num_resources = ARRAY_SIZE(rtc_resources), .resources = &rtc_resources[0], }, + { .name = "rk805-pwrkey", + .num_resources = ARRAY_SIZE(rk805_key_resources), + .resources = &rk805_key_resources[0], + }, }; static const struct mfd_cell rk808s[] = { -- 2.14.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Stuebner Subject: [PATCH v9 RESEND 9/9] mfd: rk808: Add RK805 power key support Date: Mon, 21 Aug 2017 03:28:42 +0200 Message-ID: <20170821012842.17875-10-heiko@sntech.de> References: <20170821012842.17875-1-heiko@sntech.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170821012842.17875-1-heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Heiko Stuebner , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, chenjh-TNX95d0MmH7DzftRWevZcw@public.gmane.org List-Id: devicetree@vger.kernel.org From: Joseph Chen Signed-off-by: Joseph Chen Acked-for-MFD-by: Lee Jones Signed-off-by: Heiko Stuebner --- drivers/mfd/rk808.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c index c803d2d5dfb7..216fbf6adec9 100644 --- a/drivers/mfd/rk808.c +++ b/drivers/mfd/rk808.c @@ -94,6 +94,19 @@ static struct resource rtc_resources[] = { } }; +static struct resource rk805_key_resources[] = { + { + .start = RK805_IRQ_PWRON_FALL, + .end = RK805_IRQ_PWRON_FALL, + .flags = IORESOURCE_IRQ, + }, + { + .start = RK805_IRQ_PWRON_RISE, + .end = RK805_IRQ_PWRON_RISE, + .flags = IORESOURCE_IRQ, + } +}; + static const struct mfd_cell rk805s[] = { { .name = "rk808-clkout", }, { .name = "rk808-regulator", }, @@ -103,6 +116,10 @@ static const struct mfd_cell rk805s[] = { .num_resources = ARRAY_SIZE(rtc_resources), .resources = &rtc_resources[0], }, + { .name = "rk805-pwrkey", + .num_resources = ARRAY_SIZE(rk805_key_resources), + .resources = &rk805_key_resources[0], + }, }; static const struct mfd_cell rk808s[] = { -- 2.14.1