Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp4076147rdb; Wed, 30 Aug 2023 15:03:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJ4/tvDPdbVyC3MQ73/EcJ2hUUWYGiHkLZvIGq0tqdz1BR1LgoXLTnUQuvZVk/jcLuLfIL X-Received: by 2002:a19:384c:0:b0:500:ac76:4a61 with SMTP id d12-20020a19384c000000b00500ac764a61mr1986889lfj.65.1693432980531; Wed, 30 Aug 2023 15:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693432980; cv=none; d=google.com; s=arc-20160816; b=Z45L2++Ineqr7sIKGMR6+TWY9tAYF5Acx+BAiZhy9ts+q+zA4+ruwNIWApyNe3/pxJ 9uYrp0/Qeci32T4DI9tSr0A5e/j9NUeAg9s2MLQQeFrw1p0FxjoXYBdUKVJreADrc4II njmfedR7NRnXyYHZ1LVzQQrBbkuj121w6u7FW98EsNwM7iHOnbX2/9hu9ghZpvya8pbs METhW4Xk6RrSGDZxoxY4QO+t46xJsUPKPs/QrYRjIhRpdSHPbcOxHr881AtwbGwShKPJ GEHpfBS1tRuo2RwfFhX02S1LYXPyTMoBG3bYk34Nyng/JnjJUH8lwFZzXV64d+zpqPRe pMzA== 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:cc:to:from; bh=0NvdYAhKoqPjrLzK4+BCg92jO0TTLIOfhA9PTZg28Tc=; fh=5PJcE6eka+7wIFURK9O4vXUIGQlaKCJZxOh+QCn9HFU=; b=wtmBNmsS/UHScva0u4lrNWmk/UAV6ztmPcNxvDWE/xQONozFgbaKCpcfxKsT/crgaN 2CtRzRcAX7KMQi0Mb9dyQ8JCLs3CUY4qyEGqakBFjyNZH4nEYc6EFRsd2JwlaAPVWf92 OpaysGhm7kE1OsJxWNFT3ZR85j0QsiRoDcTGZ+Yit67Dqr8wrLbOeRCDtqtEm1PzOUQl J91MToO/bTnkokMRxJvQLn3+Z7jByh4kfXRFsulAmOCLOpe/q/dSUUKqEbQuUV4A4r3u Ij3MnSJrqR8qpmpCy37PVLvNjepqw+bUmpCtSWZ/CVK8+9jyv2puvxgGpp6TBgLtCn3B 4lJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v17-20020a056402185100b005256d6fb974si111318edy.92.2023.08.30.15.02.07; Wed, 30 Aug 2023 15:03:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244665AbjH3Swl (ORCPT + 99 others); Wed, 30 Aug 2023 14:52:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344197AbjH3SUz (ORCPT ); Wed, 30 Aug 2023 14:20:55 -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 D5CEE1A3; Wed, 30 Aug 2023 11:20:51 -0700 (PDT) Received: from p200300ccff199c001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff19:9c00: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 1qbPo4-003BZ5-7P; Wed, 30 Aug 2023 20:20:44 +0200 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1qbPo3-003gUA-2x; Wed, 30 Aug 2023 20:20:43 +0200 From: Andreas Kemnade To: lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, bcousson@baylibre.com, tony@atomide.com, mturquette@baylibre.com, sboyd@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-clk@vger.kernel.org Cc: Andreas Kemnade Subject: [PATCH v2 3/5] mfd: twl-core: Add a clock subdevice for the TWL6032 Date: Wed, 30 Aug 2023 20:20:36 +0200 Message-Id: <20230830182038.878265-4-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230830182038.878265-1-andreas@kemnade.info> References: <20230830182038.878265-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 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