Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5102177rdb; Sat, 16 Sep 2023 03:08:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFo0xVzjb6eMy77ItMuY1RRMllnHo2c8YI6fnCpPovyi/nYSmdVpihKXkeHyT0IpcvA1L0j X-Received: by 2002:a05:6a20:5611:b0:14d:382c:f908 with SMTP id ir17-20020a056a20561100b0014d382cf908mr3890701pzc.32.1694858900046; Sat, 16 Sep 2023 03:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694858900; cv=none; d=google.com; s=arc-20160816; b=TW/XHeIV1i+zA7FFE68E+015kAYA9fmFlj9hYxzmUr1VVavUoGYmD7c3jmFoK1dPoL 2vTAlUtvbd//0Ung4CQWZqz17p0VtPUH/8HYAiNpkdq7CW6Osyn8k4aAHKVW47X4AMa9 GF5vgIj3Hl8lVVUJ4rg7oiV6R4bCskBVdU+V46wWwDKUxo7Xt9Nh6hUssg83rX3orUiR y24ApJCAyOC96/b76sLGK9b5lUwwzA8NFxmWci1ucNty2QhD7+CuY6Jbgk6nVT+YxmDt CPkh+iaG0jkH45yWZbGj60kg9B3dggQdV7KEs78zZKaR5v0cFo3bTjUzXeJeDMUCBx3I A/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=0NvdYAhKoqPjrLzK4+BCg92jO0TTLIOfhA9PTZg28Tc=; fh=0qBo2YP1jey5SoWIG9Z/Z6nPioqMXIxuGlTiNE4HmqM=; b=kS7Rg0+BIEPqwkLj1Go3B2fm3RM+9N1fP+IKo+fgPM2yzK0OMykUKhpMgq2x7Nwnr+ TlWfoHKWurHT+NmnVivKseUqL0XA4bIxOWVdfp4UiyZevHrQTe7WSVBx8JnNT9Z/aYFP QC5cXDJp4xFatGIqC6YZTiew2Dd+jiJMzjiHBjy+M9Bs7OuO2ingY+zoYZKpy3hs4+0g rjvOjdPeXNcwMUtZiu6He6LNXv6QJJwe7IrKDZWgADLUnksGnwQ9hZIGvK+Y0Y1mxOYn ss6vq+y1RwlRfHwx6thxqJFY/VmnrjKngxlfQNy3Wmf7hDFLEx9ikh+EqeUSkvFE94Px 5Z6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t9-20020a056a0021c900b0068fbd15c036si4923886pfj.286.2023.09.16.03.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 03:08:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AE208836EABB; Sat, 16 Sep 2023 03:08:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239029AbjIPKF7 (ORCPT + 99 others); Sat, 16 Sep 2023 06:05:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233890AbjIPKFd (ORCPT ); Sat, 16 Sep 2023 06:05:33 -0400 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a02:c205:3004:2154::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D803ACD5; Sat, 16 Sep 2023 03:05:26 -0700 (PDT) Received: from p200300ccff1003001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff10:300:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qhSB0-003pjL-5f; Sat, 16 Sep 2023 12:05:21 +0200 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1qhSAz-006vKu-1S; Sat, 16 Sep 2023 12:05:21 +0200 From: Andreas Kemnade To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lee@kernel.org, bcousson@baylibre.com, tony@atomide.com, mturquette@baylibre.com, sboyd@kernel.org, andreas@kemnade.info, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH v4 3/5] mfd: twl-core: Add a clock subdevice for the TWL6032 Date: Sat, 16 Sep 2023 12:05:13 +0200 Message-Id: <20230916100515.1650336-4-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230916100515.1650336-1-andreas@kemnade.info> References: <20230916100515.1650336-1-andreas@kemnade.info> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 16 Sep 2023 03:08:06 -0700 (PDT) Clock device needs no separate devicetree node, so add it as a platform device. Other devices in the family also have controllable clocks, but due to the lack of testing, just add it for the TWL6032 now. Signed-off-by: Andreas Kemnade --- drivers/mfd/twl-core.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index ce01a87f8dc39..234500b2e53fc 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -31,6 +31,8 @@ #include #include + +#include #include /* Register descriptions for audio */ @@ -690,6 +692,10 @@ static struct of_dev_auxdata twl_auxdata_lookup[] = { { /* sentinel */ }, }; +static const struct mfd_cell twl6032_cells[] = { + { .name = "twl6032-clk" }, +}; + /* NOTE: This driver only handles a single twl4030/tps659x0 chip */ static int twl_probe(struct i2c_client *client) @@ -836,6 +842,16 @@ twl_probe(struct i2c_client *client) TWL4030_DCDC_GLOBAL_CFG); } + if (id->driver_data == (TWL6030_CLASS | TWL6032_SUBCLASS)) { + status = devm_mfd_add_devices(&client->dev, + PLATFORM_DEVID_NONE, + twl6032_cells, + ARRAY_SIZE(twl6032_cells), + NULL, 0, NULL); + if (status < 0) + goto free; + } + status = of_platform_populate(node, NULL, twl_auxdata_lookup, &client->dev); -- 2.39.2