Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp8599281ybc; Fri, 29 Nov 2019 13:23:03 -0800 (PST) X-Google-Smtp-Source: APXvYqw/XZTbJ5uiE1GTYGL1l6Ah4BndHN+C8/sNO/QNQ4z3t1zPeSNDYhKoBRqijV3tOaeU5ILw X-Received: by 2002:a50:de47:: with SMTP id a7mr47836553edl.77.1575062583240; Fri, 29 Nov 2019 13:23:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575062583; cv=none; d=google.com; s=arc-20160816; b=SNBw/XyJdZmuqvkb0MdGKnpGSBgWMRcDoHQ5X09GseKN5TWGePRXLLWb27PMgCcYW/ F4d0BD0gJqjonnDBAfJg8NrujAIppqSTJ+EVdHYkE/k/a2j5pX4uF39lZNqiibGGj0/a FF14Uqg5k/Hwuc0xrqV7ealYH2wiw6oYSgJzbMm6MTb8/5DduRwomUuHBr9yqZMJ3+GL LGn83G+25R2b53KmvX3yJoNo931p3fgkN3h7QHgzOKeJir4C+topBmAS0JW/3H3GmP1Y zzl0CNwDOYdb+ZcA29y+obDfngqmFzHPtKRvp4ceuSkIDqgu0rQ58d8IlmZelK53Up7i unHg== 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=xIt2KAWv08Ks4SoHFbcybKRUuKLcopyb30N+8C+J2a4=; b=iV16eCuEftTDrD87fziQtPP+KuTHCckH3bROGee+aGu9+/ig0nUUSDtk42VPoAfUvO jSWeO2Ld/O/0Rct7DJSd5Kr9XyznvkVDGuWDlw7OhxPWDy1J/+xbKOcPqRuWelObh84J 1Ea4t/VGHdP9Q+mgZfUjBO1BseQPTA249IAWNCCouWaXOl3vz8Gvu30uqAVgPFwOJdGq wNtioEes2lpI/AGiLq2WhVrn2dTTpWJWa1Q6/oV3Mqoyy302rqP8mYEGCGX5c6q1uEZQ oaFxbhvGhqAfIZ2Cf+xRILS7aFMOcHI+LKU/3t7EAvlmFmRVg/lIPJvcJcCjuqXSSe8F xkkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b="JSbL/zNk"; 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 x1si14249485ejd.109.2019.11.29.13.22.40; Fri, 29 Nov 2019 13:23:03 -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="JSbL/zNk"; 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 S1727299AbfK2VVe (ORCPT + 99 others); Fri, 29 Nov 2019 16:21:34 -0500 Received: from mail.andi.de1.cc ([85.214.55.253]:52258 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727237AbfK2VVa (ORCPT ); Fri, 29 Nov 2019 16:21:30 -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=xIt2KAWv08Ks4SoHFbcybKRUuKLcopyb30N+8C+J2a4=; b=JSbL/zNkilynp04KxFvYFosgHc JU68tl8T4t2OKetgqFkRnQnI4Ev+HUW7Xui5lMVQRHAghP1ITLot1S4MlHfVSWSKgxQlsKnWBrDUj UOU0QDKP3g/BDhUrR3SZ8zTQUtamp2Ret2AjYFY+sMJjj6kb2vzGb6N7YM97xi3+sBqE=; Received: from p200300ccff0871001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff08:7100:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ianhe-0001yw-Ag; Fri, 29 Nov 2019 22:21:26 +0100 Received: from andi by aktux with local (Exim 4.92) (envelope-from ) id 1ianhe-0004mf-1q; Fri, 29 Nov 2019 22:21:26 +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 v3 5/6] mfd: rn5t618: add more subdevices Date: Fri, 29 Nov 2019 22:20:44 +0100 Message-Id: <20191129212045.18325-6-andreas@kemnade.info> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191129212045.18325-1-andreas@kemnade.info> References: <20191129212045.18325-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-core.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/rn5t618-core.c b/drivers/mfd/rn5t618-core.c index fe56c5a50563..d3f137796cab 100644 --- a/drivers/mfd/rn5t618-core.c +++ b/drivers/mfd/rn5t618-core.c @@ -21,6 +21,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) { @@ -117,8 +123,14 @@ 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, -1, rc5t619_cells, + ARRAY_SIZE(rc5t619_cells), + NULL, 0, NULL); + else + ret = devm_mfd_add_devices(&i2c->dev, -1, 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