Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp184662ybf; Wed, 26 Feb 2020 11:07:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyu7Dem9A4WB/bG3pSC+zzZpk4CCjwBNOQfC6UtHx59kwc5FMEQfXseTh9hqWj3LrABLIV+ X-Received: by 2002:aca:5c46:: with SMTP id q67mr379075oib.75.1582744043393; Wed, 26 Feb 2020 11:07:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582744043; cv=none; d=google.com; s=arc-20160816; b=pv/q7H+B+Lr+2t1E20kKTUq7X8teSX8KnUF4lEpZVZ3iWSvGoOxLXjPM0q/TOjqsDa lN4B2b/yKSm8xUw9x2k5VlBtP981n5g5rWOQeR0ZbsaecQN7MJRQmLKnyDNezG7by7d8 1iVv6q4QDpPn1Q745+PpuLXtyOmtp5ca97dg3YQemEoJSO3Q1OX0A/0eU5XubqobYYiW OrSIGA1S+nJQlZ+pOobOl6b2tJxsGjxdQoCnWnNmNASCBuYbFd1q9KptFYqwnAypB3vm cAHLO9qfIxqq879RYOe068VcWgIUW9mZdVJb9Fc3rnOx5L7oHYZNG8UTjP+FvFw8trw8 Efsg== 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 :dkim-signature; bh=ZVqsLYoe5tqs4HBopzMiaobC9Iy9wu3AAViBaheYvVk=; b=g5PwOkAWeMltxM5wNDy/HatEPn6+ICa86QLxJ0EGr7CsmK+qUSICLc/cXAOZbKYugO 9h1LzXrTwGQjrlbIqxTljS6GHiXQoCDhjXwx/LPpMfanQPeGff9Cft7ot3LPWgdN370O G78nnHWoDkz2PVxpUsQlbiMCdnZ0B8sujyiSCeS/m3/Hf7CqTl/XwK/0KVsn13HotTg6 0EkTuLrIcLPQ77VBd+0TvdK9SIA0oi2mVicGPOreV01BaDZeIozYBRIkLYUiuNwpnIY8 ZUh5DLjQMf4tGJCT/qjVdZ19NLw/iNe6IV3xCTf9fJcuubjxniOGeUmQZgfOqx2wWvjq 8pDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=hOCZeoLW; 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 z18si229331otq.121.2020.02.26.11.07.11; Wed, 26 Feb 2020 11:07:23 -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; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=hOCZeoLW; 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 S1727308AbgBZTFk (ORCPT + 99 others); Wed, 26 Feb 2020 14:05:40 -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 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.0 (-) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; -- 2.11.0