Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2379128rdb; Mon, 11 Sep 2023 23:00:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFyaaVzbNBcLaMGAkM+a8+CnNkovVpA6AFc6H7n0h4EmCkhqiCu2lEXXKXdHiLOdUraoUqb X-Received: by 2002:a9d:68d3:0:b0:6bb:1071:ea72 with SMTP id i19-20020a9d68d3000000b006bb1071ea72mr11453381oto.36.1694498416066; Mon, 11 Sep 2023 23:00:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694498416; cv=none; d=google.com; s=arc-20160816; b=qxIZ2eEru7EpGekS0jwmTj+fq0eD+P925qDOJOVoEhH6Dok8c+8KBMcJt5fZmavqNP S3DU0NSjH/St7IqMdu8G0o8GkE7+5e3fc1Ui77BGdWQJJmhzd2KgJdKcO80lXaLJVWw2 a9MmY/pES8sHPCU+XOj6JEsnDPR9yGLJOrdis54TFPuzB48VnN+STuKJcZOVDJwXfbol 5SjluYIdBMb8FnquXNF7ha3vvZyCg6dOyvPl9T6LV4qZHfJ7fPsGo4OLKHU8xX+XC6jx d3Yg9ixEMFblqsQEQL+u0DoHecp0aEL9QdrzQIxctAc5y08KIAkSvGfV45X5OfPn6Hr/ 6oIw== 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=kopzEoUNaAvyrfsgq0rzWxLF7dqFs0N/2Frz55B44yfV2JCTPKjDVBxFYpBUMLdm5U T6NAYkb3FqNKVFNdTNJ2LB+8n3v/aCF0TIN3taRa0xT3IchwTYDxXGrlgRjxIFWQn4mZ EHJo8UoThM9Sym4S4Av+fDsLjL30Fd95B2G1vLdU4qnbTc6XOfCeXIbANfsIxqccfNL9 t8t9htW7Dh1tBswUnihb6DrLQgppryiyH57NMcriVxj+PIPcFR9qqklzWKjn0TcXybSi julAg1WR2LLwKoA1MmYXyokVA9E31sEwNxbXs/PmOWujXixZyZDPSD5YlNFzWfFkzF0F mnuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id w6-20020a056a0014c600b0068fbace5bfcsi3826994pfu.149.2023.09.11.23.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 23:00:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 5932381410FC; Mon, 11 Sep 2023 21:09:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238912AbjILCbv (ORCPT + 99 others); Mon, 11 Sep 2023 22:31:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239275AbjILCb1 (ORCPT ); Mon, 11 Sep 2023 22:31:27 -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 6189610489D; Mon, 11 Sep 2023 18:56:25 -0700 (PDT) Received: from p200300ccff36fa001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff36:fa00: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 1qfpAE-003crY-3O; Tue, 12 Sep 2023 00:13:50 +0200 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1qfpAD-006ECq-2M; Tue, 12 Sep 2023 00:13:49 +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 v3 3/5] mfd: twl-core: Add a clock subdevice for the TWL6032 Date: Tue, 12 Sep 2023 00:13:44 +0200 Message-Id: <20230911221346.1484543-4-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230911221346.1484543-1-andreas@kemnade.info> References: <20230911221346.1484543-1-andreas@kemnade.info> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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]); Mon, 11 Sep 2023 21:09:24 -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