Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp412004ybb; Fri, 20 Mar 2020 01:12:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsFfHv2HjLr8+qz12GMHqy0q8OUEwALKOg2L6Qq8Wiyij/SHvie9r+YLZNRjKrvtMc1als9 X-Received: by 2002:a05:6830:1ac1:: with SMTP id r1mr860349otc.139.1584691933784; Fri, 20 Mar 2020 01:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584691933; cv=none; d=google.com; s=arc-20160816; b=Mofojl3GntA3bo9Nt/SGLIPR0gj7lnsB2PoFxVWFhAcBVeyE2yEzAeP2suPaTPOpmK 845mOmbIZyYM0nTVYk4rNDM9LLLI3Fs7a88ng6K+eeia8LwA8VkV21e1ZfJzRGAdL2TB u8qFqCkgEvxHil5iyuk7/EXRePliuVQbr1zr4BTMLMtNft4d/iHtLemAdJd3rBp4Qdy5 Rbw0+AeeC6iIS2zhm5VMPjiyOlPmaKleSiqw6Rn8Dl4Bz5emLSStIMm6WI8j71wWJQN0 dhkdsMby6+lfQEGZJvs00fMU3pMxOqk5wSxqBc5t+V2mE0H87DhfTPEBdyp5WQkJYCFU 5uwg== 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=HmIK2NGFOH4BtXBgdzImt8JfFOfa3vebJbRC3dmAtks=; b=rZxz/mu57CCdXdFN46pDgW7vmP0z2dqJ0+hGw0isQ4Rpeg03JQhBhUE3i0k8n7KV2o TiMrrG655HhrIl5iVAmINPP4EgeZFJf4WGwrb3/cChP+BwFIM7dUmhVAMXKSFwqx9O3h lWqHIQ81kflSsm4oS+uvjnD0iLENF3dzx00aLRhp6Y0/ckMpQT1b5IJt/75NiUmmv75B 0x7CUXdhUFu3TocFxj+gOMY0J/qfCHLsuHyr3XcwcoHK8crtbIwIR9bWFx0qxDZVCGqm ECBZbrxctjWKf5PFgLHoJrVokzePBHBDp/9cDBL2OzljzAP+wMZuu5QmGCjrGLViyLj2 nvNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=A3NZJngu; 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 e40si2753664ote.145.2020.03.20.01.12.01; Fri, 20 Mar 2020 01:12:13 -0700 (PDT) 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=A3NZJngu; 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 S1727056AbgCTILj (ORCPT + 99 others); Fri, 20 Mar 2020 04:11:39 -0400 Received: from mail.andi.de1.cc ([85.214.55.253]:51330 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726814AbgCTILa (ORCPT ); Fri, 20 Mar 2020 04:11:30 -0400 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=HmIK2NGFOH4BtXBgdzImt8JfFOfa3vebJbRC3dmAtks=; b=A3NZJngupKcZ0ByfhcyQE/rDVH WU4ufi5tYyA/OzG2rykN8nG9/8eIbg4TBX/tkNcnwmQ8MwroPAAjx3a9rPzBJQHj1qVQZjIAdTN1k Sx6syK14WtaDWlUaZH3Cxx7vCPrsKz9oVak5TzEaZ5+m9Ax/41Ry0nyV9vX0yXqkG9aw=; Received: from p200300ccff093a00e2cec3fffe93fc31.dip0.t-ipconnect.de ([2003:cc:ff09:3a00: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 1jFCkP-00058j-VB; Fri, 20 Mar 2020 09:11:19 +0100 Received: from andi by eeepc with local (Exim 4.92) (envelope-from ) id 1jFCkI-00039Q-7o; Fri, 20 Mar 2020 09:11:10 +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, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, jic23@kernel.org Cc: Andreas Kemnade Subject: [PATCH v7 4/7] mfd: rn5t618: add more subdevices Date: Fri, 20 Mar 2020 09:11:02 +0100 Message-Id: <20200320081105.12026-5-andreas@kemnade.info> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200320081105.12026-1-andreas@kemnade.info> References: <20200320081105.12026-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 Since the RC5T619 has a RTC, use a separate subdevice list for that. The ADC should be the same as in the RN5T618, according to drivers in the wild, but since it is not tested, the ADC is only added for the RC5T619. Signed-off-by: Andreas Kemnade --- Changes in v6: - squashed with patch from former ADC patchset Changes in v3: - alignment cleanup drivers/mfd/rn5t618.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c index 7686cc36e8c0..bc117adede4c 100644 --- a/drivers/mfd/rn5t618.c +++ b/drivers/mfd/rn5t618.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -22,6 +23,13 @@ static const struct mfd_cell rn5t618_cells[] = { { .name = "rn5t618-wdt" }, }; +static const struct mfd_cell rc5t619_cells[] = { + { .name = "rn5t618-adc" }, + { .name = "rn5t618-regulator" }, + { .name = "rc5t619-rtc" }, + { .name = "rn5t618-wdt" }, +}; + static bool rn5t618_volatile_reg(struct device *dev, unsigned int reg) { switch (reg) { @@ -167,8 +175,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.20.1