From patchwork Wed Feb 26 19:05:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 204174 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80492C4BA24 for ; Wed, 26 Feb 2020 19:05:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DE022465D for ; Wed, 26 Feb 2020 19:05:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="H+X9nT83" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727127AbgBZTFZ (ORCPT ); Wed, 26 Feb 2020 14:05:25 -0500 Received: from mail.andi.de1.cc ([85.214.55.253]:56394 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727113AbgBZTFZ (ORCPT ); Wed, 26 Feb 2020 14:05:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hNBxo3WruCWru8MJuOpnvDdHkmmTti3FR1KFZs6vrOo=; b=H+X9nT83LljdzHtsJTKC76zeHc zHkQK1Ekt2Li0xZUDniP7DBZFCO5HrdB76i0io04/+7BoAjZbQFDuNWeT3irWMtFH+IuEwyKgR+C6 CogO3wj0vH4JReDu1lP5A64/VYpM9buFmMeWcF1yhBPexSpeKrxukf17z7B/7Q4/V03A=; Received: from p200300ccff0a4d00e2cec3fffe93fc31.dip0.t-ipconnect.de ([2003:cc:ff0a:4d00:e2ce:c3ff:fe93:fc31] helo=eeepc) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1j71zl-0007jX-2d; Wed, 26 Feb 2020 20:05:21 +0100 Received: from andi by eeepc with local (Exim 4.92) (envelope-from ) id 1j71zk-0001h6-Ij; Wed, 26 Feb 2020 20:05:20 +0100 From: Andreas Kemnade To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, a.zummo@towertech.it, alexandre.belloni@bootlin.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, stefan@agner.ch, b.galvani@gmail.com, phh@phh.me, letux-kernel@openphoenux.org, GNUtoo@cyberdimension.org Cc: Andreas Kemnade , Rob Herring Subject: [PATCH RESEND v5 1/5] dt-bindings: mfd: rn5t618: Document optional property interrupts Date: Wed, 26 Feb 2020 20:05:00 +0100 Message-Id: <20200226190504.6467-2-andreas@kemnade.info> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226190504.6467-1-andreas@kemnade.info> References: <20200226190504.6467-1-andreas@kemnade.info> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org These chips use interrupts for various things like RTC alarm. Signed-off-by: Andreas Kemnade Acked-for-MFD-by: Lee Jones Acked-by: Rob Herring --- Changes in v4: add refernce to interrupt binding documentation Documentation/devicetree/bindings/mfd/rn5t618.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/rn5t618.txt b/Documentation/devicetree/bindings/mfd/rn5t618.txt index b74e5e94d1cb..16778ea00dbc 100644 --- a/Documentation/devicetree/bindings/mfd/rn5t618.txt +++ b/Documentation/devicetree/bindings/mfd/rn5t618.txt @@ -15,6 +15,8 @@ Required properties: - reg: the I2C slave address of the device Optional properties: + - interrupts: interrupt mapping for IRQ + See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt - system-power-controller: See Documentation/devicetree/bindings/power/power-controller.txt @@ -32,6 +34,8 @@ Example: pmic@32 { compatible = "ricoh,rn5t618"; reg = <0x32>; + interrupt-parent = <&gpio5>; + interrupts = <11 IRQ_TYPE_EDGE_FALLING>; system-power-controller; regulators { From patchwork Wed Feb 26 19:05:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 204172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE03DC4BA24 for ; Wed, 26 Feb 2020 19:05:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C47812072D for ; Wed, 26 Feb 2020 19:05:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="hOCZeoLW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727277AbgBZTFj (ORCPT ); Wed, 26 Feb 2020 14:05:39 -0500 Received: from mail.andi.de1.cc ([85.214.55.253]:56882 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727126AbgBZTFi (ORCPT ); Wed, 26 Feb 2020 14:05:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZVqsLYoe5tqs4HBopzMiaobC9Iy9wu3AAViBaheYvVk=; b=hOCZeoLWJof4eHOdaTQDCu6AKe R85hxJ+wt+o8MmSnClk5gHSt+bzeWKZaxTDDUFt4aQ1haGs1JrlPoddHUqi7AQqbB/m78hzg0oGZR 8j1r3dNb0MwhTPD7taapTUyP3UKcmbd8GoqVW4zymheo6OtO0VJi7ILmQhWOSClUzKrE=; Received: from p200300ccff0a4d00e2cec3fffe93fc31.dip0.t-ipconnect.de ([2003:cc:ff0a:4d00:e2ce:c3ff:fe93:fc31] helo=eeepc) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1j71zy-0007kY-MQ; Wed, 26 Feb 2020 20:05:34 +0100 Received: from andi by eeepc with local (Exim 4.92) (envelope-from ) id 1j71zy-0001hF-57; Wed, 26 Feb 2020 20:05:34 +0100 From: Andreas Kemnade To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, a.zummo@towertech.it, alexandre.belloni@bootlin.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, stefan@agner.ch, b.galvani@gmail.com, phh@phh.me, letux-kernel@openphoenux.org, GNUtoo@cyberdimension.org Cc: Andreas Kemnade Subject: [PATCH RESEND v5 4/5] mfd: rn5t618: add more subdevices Date: Wed, 26 Feb 2020 20:05:03 +0100 Message-Id: <20200226190504.6467-5-andreas@kemnade.info> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226190504.6467-1-andreas@kemnade.info> References: <20200226190504.6467-1-andreas@kemnade.info> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The RC5T619 has a RTC which is missing in the RN5T618. Add it as subdevice to prepare for their implementation. Signed-off-by: Andreas Kemnade --- Changes in v3: - alignment cleanup drivers/mfd/rn5t618.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c index 6bdc5a023cbf..ec378715137b 100644 --- a/drivers/mfd/rn5t618.c +++ b/drivers/mfd/rn5t618.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -22,6 +23,12 @@ static const struct mfd_cell rn5t618_cells[] = { { .name = "rn5t618-wdt" }, }; +static const struct mfd_cell rc5t619_cells[] = { + { .name = "rn5t618-regulator" }, + { .name = "rc5t619-rtc" }, + { .name = "rn5t618-wdt" }, +}; + static bool rn5t618_volatile_reg(struct device *dev, unsigned int reg) { switch (reg) { @@ -173,8 +180,16 @@ static int rn5t618_i2c_probe(struct i2c_client *i2c, return ret; } - ret = devm_mfd_add_devices(&i2c->dev, -1, rn5t618_cells, - ARRAY_SIZE(rn5t618_cells), NULL, 0, NULL); + if (priv->variant == RC5T619) + ret = devm_mfd_add_devices(&i2c->dev, PLATFORM_DEVID_NONE, + rc5t619_cells, + ARRAY_SIZE(rc5t619_cells), + NULL, 0, NULL); + else + ret = devm_mfd_add_devices(&i2c->dev, PLATFORM_DEVID_NONE, + rn5t618_cells, + ARRAY_SIZE(rn5t618_cells), + NULL, 0, NULL); if (ret) { dev_err(&i2c->dev, "failed to add sub-devices: %d\n", ret); return ret;