Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp55133ybl; Wed, 11 Dec 2019 13:55:31 -0800 (PST) X-Google-Smtp-Source: APXvYqx8ofTRj5UQr9qK+hDE8IildTy+EJvJS8OsiHfZAyhk3LRZNsDLu0He34XKdpc2KP0ThQMN X-Received: by 2002:a05:6830:1199:: with SMTP id u25mr3982883otq.344.1576101331646; Wed, 11 Dec 2019 13:55:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576101331; cv=none; d=google.com; s=arc-20160816; b=yz5yb5sN05lYAAyDceh1vxTbukg4z/ZMIXkf+daV5X546fwheLnyd7qjJOZEzx4NC9 GoXzROHDKHpCrMZ+IdbbjDht7/y1h8XlODA+Yk9WEmD1WS6LKUCiULgeMrB8Wtmsur9n TFSNhdk3mb/LLO9ddqdm3/jy8YmrtUCQYWpb01wwm5BBKRU9dpFyModn0yWvL8U0CVTY d2161e6PmJ6pm4dFNxkKz+MP7U4bCXPQjda7hfGCRnWF3awXEORKtsaDyTvpMHiFeRwb 1buqinidpBRIQV0H0Ea+1j7O+yRr3N14340DIimGS+glqNF3WlR7Puyk40tByryZa8EG M26Q== 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=kGD/toduG8NeGpobD+AS75VlJRn2io/48ZXs9RF9Hlc=; b=j/veI/XupOBKTxbWtEXPSorI9ALZCgCEGkJmbxfeMD03QQLaiqWjFAoMGieH0nEZc/ X9h7ZfHOsScdSMUrPM3N981EOxyZuRyPJZVfJEtJ5KQ4u2w3kU6ZHHymqlyoNNm+uZjJ QgOYE0TrKFcf4VQzWf2uu+vDWIosuPYeD0l1gbq0j7MpXgxDmVY9CYBCYXvY9tw0tQpk pPdSPux4+tJQCusx9XbRr46q6kXE31jig9YJskoti0UnoDa9d+VOdFRVorW4td45GmRb vfrUV1GuCLqWbqUGA6imyGMBX6eer+cMmKjNCeYzRtjpdBirp7AgMCy0Z7z1rpxFrqjB Taew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=gNJtd1kI; 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 c24si1738936otf.14.2019.12.11.13.55.18; Wed, 11 Dec 2019 13:55:31 -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=gNJtd1kI; 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 S1726953AbfLKVyn (ORCPT + 99 others); Wed, 11 Dec 2019 16:54:43 -0500 Received: from mail.andi.de1.cc ([85.214.55.253]:36696 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726646AbfLKVye (ORCPT ); Wed, 11 Dec 2019 16:54:34 -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=kGD/toduG8NeGpobD+AS75VlJRn2io/48ZXs9RF9Hlc=; b=gNJtd1kIGwtSRJQsHaWd47kah KsWoRdX1NFmxwnKEM5U/7JsiyroEwpcfcNHjtGRvlb+GzKISeQeKoUZGB8VZ8YkoNYGrjcqehUgt2 Ae2/mOk6SL6yzpjjI2QgBpldjM+3bN/c402vMsblDVY/GhDKxtGk4O3ey9Vf9yk9NQYVU=; Received: from p5dcc331a.dip0.t-ipconnect.de ([93.204.51.26] helo=eeepc) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1if9wB-0002Ee-5L; Wed, 11 Dec 2019 22:54:28 +0100 Received: from andi by eeepc with local (Exim 4.89) (envelope-from ) id 1if9wA-00005i-6N; Wed, 11 Dec 2019 22:54: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 v4 4/5] mfd: rn5t618: add more subdevices Date: Wed, 11 Dec 2019 22:54:08 +0100 Message-Id: <20191211215409.32764-5-andreas@kemnade.info> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191211215409.32764-1-andreas@kemnade.info> References: <20191211215409.32764-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 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c index d78eb29b94a4..18d56a732b20 100644 --- a/drivers/mfd/rn5t618.c +++ b/drivers/mfd/rn5t618.c @@ -22,6 +22,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 +179,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.11.0