From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796391442; b=B7lA4z4ARRgcXPNOkKSEHplOgsi1olMTrU9tiVE+je0QANpuWEl/QMNTtcAryB8J3O32 NMbZvzqGYXS6XDxfbnsEwA6GbxUixBlQ/DMi76y2xgvkeJMnFjYfdrg6VrNqPles9Gxd8 12f20MFIAXAZ5ZIsN6wR2knzQzfzTovqShIu0O7EEYDysy+7kz4hiG8pTbuCBskmyiftG Ssv68Io6eCzlof/L4hQerqGtZ2/RjW2c4wF1O6NZA+GxJfPbPC9a3QUeSkDdBlBXmpOa9 UpUIc2Y/OPGsdkukOtDwVIN/+sj0NUDJEU7dVK2zEu3zpOfaetslmzZ1uhm/N4UTEIw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796391442; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=zfB+GZ99yJ4rxeOSDDZHlKXLCC05eUrKzTReOBzkbtg=; b=SwaAC82sQVaYsxbSpJra20423TxJG4+boRaa/sg4LHrnvZ84skmHlhZYbSNvINjYdfpC Podpj5SdDBiIuse+QAwFduhw3KIOF7x9EQoXDiCuBwKDU/abZnBw8i5mbcyClCywg69vi lqkh+I29udtDQFvKqq3yrTfoqBI5RESQg6GX9MJ3BERgSvd1kab7RcYEkiQhDFcr5HDTV 4lIX5OsxeR5BUPVwKsjenr68ex16/tuSQlDUQcBaA7Gb8COzySjDt+8emF/7jtM3JExbs IB6XNPHlDZEOYAzaZ9GG2UsmVwRRA7N2v7i6kfZXoEdYJ54sTaV/vyPc73nC8nYzHKA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=usDZJ0lh; arc=none smtp.remote-ip=209.85.210.41 Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFB9A606A33E for ; Fri, 4 Dec 2026 13:37:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AFB9A606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=usDZJ0lh Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-862a5b64755so528393a34.2 for ; Fri, 04 Dec 2026 05:37:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar.com; s=google; t=1796391441; x=1796996241; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=zfB+GZ99yJ4rxeOSDDZHlKXLCC05eUrKzTReOBzkbtg=; b=usDZJ0lhukyUo3Eqkdq8QgQ5ygFa6wSSF6W+7j2B2Sjcgi2St0vgDjAAZhm3ZxLv/S bpD3tWmno0cm/Fh+aXRfHYLDXckhK7fVV9AQrBIw7DDpP/LqONMzO+Jm51cnjSMtjKK7 ppaD9KvLZlfDTmiqKpOIDXrwsqyMN8725dGsUYCHK6EbledKBq6EicXd5CSj/xT7J6wu DymI8wjrBGWPG9nTzcj4VJzKw8u/0vbE3WbWzpNv+CjYUNFT+aQorIl2VK0OpR/+eDvO uxsI2M9XdBlsokaONVCVsBEI8c92EQbAQoYEd73y7CwAj131YOU6RD4kd1e0smGuRKd5 gT7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796391441; x=1796996241; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=zfB+GZ99yJ4rxeOSDDZHlKXLCC05eUrKzTReOBzkbtg=; b=2l/epxtSP/e+b38C3yXbalW4C9VGZm8R/ZEYXInN+OvO3AAX5dWUl91laXCEcRdcEX Zal+/ss83uvLJgiFgT8i7cFMy4Qm8n1IS+Dqy5Qx8zvS9Ij6A8rGLNltQ7KY7MDwCHF1 D5mGP4J+0oSF0dwHpEB0+puC8oaw5fFM7rfzfVGwqeZbCr9ROTj5XsKhkJBGjxG7Fjqj 1Wdl57o1uN1Y058fB3MXwNiwKAgkxqLLThcHZvFws6hZT7rUxusowvP2v0gIbTXzGrwy 6sj+r+eP22UyfSanz7ZIt38eA8S9+znUWmhSh+qSGttM0fzFJrsKD9WEDdH4sM4QngVz zlqA== X-Forwarded-Encrypted: i=1; AL+hErHtmn+wCUzSScTG8vHxjwautYhndqigVdoW5B4V5lbQ7+hU+jSEATjEVNXVZCeEtiGQWIoQ+eu5B0E1+vk=@vger.kernel.org X-Gm-Message-State: APuU4Z/XOI+yXlxBmNYjJNiKZgZZqbSQYk7DVkt1rIfEDHjSPt4Yg3ww aBGIVYHlHODuiZs778kagJHM5MVH/LjdZu3f0KJ1sKAiGDNlSBgW+8vWS/WJqGyGM6o= X-Gm-Gg: AZFdTZeJOLVN1JEbkQcP+nrNIAKMMJHpSviJ5p8NuHfE1u/Qa6YQTl/amzPqEio3pAB x5EYq3xdKW5bNmyzdp3kk42GBQcHQRxtIZhEHHjXQ5FGjfwUiJrs5BL7LBLbFus+5LYAeT0S7Cf 6dttdNOm8mCdA9dOx4R24UtVo+gpjyftXF6aj6JpObWvjSXb2KFVKDp7UYN5m1vmxR10ioRhHyN mB+chUh32IGVAM6n35SHnZEhpRl3NL8bWYTh0H8AMHJietiO9fGtNj5H4zpPiujK9ezUqBoVyQU j5D9WKWEsdVBz/va87JwenAX4NvvtRPLerpZvhX7syYOvXwLNhpj08ePsLW0UuzZpH1ra1IbLQ6 IuWWZVXxnNjh6Z9lajgPntqpimD3rw/diGgKZJgUhGxPS/ey5OxmZrdMB519PngMP7HF55B7yTf EAvSO6HvfJ8thk2L9Ab9o/Su/R2OyiAaLC50Lge91gOeVF3QMFlsaT1L4L+kU+lDIXBOwxXhE3b edZtr56vLU6UY28A3myeRyJ7LSkpT6GSSm3RG9kW8rtCM5tPk/1ClnnJ+ozMW4KiHhCXj9yNRGw 5sD/1kiF1CPIEArFiWox+gxN7wr4wOQ= X-Received: by 2002:a05:6830:4c0a:b0:829:9992:20f0 with SMTP id 46e09a7af769-863f8a54904mr1968438a34.28.1796391440634; Fri, 04 Dec 2026 05:37:20 -0800 (PST) Received: from [172.22.22.28] ([76.156.233.211]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-863f81e76bdsm2145525a34.8.2026.12.04.05.37.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 05:37:20 -0800 (PST) Message-ID: <330e8dbe-a397-4c53-bc28-f9da47f1acb7@riscstar.com> Date: Fri, 4 Dec 2026 07:37:18 -0600 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 3/4] clk: toshiba: introduce a TC9564 clock driver To: Lorenzo Bianconi Cc: sboyd@kernel.org, bmasney+clk@redhat.com, jbrunet+clk@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, andersson@kernel.org, konradybcio@kernel.org, abelvesa@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, daniel@riscstar.com, mohd.anwar@oss.qualcomm.com, fabrice.gasnier@foss.st.com, alexandre.torgue@foss.st.com, marex@nabladev.com, changhuang.liang@starfivetech.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261203200948.1595470-1-elder@riscstar.com> <20261203200948.1595470-4-elder@riscstar.com> Content-Language: en-US From: Alex Elder In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/4/26 3:40 AM, Lorenzo Bianconi wrote: >> Define a new platform driver that manages clocks implemented by the >> Toshiba TC9564 SoC. There are 21 gate clocks that can be enabled >> and disabled, but currently only the clocks that are (or will soon be) >> used are defined to be controllable. The I2C and PCIE clocks marked >> as CRITICAL to prevent their state from ever changing. >> >> Two registers in an MMIO region manage the state of the clocks. The >> region is provided via a BAR on one of the PCI functions embedded in >> the TC9564 SoC. >> >> This driver creates an auxiliary device responsible for managing the >> reset controller implemented within the SoC. Definitions found in >> specify the interface between this driver >> and the reset auxiliary driver. >> >> Co-developed-by: Daniel Thompson >> Signed-off-by: Daniel Thompson >> Signed-off-by: Alex Elder >> --- >> v5: - There is now only one clk_hw_onecell_data structure tracking >> all clocks (and this is the only one used to add a clock >> hardware provider). >> - There is no longer a per-instance structure allocated for probed >> clock devices. All information needed during operation is either >> static or is set up during initialization. >> - Fixed rate clocks no longer have IDs. They are identified by >> their clock rate, which is unique (and based on a divider). >> - Gate clocks now specify the clock rate they need from their >> parent clock. The clk_hw pointer used in registeration is >> found based on that rate. >> - Initialization of the fixed and gate clocks are no longer >> encapsulated; instead, the probe function iterates over the >> clocks to be initialized, and a helper function for each type >> is called for each clock. >> - The reset device is now created using an auxiliary device >> helper function, avoiding duplicated code. >> - A few bits of dead code pointed out during review have been >> removed. >> >> MAINTAINERS | 1 + >> drivers/clk/Kconfig | 10 ++ >> drivers/clk/Makefile | 1 + >> drivers/clk/clk-tc9564.c | 326 +++++++++++++++++++++++++++++++++++++++ >> drivers/misc/Kconfig | 1 + >> 5 files changed, 339 insertions(+) >> create mode 100644 drivers/clk/clk-tc9564.c >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 936d60a27dd3c..c6f26f750a5dc 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -28798,6 +28798,7 @@ M: Alex Elder >> M: Daniel Thompson >> S: Maintained >> F: Documentation/devicetree/bindings/clock/toshiba,tc9564-clock.yaml >> +F: drivers/clk/clk-tc9564.c >> F: include/dt-bindings/clock/toshiba,tc9564.h >> >> TOSHIBA TC9564 PCI DRIVER >> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig >> index 97db129f184ec..da547851c7c2b 100644 >> --- a/drivers/clk/Kconfig >> +++ b/drivers/clk/Kconfig >> @@ -186,6 +186,16 @@ config COMMON_CLK_CDCE706 >> help >> This driver supports TI CDCE706 programmable 3-PLL clock synthesizer. >> >> +config COMMON_CLK_TC9564 >> + tristate "Toshiba TC9564 clock support" >> + select AUXILIARY_BUS >> + imply RESET_TC9564 >> + help >> + This enables support for the clock controller embedded in the >> + Toshiba TC9564 SoC. It is also required to support the embedded >> + reset device, which is represented as an auxiliary device created >> + by the clock controller driver. >> + >> config COMMON_CLK_TPS68470 >> tristate "Clock Driver for TI TPS68470 PMIC" >> depends on I2C >> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile >> index 99377a13ebc57..d67cfb6d623d3 100644 >> --- a/drivers/clk/Makefile >> +++ b/drivers/clk/Makefile >> @@ -111,6 +111,7 @@ obj-$(CONFIG_COMMON_CLK_SI570) += clk-si570.o >> obj-$(CONFIG_COMMON_CLK_SP7021) += clk-sp7021.o >> obj-$(CONFIG_COMMON_CLK_STM32F) += clk-stm32f4.o >> obj-$(CONFIG_COMMON_CLK_STM32H7) += clk-stm32h7.o >> +obj-$(CONFIG_COMMON_CLK_TC9564) += clk-tc9564.o >> obj-$(CONFIG_COMMON_CLK_TPS68470) += clk-tps68470.o >> obj-$(CONFIG_CLK_TWL6040) += clk-twl6040.o >> obj-$(CONFIG_CLK_TWL) += clk-twl.o >> diff --git a/drivers/clk/clk-tc9564.c b/drivers/clk/clk-tc9564.c >> new file mode 100644 >> index 0000000000000..fb429d2ffe039 >> --- /dev/null >> +++ b/drivers/clk/clk-tc9564.c >> @@ -0,0 +1,326 @@ >> +// SPDX-License-Identifier: GPL-2.0-only >> + >> +/* >> + * Copyright (C) 2026 by RISCstar Solutions Corporation. All rights reserved. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> + >> +/* >> + * Two registers implement the bits that control whether our clocks are >> + * enabled. These offsets are relative to the address space defined in >> + * devicetree. >> + */ >> +#define CLOCK0_OFFSET 0x0 >> +#define CLOCK1_OFFSET 0x8 >> + >> +/* >> + * A PLL driven by a 25 MHz input oscillator provides a clock source to >> + * the chip. A set of fixed rate clocks is derived from the PLL, and a >> + * set of gate clocks are children of the fixed rate clocks. >> + */ >> +#define CLOCK_COUNT (1 + FIXED_COUNT + GATE_COUNT) > > nit: I guess this should be after fixed_init, gate_init and fixed_init > definitions. I guess I don't feel strongly about it, because it compiles fine. I thought the comment above it provided a little of a high level overview of what's implemented in the file. Unless you insist (just respond with "please move it") I'm going to leave this here. > >> + >> +struct fixed_init { >> + const char *name; >> + unsigned int div; /* Rate is PLL rate divided by this */ >> +}; >> + >> +struct gate_init { >> + const char *name; >> + unsigned long parent_rate; >> + u8 offset; /* Control register offset (0x0 or 0x8) */ >> + u8 bit; /* Bit in the control register (0-31) */ >> + bool critical; >> +}; >> + >> +/* Device IDs used for auxiliary bus reset devices */ >> +static DEFINE_IDA(reset_ids); >> + >> +static const struct fixed_init fixed_init[] = { >> + { .name = "312.5MHz", .div = 4, }, >> + { .name = "250MHz", .div = 5, }, >> + { .name = "125MHz", .div = 10, }, >> + { .name = "62.5MHz", .div = 20, }, >> +}; >> +#define FIXED_COUNT ARRAY_SIZE(fixed_init) . . . >> +/* Return the clk_hw pointer for a fixed clock having the given rate */ >> +static struct clk_hw *fixed_hw_find_by_rate(struct clk_hw **fixed_hws, >> + unsigned long rate) >> +{ >> + for (u32 i = 0; i < FIXED_COUNT; i++) >> + if (clk_hw_get_rate(fixed_hws[i]) == rate) >> + return fixed_hws[i]; > > nit: should we check even the name? What if in the future two clocks have the > same rate? I think this might end up getting done differently, possibly going back to using constant indexes into the fixed clock array to indicate the parent. (Jerome commented on how that was done before but I'm not sure I understood what he was after.) But anyway... The way we represent the fixed clocks is basically made up, because we do not have documentation about how they're actually derived. As far as we know, they're fixed rate and always on, and internal to the chip. They're represented just so the gate clocks each have a parent clock that's ultimately derived from the input oscillator. Because of this, we simply do not (and will not, without further information) have multiple fixed clocks having the same rate, because there's no reason to. This is why it's safe to identify the parent clock by its rate. If we learn more in the future, this can change. But I do not expect we'll ever know more about the internal clock tree. > >> + >> + return NULL; >> +} >> + >> +static struct clk_hw *gate_clock_register(struct device *dev, >> + struct clk_hw **fixed_hws, >> + const struct gate_init *ginit, >> + void __iomem *regs) >> +{ >> + const char *name __free(kfree) = clock_name_alloc(dev, ginit->name); >> + unsigned long flags = ginit->critical ? CLK_IS_CRITICAL : 0; >> + void __iomem *reg = regs + ginit->offset; >> + struct clk_hw *parent_hw; >> + >> + if (!name) >> + return ERR_PTR(-ENOMEM); >> + >> + /* Each gate clock's parent is one of the fixed rate clocks */ >> + parent_hw = fixed_hw_find_by_rate(fixed_hws, ginit->parent_rate); >> + if (!parent_hw) { >> + dev_err(dev, "failed to find %lu parent\n", ginit->parent_rate); >> + >> + return ERR_PTR(-EINVAL); >> + } >> + >> + return devm_clk_hw_register_gate_parent_hw(dev, name, parent_hw, flags, >> + reg, ginit->bit, 0, NULL); >> +} >> + >> +static struct clk_hw * >> +gate_of_clk_hw_onecell_get(struct of_phandle_args *clkspec, void *data) >> +{ >> + struct clk_hw **gate_hws = data; >> + u32 id = clkspec->args[0]; >> + >> + if (id < GATE_COUNT) >> + return gate_hws[id]; >> + >> + pr_err("%s: invalid clock ID %u\n", __func__, id); >> + >> + return ERR_PTR(-EINVAL); >> +} >> + >> +static void reset_adev_free(void *data) >> +{ >> + struct auxiliary_device *adev = data; >> + >> + ida_free(&reset_ids, adev->id); >> + kfree(dev_get_platdata(&adev->dev)); >> +} >> + >> +/* Create the TC9564 reset auxiliary device; called by probe */ >> +static int devm_reset_register(struct device *dev, void __iomem *regs) > > nit: this function name seems a bit too generic I guess I agree, it sounds like a core function. It was previously devm_reset_setup(), but in any case I don't like the name; it creates the auxiliary reset device. How about devm_reset_auxdev_create()? I can add a "tc9564_" prefix if you prefer, though it's private. >> +{ >> + struct tc9564_aux_data *aux_data; > > do we really need it? it is just a wrapper for __iomem *regs. I explained the reasoning in the other patch. > >> + struct auxiliary_device *adev; >> + int id; >> + >> + aux_data = kzalloc_obj(*aux_data); >> + if (!aux_data) >> + return -ENOMEM; >> + aux_data->regs = regs; >> + >> + id = ida_alloc(&reset_ids, GFP_KERNEL); >> + if (id < 0) >> + return dev_err_probe(dev, id, "failed to get reset id\n"); >> + >> + adev = __devm_auxiliary_device_create(dev, TC9564_CLK_MODNAME, >> + TC9564_RESET_DEV_NAME, >> + aux_data, id); >> + if (!adev) { >> + ida_free(&reset_ids, id); >> + kfree(aux_data); >> + return -ENOMEM; >> + } >> + >> + return devm_add_action_or_reset(dev, reset_adev_free, adev); >> +} >> + >> +static int tc9564_clk_probe(struct platform_device *pdev) >> +{ >> + struct clk_hw_onecell_data *clock_data; >> + struct device *dev = &pdev->dev; >> + const struct fixed_init *finit; >> + const struct gate_init *ginit; >> + struct clk_hw **fixed_hws; >> + struct clk_hw **gate_hws; >> + struct clk_hw **clk_hws; >> + struct clk_hw *pll_hw; >> + void __iomem *regs; >> + struct clk_hw *hw; >> + int ret; >> + u32 i; >> + >> + if (!dev_of_node(dev)) >> + return dev_err_probe(dev, -EINVAL, "no devicetree node\n"); >> + >> + regs = devm_platform_ioremap_resource(pdev, 0); >> + if (IS_ERR(regs)) >> + return dev_err_probe(dev, PTR_ERR(regs), >> + "failed to map registers\n"); >> + >> + clock_data = devm_kzalloc_flex(dev, *clock_data, hws, CLOCK_COUNT); >> + if (!clock_data) >> + return -ENOMEM; >> + clock_data->num = CLOCK_COUNT; >> + >> + clk_hws = &clock_data->hws[0]; >> + >> + pll_hw = pll_register(dev); >> + if (IS_ERR(pll_hw)) >> + return dev_err_probe(dev, PTR_ERR(pll_hw), >> + "failed to register PLL\n"); >> + *clk_hws++ = pll_hw; >> + >> + fixed_hws = clk_hws; >> + for (i = 0, finit = &fixed_init[0]; i < FIXED_COUNT; i++, finit++) { > > nit (only cosmetic): I guess you can just do: I don't really care. I'll change it to the way you suggest. > for (i = 0; i < FIXED_COUNT; i++) { > const struct fixed_init *finit = &fixed_init[i]; > ... > } > >> + hw = fixed_clock_register(dev, pll_hw, finit); >> + if (IS_ERR(hw)) >> + return dev_err_probe(dev, PTR_ERR(hw), >> + "failed to register fixed %s\n", >> + finit->name); >> + *clk_hws++ = hw; >> + } >> + >> + gate_hws = clk_hws; >> + for (i = 0, ginit = &gate_init[0]; i < GATE_COUNT; i++, ginit++) { >> + hw = gate_clock_register(dev, fixed_hws, ginit, regs); > > nit: same as above; Same here, I'll do it "your way." Thanks a lot for the ongoing reviews Lorenzo. -Alex > >> + if (IS_ERR(hw)) >> + return dev_err_probe(dev, PTR_ERR(hw), >> + "failed to register gate %s\n", >> + ginit->name); >> + *clk_hws++ = hw; >> + } >> + >> + ret = devm_of_clk_add_hw_provider(dev, gate_of_clk_hw_onecell_get, >> + gate_hws); >> + if (ret) >> + return dev_err_probe(dev, ret, >> + "failed to add clock provider\n"); >> + >> + return devm_reset_register(dev, regs); >> +} >> + >> +static const struct of_device_id tc9564_clock_match[] = { >> + { .compatible = "toshiba,tc9564-clock", }, >> + { } >> +}; >> +MODULE_DEVICE_TABLE(of, tc9564_clock_match); >> + >> +static struct platform_driver tc9564_clk_driver = { >> + .probe = tc9564_clk_probe, >> + .driver = { >> + .name = KBUILD_MODNAME, >> + .of_match_table = tc9564_clock_match, >> + }, >> +}; >> +module_platform_driver(tc9564_clk_driver); >> + >> +MODULE_DESCRIPTION("Toshiba TC9564 Clock Driver"); >> +MODULE_LICENSE("GPL"); >> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig >> index c40e89cc57243..391d0ba79c96f 100644 >> --- a/drivers/misc/Kconfig >> +++ b/drivers/misc/Kconfig >> @@ -574,6 +574,7 @@ config TC9564_PCI >> tristate "Toshiba TC9564 PCI function support" >> depends on PCI_DYNAMIC_OF_NODES >> depends on PCI_QUIRKS >> + imply COMMON_CLK_TC9564 >> default m >> help >> This enables support for two PCI functions implemented by the >> -- >> 2.53.0 >> > > Regards, > Lorenzo