From patchwork Fri Sep 9 08:42:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Niestroj X-Patchwork-Id: 9322697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D14E060231 for ; Fri, 9 Sep 2016 08:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF57729CFB for ; Fri, 9 Sep 2016 08:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B316329CFE; Fri, 9 Sep 2016 08:42:38 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6403229CFB for ; Fri, 9 Sep 2016 08:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753204AbcIIImh (ORCPT ); Fri, 9 Sep 2016 04:42:37 -0400 Received: from smtp2.megiteam.pl ([213.189.52.193]:49589 "EHLO smtp2.megiteam.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753191AbcIIIme (ORCPT ); Fri, 9 Sep 2016 04:42:34 -0400 Received: from [95.143.241.142] (helo=localhost.localdomain) by smtp.megiteam.pl with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1biHO9-0004s8-KZ; Fri, 09 Sep 2016 10:42:25 +0200 From: Marcin Niestroj To: Lee Jones Cc: Dmitry Torokhov , Tony Lindgren , Sebastian Reichel , Rob Herring , Pawel Moll , Grygorii Strashko , linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, Marcin Niestroj Subject: [PATCH v6 2/3] mfd: tps65217: Add power button as subdevice Date: Fri, 9 Sep 2016 10:42:03 +0200 Message-Id: <20160909084204.26226-3-m.niestroj@grinn-global.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160909084204.26226-1-m.niestroj@grinn-global.com> References: <20160909084204.26226-1-m.niestroj@grinn-global.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add tps65217 power buttor subdevice with assigned IRQ resources. Signed-off-by: Marcin Niestroj Acked-by: Lee Jones Acked-by: Tony Lindgren --- Depends on patch 1 in series Changes v1 -> v6: none drivers/mfd/tps65217.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index 41b5d59..57c8741 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c @@ -38,6 +38,10 @@ static struct resource charger_resources[] = { DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"), }; +static struct resource pb_resources[] = { + DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"), +}; + struct tps65217_irq { int mask; int interrupt; @@ -122,6 +126,12 @@ static struct mfd_cell tps65217s[] = { .resources = charger_resources, .of_compatible = "ti,tps65217-charger", }, + { + .name = "tps65217-pwrbutton", + .num_resources = ARRAY_SIZE(pb_resources), + .resources = pb_resources, + .of_compatible = "ti,tps65217-pwrbutton", + }, }; static irqreturn_t tps65217_irq_thread(int irq, void *data)