Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3129455ybl; Fri, 20 Dec 2019 04:26:28 -0800 (PST) X-Google-Smtp-Source: APXvYqzjdcrMPnuYm9vOuBa2dEW23x94s1ynnG2gQpq618cM66C6SsR9CV0aF7pyqqgqld9BBtsv X-Received: by 2002:a05:6830:1715:: with SMTP id 21mr15103844otk.67.1576844788082; Fri, 20 Dec 2019 04:26:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576844788; cv=none; d=google.com; s=arc-20160816; b=vWLpIUP+8OkIfFZuKiUxx888GV3B62Gbfp6adcqrsm3Ee6Z81Uv75jxnIh9GY/HHSi dBeaX2QzDHMNzLYe9BEjS2WVMwEWovuxu51NzxUOPRZ4MSvmWKfZXG6oSr2PkSzCp3mD HlUqJO+/2MMz9pjX8ERIF4gE4Lc7FQkzcVfppR5+RONR/UDWL94QDKddgnQ+9Jfw92pc /qOPlHFQuHcw95+jKCXyJWldiLo8H8bOZEN2YwyP8gNVYfbisehtmtQ6A2RvV20fCRW7 MrYyOj1D+0Roihn+s3B1Ach+NCcOpA/lwAGW0BjCVS9drFQKwVJjcAEkkGUrgW51Jd+5 WeTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=q7Pl04+25XaAjE2x9uF6zsDQzpaHxRr7Osf7kSzlnZI=; b=cRa6l7qe2Qd90Bge3MYZtLkX+IEvhyhdCGxEPayrNzsAu9+a5k9BX/CWR2Ddj/hvVF lV00fMSqfNzPNLC/doKXpQBPPXF98un99SGTf8UwYHJEkQfC0kdZqeo2+86aDCPY5OiY O7DlUxvcWQlCZGiUOM18yyg1kPc1yj7wo8xAaBTsW3M744Os4w1Qg87IqatmgF8QckET 26g8iOUn16hBBq9zATs+59HoFjgzBXxe0Wy/GiTp2xFODeoBrDc/TpeZhqmOrFXY3/ae 3F0CvPrnOqhWELeKCBPCmA7A03ox7vm40z6aUB51e8JYaACBIIAtLfwXqN4NpTT1WAuX 5s7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=ASNoFJRQ; 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 m4si4993055otn.281.2019.12.20.04.26.16; Fri, 20 Dec 2019 04:26:28 -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=ASNoFJRQ; 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 S1727401AbfLTMY4 (ORCPT + 99 others); Fri, 20 Dec 2019 07:24:56 -0500 Received: from mail.andi.de1.cc ([85.214.55.253]:48360 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727346AbfLTMY4 (ORCPT ); Fri, 20 Dec 2019 07:24:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=References:In-Reply-To:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding: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=q7Pl04+25XaAjE2x9uF6zsDQzpaHxRr7Osf7kSzlnZI=; b=ASNoFJRQG7/VkrK8hr04zadi7 ZsALiXvrb3/UXcAzLbpnfRguYxa/13dnhb3ukoG07kjczAdxcoI7lhdLJhFOpiXrSsf3oF1GsFPaa 4Coxq5bTIA6PM+ryOCA2GE16OXyhDGZQGnLimOxrmyqSs4c13JjjDqVTE666nYp/5mIEA=; Received: from [2a02:790:ff:1019:7ee9:d3ff:fe1f:a246] (helo=localhost) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iiHKq-0001zU-UV; Fri, 20 Dec 2019 13:24:49 +0100 Received: from andi by localhost with local (Exim 4.89) (envelope-from ) id 1iiHKo-0008Tl-K8; Fri, 20 Dec 2019 13:24:46 +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 Cc: Andreas Kemnade Subject: [PATCH v5 4/5] mfd: rn5t618: add more subdevices Date: Fri, 20 Dec 2019 13:24:15 +0100 Message-Id: <20191220122416.31881-5-andreas@kemnade.info> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191220122416.31881-1-andreas@kemnade.info> References: <20191220122416.31881-1-andreas@kemnade.info> 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