]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop some unneeded 6.1 patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jul 2023 17:00:52 +0000 (19:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jul 2023 17:00:52 +0000 (19:00 +0200)
18 files changed:
queue-6.1/acpi-make-remove-callback-of-acpi-driver-void.patch [deleted file]
queue-6.1/clk-clocking-wizard-check-return-value-of-devm_kaspr.patch [deleted file]
queue-6.1/clk-mediatek-clk-gate-propagate-struct-device-with-m.patch [deleted file]
queue-6.1/clk-mediatek-clk-mtk-extend-mtk_clk_simple_probe.patch [deleted file]
queue-6.1/clk-mediatek-clk-mtk-propagate-struct-device-for-com.patch [deleted file]
queue-6.1/clk-mediatek-clk-mux-propagate-struct-device-for-mtk.patch [deleted file]
queue-6.1/clk-mediatek-fix-of_iomap-memory-leak.patch [deleted file]
queue-6.1/clk-mediatek-mt8192-correctly-unregister-and-free-cl.patch [deleted file]
queue-6.1/clk-mediatek-mt8192-propagate-struct-device-for-gate.patch [deleted file]
queue-6.1/clk-qcom-mmcc-msm8974-move-clock-parent-tables-down.patch [deleted file]
queue-6.1/clk-qcom-mmcc-msm8974-remove-oxili_ocmemgx_clk.patch
queue-6.1/clk-qcom-mmcc-msm8974-use-array_size-instead-of-spec.patch [deleted file]
queue-6.1/clk-qcom-mmcc-msm8974-use-parent_hws-_data-instead-o.patch [deleted file]
queue-6.1/clocking-wizard-support-higher-frequency-accuracy.patch [deleted file]
queue-6.1/hid-input-map-battery-system-charging.patch [deleted file]
queue-6.1/hid-uclogic-modular-kunit-tests-should-not-depend-on.patch
queue-6.1/platform-x86-dell-dell-rbtn-fix-resources-leaking-on.patch
queue-6.1/series

diff --git a/queue-6.1/acpi-make-remove-callback-of-acpi-driver-void.patch b/queue-6.1/acpi-make-remove-callback-of-acpi-driver-void.patch
deleted file mode 100644 (file)
index dfd951c..0000000
+++ /dev/null
@@ -1,1299 +0,0 @@
-From 2fd9911fe2b28f9ad1c5601c99324885063cee03 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Nov 2022 00:26:09 +0800
-Subject: ACPI: make remove callback of ACPI driver void
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Dawei Li <set_pte_at@outlook.com>
-
-[ Upstream commit 6c0eb5ba3500f6da367351ff3c4452c029cb72fa ]
-
-For bus-based driver, device removal is implemented as:
-1 device_remove()->
-2   bus->remove()->
-3     driver->remove()
-
-Driver core needs no inform from callee(bus driver) about the
-result of remove callback. In that case, commit fc7a6209d571
-("bus: Make remove callback return void") forces bus_type::remove
-be void-returned.
-
-Now we have the situation that both 1 & 2 of calling chain are
-void-returned, so it does not make much sense for 3(driver->remove)
-to return non-void to its caller.
-
-So the basic idea behind this change is making remove() callback of
-any bus-based driver to be void-returned.
-
-This change, for itself, is for device drivers based on acpi-bus.
-
-Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-Acked-by: Lee Jones <lee@kernel.org>
-Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-Reviewed-by: Hans de Goede <hdegoede@redhat.com>
-Signed-off-by: Dawei Li <set_pte_at@outlook.com>
-Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>  # for drivers/platform/surface/*
-Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-Stable-dep-of: 966cca72ab20 ("platform/x86/dell/dell-rbtn: Fix resources leaking on error path")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/ia64/hp/common/aml_nfw.c                 |  4 ++--
- arch/x86/platform/olpc/olpc-xo15-sci.c        |  3 +--
- drivers/acpi/ac.c                             |  8 +++-----
- drivers/acpi/acpi_pad.c                       |  3 +--
- drivers/acpi/acpi_video.c                     |  8 +++-----
- drivers/acpi/battery.c                        |  5 ++---
- drivers/acpi/button.c                         |  5 ++---
- drivers/acpi/ec.c                             |  5 ++---
- drivers/acpi/hed.c                            |  3 +--
- drivers/acpi/nfit/core.c                      |  3 +--
- drivers/acpi/sbs.c                            |  9 ++++-----
- drivers/acpi/sbshc.c                          |  7 +++----
- drivers/acpi/thermal.c                        |  7 +++----
- drivers/acpi/tiny-power-button.c              | 10 +++++++---
- drivers/char/sonypi.c                         |  3 +--
- drivers/char/tpm/tpm_crb.c                    |  4 +---
- drivers/hv/vmbus_drv.c                        |  4 +---
- drivers/hwmon/acpi_power_meter.c              |  5 ++---
- drivers/hwmon/asus_atk0110.c                  |  6 ++----
- drivers/input/misc/atlas_btns.c               |  4 +---
- drivers/net/fjes/fjes_main.c                  |  4 +---
- .../platform/chrome/chromeos_privacy_screen.c |  3 +--
- drivers/platform/chrome/wilco_ec/event.c      |  4 +---
- drivers/platform/surface/surfacepro3_button.c |  3 +--
- drivers/platform/x86/asus-laptop.c            |  3 +--
- drivers/platform/x86/asus-wireless.c          |  3 +--
- drivers/platform/x86/classmate-laptop.c       | 20 +++++++++----------
- drivers/platform/x86/dell/dell-rbtn.c         |  6 ++----
- drivers/platform/x86/eeepc-laptop.c           |  3 +--
- drivers/platform/x86/fujitsu-laptop.c         |  4 +---
- drivers/platform/x86/fujitsu-tablet.c         |  3 +--
- drivers/platform/x86/intel/rst.c              |  4 +---
- drivers/platform/x86/lg-laptop.c              |  4 +---
- drivers/platform/x86/panasonic-laptop.c       |  8 +++-----
- drivers/platform/x86/sony-laptop.c            |  9 +++------
- drivers/platform/x86/system76_acpi.c          |  4 +---
- drivers/platform/x86/topstar-laptop.c         |  3 +--
- drivers/platform/x86/toshiba_acpi.c           |  4 +---
- drivers/platform/x86/toshiba_bluetooth.c      |  6 +++---
- drivers/platform/x86/toshiba_haps.c           |  4 +---
- drivers/platform/x86/wireless-hotkey.c        |  3 +--
- drivers/platform/x86/xo15-ebook.c             |  3 +--
- drivers/ptp/ptp_vmw.c                         |  3 +--
- drivers/thermal/intel/intel_menlow.c          |  8 +++-----
- drivers/video/backlight/apple_bl.c            |  3 +--
- drivers/watchdog/ni903x_wdt.c                 |  4 +---
- drivers/xen/xen-acpi-pad.c                    |  3 +--
- include/acpi/acpi_bus.h                       |  2 +-
- 48 files changed, 88 insertions(+), 149 deletions(-)
-
-diff --git a/arch/ia64/hp/common/aml_nfw.c b/arch/ia64/hp/common/aml_nfw.c
-index 684667ade5259..901df49461a05 100644
---- a/arch/ia64/hp/common/aml_nfw.c
-+++ b/arch/ia64/hp/common/aml_nfw.c
-@@ -187,9 +187,9 @@ static int aml_nfw_add(struct acpi_device *device)
-       return aml_nfw_add_global_handler();
- }
--static int aml_nfw_remove(struct acpi_device *device)
-+static void aml_nfw_remove(struct acpi_device *device)
- {
--      return aml_nfw_remove_global_handler();
-+      aml_nfw_remove_global_handler();
- }
- static const struct acpi_device_id aml_nfw_ids[] = {
-diff --git a/arch/x86/platform/olpc/olpc-xo15-sci.c b/arch/x86/platform/olpc/olpc-xo15-sci.c
-index 994a229cb79fe..68244a3422d1d 100644
---- a/arch/x86/platform/olpc/olpc-xo15-sci.c
-+++ b/arch/x86/platform/olpc/olpc-xo15-sci.c
-@@ -183,13 +183,12 @@ static int xo15_sci_add(struct acpi_device *device)
-       return r;
- }
--static int xo15_sci_remove(struct acpi_device *device)
-+static void xo15_sci_remove(struct acpi_device *device)
- {
-       acpi_disable_gpe(NULL, xo15_sci_gpe);
-       acpi_remove_gpe_handler(NULL, xo15_sci_gpe, xo15_sci_gpe_handler);
-       cancel_work_sync(&sci_work);
-       sysfs_remove_file(&device->dev.kobj, &lid_wake_on_close_attr.attr);
--      return 0;
- }
- #ifdef CONFIG_PM_SLEEP
-diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
-index bb9fe7984b1a0..1ace70b831cdf 100644
---- a/drivers/acpi/ac.c
-+++ b/drivers/acpi/ac.c
-@@ -33,7 +33,7 @@ MODULE_DESCRIPTION("ACPI AC Adapter Driver");
- MODULE_LICENSE("GPL");
- static int acpi_ac_add(struct acpi_device *device);
--static int acpi_ac_remove(struct acpi_device *device);
-+static void acpi_ac_remove(struct acpi_device *device);
- static void acpi_ac_notify(struct acpi_device *device, u32 event);
- static const struct acpi_device_id ac_device_ids[] = {
-@@ -288,12 +288,12 @@ static int acpi_ac_resume(struct device *dev)
- #define acpi_ac_resume NULL
- #endif
--static int acpi_ac_remove(struct acpi_device *device)
-+static void acpi_ac_remove(struct acpi_device *device)
- {
-       struct acpi_ac *ac = NULL;
-       if (!device || !acpi_driver_data(device))
--              return -EINVAL;
-+              return;
-       ac = acpi_driver_data(device);
-@@ -301,8 +301,6 @@ static int acpi_ac_remove(struct acpi_device *device)
-       unregister_acpi_notifier(&ac->battery_nb);
-       kfree(ac);
--
--      return 0;
- }
- static int __init acpi_ac_init(void)
-diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
-index ec0e22a1e25d6..edbb28faee2a6 100644
---- a/drivers/acpi/acpi_pad.c
-+++ b/drivers/acpi/acpi_pad.c
-@@ -449,7 +449,7 @@ static int acpi_pad_add(struct acpi_device *device)
-       return 0;
- }
--static int acpi_pad_remove(struct acpi_device *device)
-+static void acpi_pad_remove(struct acpi_device *device)
- {
-       mutex_lock(&isolated_cpus_lock);
-       acpi_pad_idle_cpus(0);
-@@ -458,7 +458,6 @@ static int acpi_pad_remove(struct acpi_device *device)
-       acpi_remove_notify_handler(device->handle,
-               ACPI_DEVICE_NOTIFY, acpi_pad_notify);
-       acpi_pad_remove_sysfs(device);
--      return 0;
- }
- static const struct acpi_device_id pad_device_ids[] = {
-diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
-index ed318485eb192..c7a6d0b69dabd 100644
---- a/drivers/acpi/acpi_video.c
-+++ b/drivers/acpi/acpi_video.c
-@@ -82,7 +82,7 @@ static DEFINE_MUTEX(register_count_mutex);
- static DEFINE_MUTEX(video_list_lock);
- static LIST_HEAD(video_bus_head);
- static int acpi_video_bus_add(struct acpi_device *device);
--static int acpi_video_bus_remove(struct acpi_device *device);
-+static void acpi_video_bus_remove(struct acpi_device *device);
- static void acpi_video_bus_notify(struct acpi_device *device, u32 event);
- static void acpi_video_bus_register_backlight_work(struct work_struct *ignored);
- static DECLARE_DELAYED_WORK(video_bus_register_backlight_work,
-@@ -2074,13 +2074,13 @@ static int acpi_video_bus_add(struct acpi_device *device)
-       return error;
- }
--static int acpi_video_bus_remove(struct acpi_device *device)
-+static void acpi_video_bus_remove(struct acpi_device *device)
- {
-       struct acpi_video_bus *video = NULL;
-       if (!device || !acpi_driver_data(device))
--              return -EINVAL;
-+              return;
-       video = acpi_driver_data(device);
-@@ -2094,8 +2094,6 @@ static int acpi_video_bus_remove(struct acpi_device *device)
-       kfree(video->attached_array);
-       kfree(video);
--
--      return 0;
- }
- static void acpi_video_bus_register_backlight_work(struct work_struct *ignored)
-diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
-index 084f156bdfbc4..c705613fa503e 100644
---- a/drivers/acpi/battery.c
-+++ b/drivers/acpi/battery.c
-@@ -1208,12 +1208,12 @@ static int acpi_battery_add(struct acpi_device *device)
-       return result;
- }
--static int acpi_battery_remove(struct acpi_device *device)
-+static void acpi_battery_remove(struct acpi_device *device)
- {
-       struct acpi_battery *battery = NULL;
-       if (!device || !acpi_driver_data(device))
--              return -EINVAL;
-+              return;
-       device_init_wakeup(&device->dev, 0);
-       battery = acpi_driver_data(device);
-       unregister_pm_notifier(&battery->pm_nb);
-@@ -1221,7 +1221,6 @@ static int acpi_battery_remove(struct acpi_device *device)
-       mutex_destroy(&battery->lock);
-       mutex_destroy(&battery->sysfs_lock);
-       kfree(battery);
--      return 0;
- }
- #ifdef CONFIG_PM_SLEEP
-diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
-index 1f9b9a4c38c7d..475e1eddfa3b4 100644
---- a/drivers/acpi/button.c
-+++ b/drivers/acpi/button.c
-@@ -125,7 +125,7 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
- };
- static int acpi_button_add(struct acpi_device *device);
--static int acpi_button_remove(struct acpi_device *device);
-+static void acpi_button_remove(struct acpi_device *device);
- static void acpi_button_notify(struct acpi_device *device, u32 event);
- #ifdef CONFIG_PM_SLEEP
-@@ -580,14 +580,13 @@ static int acpi_button_add(struct acpi_device *device)
-       return error;
- }
--static int acpi_button_remove(struct acpi_device *device)
-+static void acpi_button_remove(struct acpi_device *device)
- {
-       struct acpi_button *button = acpi_driver_data(device);
-       acpi_button_remove_fs(device);
-       input_unregister_device(button->input);
-       kfree(button);
--      return 0;
- }
- static int param_set_lid_init_state(const char *val,
-diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
-index ee4c812c8f6cc..612a308f3ff0e 100644
---- a/drivers/acpi/ec.c
-+++ b/drivers/acpi/ec.c
-@@ -1664,12 +1664,12 @@ static int acpi_ec_add(struct acpi_device *device)
-       return ret;
- }
--static int acpi_ec_remove(struct acpi_device *device)
-+static void acpi_ec_remove(struct acpi_device *device)
- {
-       struct acpi_ec *ec;
-       if (!device)
--              return -EINVAL;
-+              return;
-       ec = acpi_driver_data(device);
-       release_region(ec->data_addr, 1);
-@@ -1679,7 +1679,6 @@ static int acpi_ec_remove(struct acpi_device *device)
-               ec_remove_handlers(ec);
-               acpi_ec_free(ec);
-       }
--      return 0;
- }
- static acpi_status
-diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c
-index 60a2939cde6c5..78d44e3fe1295 100644
---- a/drivers/acpi/hed.c
-+++ b/drivers/acpi/hed.c
-@@ -56,10 +56,9 @@ static int acpi_hed_add(struct acpi_device *device)
-       return 0;
- }
--static int acpi_hed_remove(struct acpi_device *device)
-+static void acpi_hed_remove(struct acpi_device *device)
- {
-       hed_handle = NULL;
--      return 0;
- }
- static struct acpi_driver acpi_hed_driver = {
-diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
-index 6d4ac934cd499..4e48d6db05eb1 100644
---- a/drivers/acpi/nfit/core.c
-+++ b/drivers/acpi/nfit/core.c
-@@ -3371,10 +3371,9 @@ static int acpi_nfit_add(struct acpi_device *adev)
-       return devm_add_action_or_reset(dev, acpi_nfit_shutdown, acpi_desc);
- }
--static int acpi_nfit_remove(struct acpi_device *adev)
-+static void acpi_nfit_remove(struct acpi_device *adev)
- {
-       /* see acpi_nfit_unregister */
--      return 0;
- }
- static void acpi_nfit_update_notify(struct device *dev, acpi_handle handle)
-diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
-index e6a01a8df1b81..e90752d4f488e 100644
---- a/drivers/acpi/sbs.c
-+++ b/drivers/acpi/sbs.c
-@@ -96,7 +96,7 @@ struct acpi_sbs {
- #define to_acpi_sbs(x) power_supply_get_drvdata(x)
--static int acpi_sbs_remove(struct acpi_device *device);
-+static void acpi_sbs_remove(struct acpi_device *device);
- static int acpi_battery_get_state(struct acpi_battery *battery);
- static inline int battery_scale(int log)
-@@ -664,16 +664,16 @@ static int acpi_sbs_add(struct acpi_device *device)
-       return result;
- }
--static int acpi_sbs_remove(struct acpi_device *device)
-+static void acpi_sbs_remove(struct acpi_device *device)
- {
-       struct acpi_sbs *sbs;
-       int id;
-       if (!device)
--              return -EINVAL;
-+              return;
-       sbs = acpi_driver_data(device);
-       if (!sbs)
--              return -EINVAL;
-+              return;
-       mutex_lock(&sbs->lock);
-       acpi_smbus_unregister_callback(sbs->hc);
-       for (id = 0; id < MAX_SBS_BAT; ++id)
-@@ -682,7 +682,6 @@ static int acpi_sbs_remove(struct acpi_device *device)
-       mutex_unlock(&sbs->lock);
-       mutex_destroy(&sbs->lock);
-       kfree(sbs);
--      return 0;
- }
- #ifdef CONFIG_PM_SLEEP
-diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
-index 340e0b61587e0..16f2daaa2c454 100644
---- a/drivers/acpi/sbshc.c
-+++ b/drivers/acpi/sbshc.c
-@@ -30,7 +30,7 @@ struct acpi_smb_hc {
- };
- static int acpi_smbus_hc_add(struct acpi_device *device);
--static int acpi_smbus_hc_remove(struct acpi_device *device);
-+static void acpi_smbus_hc_remove(struct acpi_device *device);
- static const struct acpi_device_id sbs_device_ids[] = {
-       {"ACPI0001", 0},
-@@ -280,19 +280,18 @@ static int acpi_smbus_hc_add(struct acpi_device *device)
- extern void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit);
--static int acpi_smbus_hc_remove(struct acpi_device *device)
-+static void acpi_smbus_hc_remove(struct acpi_device *device)
- {
-       struct acpi_smb_hc *hc;
-       if (!device)
--              return -EINVAL;
-+              return;
-       hc = acpi_driver_data(device);
-       acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
-       acpi_os_wait_events_complete();
-       kfree(hc);
-       device->driver_data = NULL;
--      return 0;
- }
- module_acpi_driver(acpi_smb_hc_driver);
-diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
-index 40b07057983e0..0c4bdef4d09ca 100644
---- a/drivers/acpi/thermal.c
-+++ b/drivers/acpi/thermal.c
-@@ -74,7 +74,7 @@ MODULE_PARM_DESC(psv, "Disable or override all passive trip points.");
- static struct workqueue_struct *acpi_thermal_pm_queue;
- static int acpi_thermal_add(struct acpi_device *device);
--static int acpi_thermal_remove(struct acpi_device *device);
-+static void acpi_thermal_remove(struct acpi_device *device);
- static void acpi_thermal_notify(struct acpi_device *device, u32 event);
- static const struct acpi_device_id  thermal_device_ids[] = {
-@@ -1059,19 +1059,18 @@ static int acpi_thermal_add(struct acpi_device *device)
-       return result;
- }
--static int acpi_thermal_remove(struct acpi_device *device)
-+static void acpi_thermal_remove(struct acpi_device *device)
- {
-       struct acpi_thermal *tz;
-       if (!device || !acpi_driver_data(device))
--              return -EINVAL;
-+              return;
-       flush_workqueue(acpi_thermal_pm_queue);
-       tz = acpi_driver_data(device);
-       acpi_thermal_unregister_thermal_zone(tz);
-       kfree(tz);
--      return 0;
- }
- #ifdef CONFIG_PM_SLEEP
-diff --git a/drivers/acpi/tiny-power-button.c b/drivers/acpi/tiny-power-button.c
-index a19f0e4e69f76..598f548b21f36 100644
---- a/drivers/acpi/tiny-power-button.c
-+++ b/drivers/acpi/tiny-power-button.c
-@@ -19,11 +19,15 @@ static const struct acpi_device_id tiny_power_button_device_ids[] = {
- };
- MODULE_DEVICE_TABLE(acpi, tiny_power_button_device_ids);
--static int acpi_noop_add_remove(struct acpi_device *device)
-+static int acpi_noop_add(struct acpi_device *device)
- {
-       return 0;
- }
-+static void acpi_noop_remove(struct acpi_device *device)
-+{
-+}
-+
- static void acpi_tiny_power_button_notify(struct acpi_device *device, u32 event)
- {
-       kill_cad_pid(power_signal, 1);
-@@ -34,8 +38,8 @@ static struct acpi_driver acpi_tiny_power_button_driver = {
-       .class = "tiny-power-button",
-       .ids = tiny_power_button_device_ids,
-       .ops = {
--              .add = acpi_noop_add_remove,
--              .remove = acpi_noop_add_remove,
-+              .add = acpi_noop_add,
-+              .remove = acpi_noop_remove,
-               .notify = acpi_tiny_power_button_notify,
-       },
- };
-diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
-index 27e301a6bb7a3..9211531689b28 100644
---- a/drivers/char/sonypi.c
-+++ b/drivers/char/sonypi.c
-@@ -1123,10 +1123,9 @@ static int sonypi_acpi_add(struct acpi_device *device)
-       return 0;
- }
--static int sonypi_acpi_remove(struct acpi_device *device)
-+static void sonypi_acpi_remove(struct acpi_device *device)
- {
-       sonypi_acpi_device = NULL;
--      return 0;
- }
- static const struct acpi_device_id sonypi_device_ids[] = {
-diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
-index 916f4ff246c14..d43a0d7b97a89 100644
---- a/drivers/char/tpm/tpm_crb.c
-+++ b/drivers/char/tpm/tpm_crb.c
-@@ -804,14 +804,12 @@ static int crb_acpi_add(struct acpi_device *device)
-       return rc;
- }
--static int crb_acpi_remove(struct acpi_device *device)
-+static void crb_acpi_remove(struct acpi_device *device)
- {
-       struct device *dev = &device->dev;
-       struct tpm_chip *chip = dev_get_drvdata(dev);
-       tpm_chip_unregister(chip);
--
--      return 0;
- }
- static const struct dev_pm_ops crb_pm = {
-diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
-index b03cb7ae7fd38..89944a87989ff 100644
---- a/drivers/hv/vmbus_drv.c
-+++ b/drivers/hv/vmbus_drv.c
-@@ -2239,7 +2239,7 @@ static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *ctx)
-       return AE_OK;
- }
--static int vmbus_acpi_remove(struct acpi_device *device)
-+static void vmbus_acpi_remove(struct acpi_device *device)
- {
-       struct resource *cur_res;
-       struct resource *next_res;
-@@ -2256,8 +2256,6 @@ static int vmbus_acpi_remove(struct acpi_device *device)
-                       kfree(cur_res);
-               }
-       }
--
--      return 0;
- }
- static void vmbus_reserve_fb(void)
-diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
-index 0962c12eba5a0..fa28d447f0dfb 100644
---- a/drivers/hwmon/acpi_power_meter.c
-+++ b/drivers/hwmon/acpi_power_meter.c
-@@ -910,12 +910,12 @@ static int acpi_power_meter_add(struct acpi_device *device)
-       return res;
- }
--static int acpi_power_meter_remove(struct acpi_device *device)
-+static void acpi_power_meter_remove(struct acpi_device *device)
- {
-       struct acpi_power_meter_resource *resource;
-       if (!device || !acpi_driver_data(device))
--              return -EINVAL;
-+              return;
-       resource = acpi_driver_data(device);
-       hwmon_device_unregister(resource->hwmon_dev);
-@@ -924,7 +924,6 @@ static int acpi_power_meter_remove(struct acpi_device *device)
-       free_capabilities(resource);
-       kfree(resource);
--      return 0;
- }
- static int acpi_power_meter_resume(struct device *dev)
-diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
-index ff64a39d56def..d778a2aaefec1 100644
---- a/drivers/hwmon/asus_atk0110.c
-+++ b/drivers/hwmon/asus_atk0110.c
-@@ -187,7 +187,7 @@ struct atk_acpi_input_buf {
- };
- static int atk_add(struct acpi_device *device);
--static int atk_remove(struct acpi_device *device);
-+static void atk_remove(struct acpi_device *device);
- static void atk_print_sensor(struct atk_data *data, union acpi_object *obj);
- static int atk_read_value(struct atk_sensor_data *sensor, u64 *value);
-@@ -1344,7 +1344,7 @@ static int atk_add(struct acpi_device *device)
-       return err;
- }
--static int atk_remove(struct acpi_device *device)
-+static void atk_remove(struct acpi_device *device)
- {
-       struct atk_data *data = device->driver_data;
-       dev_dbg(&device->dev, "removing...\n");
-@@ -1359,8 +1359,6 @@ static int atk_remove(struct acpi_device *device)
-               if (atk_ec_ctl(data, 0))
-                       dev_err(&device->dev, "Failed to disable EC\n");
-       }
--
--      return 0;
- }
- static int __init atk0110_init(void)
-diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c
-index 0e77c40e1966b..3c9bbd04e1434 100644
---- a/drivers/input/misc/atlas_btns.c
-+++ b/drivers/input/misc/atlas_btns.c
-@@ -106,7 +106,7 @@ static int atlas_acpi_button_add(struct acpi_device *device)
-       return err;
- }
--static int atlas_acpi_button_remove(struct acpi_device *device)
-+static void atlas_acpi_button_remove(struct acpi_device *device)
- {
-       acpi_status status;
-@@ -116,8 +116,6 @@ static int atlas_acpi_button_remove(struct acpi_device *device)
-               pr_err("error removing addr spc handler\n");
-       input_unregister_device(input_dev);
--
--      return 0;
- }
- static const struct acpi_device_id atlas_device_ids[] = {
-diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
-index 1eff202f6a1fa..2513be6d4e11d 100644
---- a/drivers/net/fjes/fjes_main.c
-+++ b/drivers/net/fjes/fjes_main.c
-@@ -145,14 +145,12 @@ static int fjes_acpi_add(struct acpi_device *device)
-       return 0;
- }
--static int fjes_acpi_remove(struct acpi_device *device)
-+static void fjes_acpi_remove(struct acpi_device *device)
- {
-       struct platform_device *plat_dev;
-       plat_dev = (struct platform_device *)acpi_driver_data(device);
-       platform_device_unregister(plat_dev);
--
--      return 0;
- }
- static struct acpi_driver fjes_acpi_driver = {
-diff --git a/drivers/platform/chrome/chromeos_privacy_screen.c b/drivers/platform/chrome/chromeos_privacy_screen.c
-index 77e9f5ee8e334..bb74ddf9af4ac 100644
---- a/drivers/platform/chrome/chromeos_privacy_screen.c
-+++ b/drivers/platform/chrome/chromeos_privacy_screen.c
-@@ -123,12 +123,11 @@ static int chromeos_privacy_screen_add(struct acpi_device *adev)
-       return 0;
- }
--static int chromeos_privacy_screen_remove(struct acpi_device *adev)
-+static void chromeos_privacy_screen_remove(struct acpi_device *adev)
- {
-       struct drm_privacy_screen *drm_privacy_screen = acpi_driver_data(adev);
-       drm_privacy_screen_unregister(drm_privacy_screen);
--      return 0;
- }
- static const struct acpi_device_id chromeos_privacy_screen_device_ids[] = {
-diff --git a/drivers/platform/chrome/wilco_ec/event.c b/drivers/platform/chrome/wilco_ec/event.c
-index 32e400590be5a..69ceead8cdaa1 100644
---- a/drivers/platform/chrome/wilco_ec/event.c
-+++ b/drivers/platform/chrome/wilco_ec/event.c
-@@ -500,15 +500,13 @@ static int event_device_add(struct acpi_device *adev)
-       return error;
- }
--static int event_device_remove(struct acpi_device *adev)
-+static void event_device_remove(struct acpi_device *adev)
- {
-       struct event_device_data *dev_data = adev->driver_data;
-       cdev_device_del(&dev_data->cdev, &dev_data->dev);
-       ida_simple_remove(&event_ida, MINOR(dev_data->dev.devt));
-       hangup_device(dev_data);
--
--      return 0;
- }
- static const struct acpi_device_id event_acpi_ids[] = {
-diff --git a/drivers/platform/surface/surfacepro3_button.c b/drivers/platform/surface/surfacepro3_button.c
-index 242fb690dcaf7..2755601f979cd 100644
---- a/drivers/platform/surface/surfacepro3_button.c
-+++ b/drivers/platform/surface/surfacepro3_button.c
-@@ -239,13 +239,12 @@ static int surface_button_add(struct acpi_device *device)
-       return error;
- }
--static int surface_button_remove(struct acpi_device *device)
-+static void surface_button_remove(struct acpi_device *device)
- {
-       struct surface_button *button = acpi_driver_data(device);
-       input_unregister_device(button->input);
-       kfree(button);
--      return 0;
- }
- static SIMPLE_DEV_PM_OPS(surface_button_pm,
-diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
-index 47b2f8bb6fb53..761029f39314a 100644
---- a/drivers/platform/x86/asus-laptop.c
-+++ b/drivers/platform/x86/asus-laptop.c
-@@ -1901,7 +1901,7 @@ static int asus_acpi_add(struct acpi_device *device)
-       return result;
- }
--static int asus_acpi_remove(struct acpi_device *device)
-+static void asus_acpi_remove(struct acpi_device *device)
- {
-       struct asus_laptop *asus = acpi_driver_data(device);
-@@ -1914,7 +1914,6 @@ static int asus_acpi_remove(struct acpi_device *device)
-       kfree(asus->name);
-       kfree(asus);
--      return 0;
- }
- static const struct acpi_device_id asus_device_ids[] = {
-diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c
-index d3e7171928e5d..abf01e00b799f 100644
---- a/drivers/platform/x86/asus-wireless.c
-+++ b/drivers/platform/x86/asus-wireless.c
-@@ -175,7 +175,7 @@ static int asus_wireless_add(struct acpi_device *adev)
-       return err;
- }
--static int asus_wireless_remove(struct acpi_device *adev)
-+static void asus_wireless_remove(struct acpi_device *adev)
- {
-       struct asus_wireless_data *data = acpi_driver_data(adev);
-@@ -183,7 +183,6 @@ static int asus_wireless_remove(struct acpi_device *adev)
-               devm_led_classdev_unregister(&adev->dev, &data->led);
-               destroy_workqueue(data->wq);
-       }
--      return 0;
- }
- static struct acpi_driver asus_wireless_driver = {
-diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
-index 9309ab5792cbc..8b6a146118599 100644
---- a/drivers/platform/x86/classmate-laptop.c
-+++ b/drivers/platform/x86/classmate-laptop.c
-@@ -418,11 +418,11 @@ static int cmpc_accel_add_v4(struct acpi_device *acpi)
-       return error;
- }
--static int cmpc_accel_remove_v4(struct acpi_device *acpi)
-+static void cmpc_accel_remove_v4(struct acpi_device *acpi)
- {
-       device_remove_file(&acpi->dev, &cmpc_accel_sensitivity_attr_v4);
-       device_remove_file(&acpi->dev, &cmpc_accel_g_select_attr_v4);
--      return cmpc_remove_acpi_notify_device(acpi);
-+      cmpc_remove_acpi_notify_device(acpi);
- }
- static SIMPLE_DEV_PM_OPS(cmpc_accel_pm, cmpc_accel_suspend_v4,
-@@ -648,10 +648,10 @@ static int cmpc_accel_add(struct acpi_device *acpi)
-       return error;
- }
--static int cmpc_accel_remove(struct acpi_device *acpi)
-+static void cmpc_accel_remove(struct acpi_device *acpi)
- {
-       device_remove_file(&acpi->dev, &cmpc_accel_sensitivity_attr);
--      return cmpc_remove_acpi_notify_device(acpi);
-+      cmpc_remove_acpi_notify_device(acpi);
- }
- static const struct acpi_device_id cmpc_accel_device_ids[] = {
-@@ -727,9 +727,9 @@ static int cmpc_tablet_add(struct acpi_device *acpi)
-                                          cmpc_tablet_idev_init);
- }
--static int cmpc_tablet_remove(struct acpi_device *acpi)
-+static void cmpc_tablet_remove(struct acpi_device *acpi)
- {
--      return cmpc_remove_acpi_notify_device(acpi);
-+      cmpc_remove_acpi_notify_device(acpi);
- }
- #ifdef CONFIG_PM_SLEEP
-@@ -974,7 +974,7 @@ static int cmpc_ipml_add(struct acpi_device *acpi)
-       return retval;
- }
--static int cmpc_ipml_remove(struct acpi_device *acpi)
-+static void cmpc_ipml_remove(struct acpi_device *acpi)
- {
-       struct ipml200_dev *ipml;
-@@ -988,8 +988,6 @@ static int cmpc_ipml_remove(struct acpi_device *acpi)
-       }
-       kfree(ipml);
--
--      return 0;
- }
- static const struct acpi_device_id cmpc_ipml_device_ids[] = {
-@@ -1055,9 +1053,9 @@ static int cmpc_keys_add(struct acpi_device *acpi)
-                                          cmpc_keys_idev_init);
- }
--static int cmpc_keys_remove(struct acpi_device *acpi)
-+static void cmpc_keys_remove(struct acpi_device *acpi)
- {
--      return cmpc_remove_acpi_notify_device(acpi);
-+      cmpc_remove_acpi_notify_device(acpi);
- }
- static const struct acpi_device_id cmpc_keys_device_ids[] = {
-diff --git a/drivers/platform/x86/dell/dell-rbtn.c b/drivers/platform/x86/dell/dell-rbtn.c
-index a89fad47ff139..aa0e6c9074942 100644
---- a/drivers/platform/x86/dell/dell-rbtn.c
-+++ b/drivers/platform/x86/dell/dell-rbtn.c
-@@ -206,7 +206,7 @@ static void rbtn_input_event(struct rbtn_data *rbtn_data)
-  */
- static int rbtn_add(struct acpi_device *device);
--static int rbtn_remove(struct acpi_device *device);
-+static void rbtn_remove(struct acpi_device *device);
- static void rbtn_notify(struct acpi_device *device, u32 event);
- static const struct acpi_device_id rbtn_ids[] = {
-@@ -426,7 +426,7 @@ static int rbtn_add(struct acpi_device *device)
- }
--static int rbtn_remove(struct acpi_device *device)
-+static void rbtn_remove(struct acpi_device *device)
- {
-       struct rbtn_data *rbtn_data = device->driver_data;
-@@ -443,8 +443,6 @@ static int rbtn_remove(struct acpi_device *device)
-       rbtn_acquire(device, false);
-       device->driver_data = NULL;
--
--      return 0;
- }
- static void rbtn_notify(struct acpi_device *device, u32 event)
-diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
-index a388a28b6f2a2..62b71e8e3567a 100644
---- a/drivers/platform/x86/eeepc-laptop.c
-+++ b/drivers/platform/x86/eeepc-laptop.c
-@@ -1440,7 +1440,7 @@ static int eeepc_acpi_add(struct acpi_device *device)
-       return result;
- }
--static int eeepc_acpi_remove(struct acpi_device *device)
-+static void eeepc_acpi_remove(struct acpi_device *device)
- {
-       struct eeepc_laptop *eeepc = acpi_driver_data(device);
-@@ -1451,7 +1451,6 @@ static int eeepc_acpi_remove(struct acpi_device *device)
-       eeepc_platform_exit(eeepc);
-       kfree(eeepc);
--      return 0;
- }
-diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
-index b543d117b12c7..085e044e888e4 100644
---- a/drivers/platform/x86/fujitsu-laptop.c
-+++ b/drivers/platform/x86/fujitsu-laptop.c
-@@ -847,15 +847,13 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device)
-       return ret;
- }
--static int acpi_fujitsu_laptop_remove(struct acpi_device *device)
-+static void acpi_fujitsu_laptop_remove(struct acpi_device *device)
- {
-       struct fujitsu_laptop *priv = acpi_driver_data(device);
-       fujitsu_laptop_platform_remove(device);
-       kfifo_free(&priv->fifo);
--
--      return 0;
- }
- static void acpi_fujitsu_laptop_press(struct acpi_device *device, int scancode)
-diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c
-index 7fb7fe5eb55a1..17f08ce7552d7 100644
---- a/drivers/platform/x86/fujitsu-tablet.c
-+++ b/drivers/platform/x86/fujitsu-tablet.c
-@@ -484,12 +484,11 @@ static int acpi_fujitsu_add(struct acpi_device *adev)
-       return 0;
- }
--static int acpi_fujitsu_remove(struct acpi_device *adev)
-+static void acpi_fujitsu_remove(struct acpi_device *adev)
- {
-       free_irq(fujitsu.irq, fujitsu_interrupt);
-       release_region(fujitsu.io_base, fujitsu.io_length);
-       input_fujitsu_remove();
--      return 0;
- }
- #ifdef CONFIG_PM_SLEEP
-diff --git a/drivers/platform/x86/intel/rst.c b/drivers/platform/x86/intel/rst.c
-index 3b81cb896fedf..35814a7707af7 100644
---- a/drivers/platform/x86/intel/rst.c
-+++ b/drivers/platform/x86/intel/rst.c
-@@ -113,12 +113,10 @@ static int irst_add(struct acpi_device *acpi)
-       return error;
- }
--static int irst_remove(struct acpi_device *acpi)
-+static void irst_remove(struct acpi_device *acpi)
- {
-       device_remove_file(&acpi->dev, &irst_wakeup_attr);
-       device_remove_file(&acpi->dev, &irst_timeout_attr);
--
--      return 0;
- }
- static const struct acpi_device_id irst_ids[] = {
-diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c
-index 332868b140ed5..1452110d36ad7 100644
---- a/drivers/platform/x86/lg-laptop.c
-+++ b/drivers/platform/x86/lg-laptop.c
-@@ -761,7 +761,7 @@ static int acpi_add(struct acpi_device *device)
-       return ret;
- }
--static int acpi_remove(struct acpi_device *device)
-+static void acpi_remove(struct acpi_device *device)
- {
-       sysfs_remove_group(&pf_device->dev.kobj, &dev_attribute_group);
-@@ -773,8 +773,6 @@ static int acpi_remove(struct acpi_device *device)
-       platform_device_unregister(pf_device);
-       pf_device = NULL;
-       platform_driver_unregister(&pf_driver);
--
--      return 0;
- }
- static const struct acpi_device_id device_ids[] = {
-diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
-index ad3083f9946d4..cf845ee1c7b1f 100644
---- a/drivers/platform/x86/panasonic-laptop.c
-+++ b/drivers/platform/x86/panasonic-laptop.c
-@@ -183,7 +183,7 @@ enum SINF_BITS { SINF_NUM_BATTERIES = 0,
- /* R1 handles SINF_AC_CUR_BRIGHT as SINF_CUR_BRIGHT, doesn't know AC state */
- static int acpi_pcc_hotkey_add(struct acpi_device *device);
--static int acpi_pcc_hotkey_remove(struct acpi_device *device);
-+static void acpi_pcc_hotkey_remove(struct acpi_device *device);
- static void acpi_pcc_hotkey_notify(struct acpi_device *device, u32 event);
- static const struct acpi_device_id pcc_device_ids[] = {
-@@ -1065,12 +1065,12 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
-       return result;
- }
--static int acpi_pcc_hotkey_remove(struct acpi_device *device)
-+static void acpi_pcc_hotkey_remove(struct acpi_device *device)
- {
-       struct pcc_acpi *pcc = acpi_driver_data(device);
-       if (!device || !pcc)
--              return -EINVAL;
-+              return;
-       i8042_remove_filter(panasonic_i8042_filter);
-@@ -1088,8 +1088,6 @@ static int acpi_pcc_hotkey_remove(struct acpi_device *device)
-       kfree(pcc->sinf);
-       kfree(pcc);
--
--      return 0;
- }
- module_acpi_driver(acpi_pcc_driver);
-diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
-index 5ff5aaf92b56e..17ef014b9a8a6 100644
---- a/drivers/platform/x86/sony-laptop.c
-+++ b/drivers/platform/x86/sony-laptop.c
-@@ -3270,7 +3270,7 @@ static int sony_nc_add(struct acpi_device *device)
-       return result;
- }
--static int sony_nc_remove(struct acpi_device *device)
-+static void sony_nc_remove(struct acpi_device *device)
- {
-       struct sony_nc_value *item;
-@@ -3287,8 +3287,6 @@ static int sony_nc_remove(struct acpi_device *device)
-       sony_pf_remove();
-       sony_laptop_remove_input();
-       dprintk(SONY_NC_DRIVER_NAME " removed.\n");
--
--      return 0;
- }
- static const struct acpi_device_id sony_device_ids[] = {
-@@ -4637,14 +4635,14 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
-  *  ACPI driver
-  *
-  *****************/
--static int sony_pic_remove(struct acpi_device *device)
-+static void sony_pic_remove(struct acpi_device *device)
- {
-       struct sony_pic_ioport *io, *tmp_io;
-       struct sony_pic_irq *irq, *tmp_irq;
-       if (sony_pic_disable(device)) {
-               pr_err("Couldn't disable device\n");
--              return -ENXIO;
-+              return;
-       }
-       free_irq(spic_dev.cur_irq->irq.interrupts[0], &spic_dev);
-@@ -4674,7 +4672,6 @@ static int sony_pic_remove(struct acpi_device *device)
-       spic_dev.cur_irq = NULL;
-       dprintk(SONY_PIC_DRIVER_NAME " removed.\n");
--      return 0;
- }
- static int sony_pic_add(struct acpi_device *device)
-diff --git a/drivers/platform/x86/system76_acpi.c b/drivers/platform/x86/system76_acpi.c
-index 958df41ad5098..52d94d8b1f25f 100644
---- a/drivers/platform/x86/system76_acpi.c
-+++ b/drivers/platform/x86/system76_acpi.c
-@@ -744,7 +744,7 @@ static int system76_add(struct acpi_device *acpi_dev)
- }
- // Remove a System76 ACPI device
--static int system76_remove(struct acpi_device *acpi_dev)
-+static void system76_remove(struct acpi_device *acpi_dev)
- {
-       struct system76_data *data;
-@@ -760,8 +760,6 @@ static int system76_remove(struct acpi_device *acpi_dev)
-       devm_led_classdev_unregister(&acpi_dev->dev, &data->kb_led);
-       system76_get(data, "FINI");
--
--      return 0;
- }
- static struct acpi_driver system76_driver = {
-diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c
-index 6d18fbf8762b1..20df1ebefc30e 100644
---- a/drivers/platform/x86/topstar-laptop.c
-+++ b/drivers/platform/x86/topstar-laptop.c
-@@ -332,7 +332,7 @@ static int topstar_acpi_add(struct acpi_device *device)
-       return err;
- }
--static int topstar_acpi_remove(struct acpi_device *device)
-+static void topstar_acpi_remove(struct acpi_device *device)
- {
-       struct topstar_laptop *topstar = acpi_driver_data(device);
-@@ -344,7 +344,6 @@ static int topstar_acpi_remove(struct acpi_device *device)
-       topstar_acpi_exit(topstar);
-       kfree(topstar);
--      return 0;
- }
- static const struct acpi_device_id topstar_device_ids[] = {
-diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
-index 160abd3b3af8b..ce6a735b1abd8 100644
---- a/drivers/platform/x86/toshiba_acpi.c
-+++ b/drivers/platform/x86/toshiba_acpi.c
-@@ -3186,7 +3186,7 @@ static void print_supported_features(struct toshiba_acpi_dev *dev)
-       pr_cont("\n");
- }
--static int toshiba_acpi_remove(struct acpi_device *acpi_dev)
-+static void toshiba_acpi_remove(struct acpi_device *acpi_dev)
- {
-       struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
-@@ -3234,8 +3234,6 @@ static int toshiba_acpi_remove(struct acpi_device *acpi_dev)
-               toshiba_acpi = NULL;
-       kfree(dev);
--
--      return 0;
- }
- static const char *find_hci_method(acpi_handle handle)
-diff --git a/drivers/platform/x86/toshiba_bluetooth.c b/drivers/platform/x86/toshiba_bluetooth.c
-index 57a5dc60c58a6..d8f81962a2402 100644
---- a/drivers/platform/x86/toshiba_bluetooth.c
-+++ b/drivers/platform/x86/toshiba_bluetooth.c
-@@ -36,7 +36,7 @@ struct toshiba_bluetooth_dev {
- };
- static int toshiba_bt_rfkill_add(struct acpi_device *device);
--static int toshiba_bt_rfkill_remove(struct acpi_device *device);
-+static void toshiba_bt_rfkill_remove(struct acpi_device *device);
- static void toshiba_bt_rfkill_notify(struct acpi_device *device, u32 event);
- static const struct acpi_device_id bt_device_ids[] = {
-@@ -279,7 +279,7 @@ static int toshiba_bt_rfkill_add(struct acpi_device *device)
-       return result;
- }
--static int toshiba_bt_rfkill_remove(struct acpi_device *device)
-+static void toshiba_bt_rfkill_remove(struct acpi_device *device)
- {
-       struct toshiba_bluetooth_dev *bt_dev = acpi_driver_data(device);
-@@ -291,7 +291,7 @@ static int toshiba_bt_rfkill_remove(struct acpi_device *device)
-       kfree(bt_dev);
--      return toshiba_bluetooth_disable(device->handle);
-+      toshiba_bluetooth_disable(device->handle);
- }
- module_acpi_driver(toshiba_bt_rfkill_driver);
-diff --git a/drivers/platform/x86/toshiba_haps.c b/drivers/platform/x86/toshiba_haps.c
-index 49e84095bb010..8c9f76286b080 100644
---- a/drivers/platform/x86/toshiba_haps.c
-+++ b/drivers/platform/x86/toshiba_haps.c
-@@ -138,14 +138,12 @@ static void toshiba_haps_notify(struct acpi_device *device, u32 event)
-                                       event, 0);
- }
--static int toshiba_haps_remove(struct acpi_device *device)
-+static void toshiba_haps_remove(struct acpi_device *device)
- {
-       sysfs_remove_group(&device->dev.kobj, &haps_attr_group);
-       if (toshiba_haps)
-               toshiba_haps = NULL;
--
--      return 0;
- }
- /* Helper function */
-diff --git a/drivers/platform/x86/wireless-hotkey.c b/drivers/platform/x86/wireless-hotkey.c
-index 11c60a2734468..c64d9f0844049 100644
---- a/drivers/platform/x86/wireless-hotkey.c
-+++ b/drivers/platform/x86/wireless-hotkey.c
-@@ -83,10 +83,9 @@ static int wl_add(struct acpi_device *device)
-       return err;
- }
--static int wl_remove(struct acpi_device *device)
-+static void wl_remove(struct acpi_device *device)
- {
-       wireless_input_destroy();
--      return 0;
- }
- static struct acpi_driver wl_driver = {
-diff --git a/drivers/platform/x86/xo15-ebook.c b/drivers/platform/x86/xo15-ebook.c
-index 97440462aa258..391f7ea4431e0 100644
---- a/drivers/platform/x86/xo15-ebook.c
-+++ b/drivers/platform/x86/xo15-ebook.c
-@@ -143,13 +143,12 @@ static int ebook_switch_add(struct acpi_device *device)
-       return error;
- }
--static int ebook_switch_remove(struct acpi_device *device)
-+static void ebook_switch_remove(struct acpi_device *device)
- {
-       struct ebook_switch *button = acpi_driver_data(device);
-       input_unregister_device(button->input);
-       kfree(button);
--      return 0;
- }
- static struct acpi_driver xo15_ebook_driver = {
-diff --git a/drivers/ptp/ptp_vmw.c b/drivers/ptp/ptp_vmw.c
-index 5dca26e14bdc8..0dcbabd1533db 100644
---- a/drivers/ptp/ptp_vmw.c
-+++ b/drivers/ptp/ptp_vmw.c
-@@ -101,10 +101,9 @@ static int ptp_vmw_acpi_add(struct acpi_device *device)
-       return 0;
- }
--static int ptp_vmw_acpi_remove(struct acpi_device *device)
-+static void ptp_vmw_acpi_remove(struct acpi_device *device)
- {
-       ptp_clock_unregister(ptp_vmw_clock);
--      return 0;
- }
- static const struct acpi_device_id ptp_vmw_acpi_device_ids[] = {
-diff --git a/drivers/thermal/intel/intel_menlow.c b/drivers/thermal/intel/intel_menlow.c
-index 101d7e791a137..3f885b08a4909 100644
---- a/drivers/thermal/intel/intel_menlow.c
-+++ b/drivers/thermal/intel/intel_menlow.c
-@@ -179,22 +179,20 @@ static int intel_menlow_memory_add(struct acpi_device *device)
- }
--static int intel_menlow_memory_remove(struct acpi_device *device)
-+static void intel_menlow_memory_remove(struct acpi_device *device)
- {
-       struct thermal_cooling_device *cdev;
-       if (!device)
--              return -EINVAL;
-+              return;
-       cdev = acpi_driver_data(device);
-       if (!cdev)
--              return -EINVAL;
-+              return;
-       sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
-       sysfs_remove_link(&cdev->device.kobj, "device");
-       thermal_cooling_device_unregister(cdev);
--
--      return 0;
- }
- static const struct acpi_device_id intel_menlow_memory_ids[] = {
-diff --git a/drivers/video/backlight/apple_bl.c b/drivers/video/backlight/apple_bl.c
-index c0d9339cff873..e9e7acb577bfa 100644
---- a/drivers/video/backlight/apple_bl.c
-+++ b/drivers/video/backlight/apple_bl.c
-@@ -193,13 +193,12 @@ static int apple_bl_add(struct acpi_device *dev)
-       return 0;
- }
--static int apple_bl_remove(struct acpi_device *dev)
-+static void apple_bl_remove(struct acpi_device *dev)
- {
-       backlight_device_unregister(apple_backlight_device);
-       release_region(hw_data->iostart, hw_data->iolen);
-       hw_data = NULL;
--      return 0;
- }
- static const struct acpi_device_id apple_bl_ids[] = {
-diff --git a/drivers/watchdog/ni903x_wdt.c b/drivers/watchdog/ni903x_wdt.c
-index 4cebad324b202..045bb72d9a438 100644
---- a/drivers/watchdog/ni903x_wdt.c
-+++ b/drivers/watchdog/ni903x_wdt.c
-@@ -224,14 +224,12 @@ static int ni903x_acpi_add(struct acpi_device *device)
-       return 0;
- }
--static int ni903x_acpi_remove(struct acpi_device *device)
-+static void ni903x_acpi_remove(struct acpi_device *device)
- {
-       struct ni903x_wdt *wdt = acpi_driver_data(device);
-       ni903x_wdd_stop(&wdt->wdd);
-       watchdog_unregister_device(&wdt->wdd);
--
--      return 0;
- }
- static const struct acpi_device_id ni903x_device_ids[] = {
-diff --git a/drivers/xen/xen-acpi-pad.c b/drivers/xen/xen-acpi-pad.c
-index ccd8012020f15..ede69a5278d3f 100644
---- a/drivers/xen/xen-acpi-pad.c
-+++ b/drivers/xen/xen-acpi-pad.c
-@@ -122,7 +122,7 @@ static int acpi_pad_add(struct acpi_device *device)
-       return 0;
- }
--static int acpi_pad_remove(struct acpi_device *device)
-+static void acpi_pad_remove(struct acpi_device *device)
- {
-       mutex_lock(&xen_cpu_lock);
-       xen_acpi_pad_idle_cpus(0);
-@@ -130,7 +130,6 @@ static int acpi_pad_remove(struct acpi_device *device)
-       acpi_remove_notify_handler(device->handle,
-               ACPI_DEVICE_NOTIFY, acpi_pad_notify);
--      return 0;
- }
- static const struct acpi_device_id pad_device_ids[] = {
-diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
-index 6badc50ec4e66..0584e9f6e3397 100644
---- a/include/acpi/acpi_bus.h
-+++ b/include/acpi/acpi_bus.h
-@@ -149,7 +149,7 @@ struct acpi_hotplug_context {
-  */
- typedef int (*acpi_op_add) (struct acpi_device * device);
--typedef int (*acpi_op_remove) (struct acpi_device * device);
-+typedef void (*acpi_op_remove) (struct acpi_device *device);
- typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event);
- struct acpi_device_ops {
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-clocking-wizard-check-return-value-of-devm_kaspr.patch b/queue-6.1/clk-clocking-wizard-check-return-value-of-devm_kaspr.patch
deleted file mode 100644 (file)
index f801957..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From 440417a3c14fc28382c09620dddee82df91b3835 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 30 May 2023 12:39:13 +0300
-Subject: clk: clocking-wizard: check return value of devm_kasprintf()
-
-From: Claudiu Beznea <claudiu.beznea@microchip.com>
-
-[ Upstream commit b1356ed1a4461de06dfdc02bf549c3e8750162e5 ]
-
-devm_kasprintf() returns a pointer to dynamically allocated memory.
-Pointer could be NULL in case allocation fails. Check pointer validity.
-Identified with coccinelle (kmerr.cocci script).
-
-Fixes: 2046338dcbc6 ("ARM: mxs: Use soc bus infrastructure")
-Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
-Link: https://lore.kernel.org/r/20230530093913.1656095-9-claudiu.beznea@microchip.com
-Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
-index 5c362c622a866..77532c12b140d 100644
---- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
-+++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
-@@ -648,6 +648,11 @@ static int clk_wzrd_probe(struct platform_device *pdev)
-       }
-       clkout_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_out0", dev_name(&pdev->dev));
-+      if (!clkout_name) {
-+              ret = -ENOMEM;
-+              goto err_disable_clk;
-+      }
-+
-       if (nr_outputs == 1) {
-               clk_wzrd->clkout[0] = clk_wzrd_register_divider
-                               (&pdev->dev, clkout_name,
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-mediatek-clk-gate-propagate-struct-device-with-m.patch b/queue-6.1/clk-mediatek-clk-gate-propagate-struct-device-with-m.patch
deleted file mode 100644 (file)
index 3cf4194..0000000
+++ /dev/null
@@ -1,1236 +0,0 @@
-From 9be0cd0c896be81d1ec3af652ab5fcee9f87589e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 20 Jan 2023 10:20:33 +0100
-Subject: clk: mediatek: clk-gate: Propagate struct device with
- mtk_clk_register_gates()
-
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
-[ Upstream commit 20498d52c9c1a68b1d92c42bce1dc893d3e74f30 ]
-
-Commit e4c23e19aa2a ("clk: mediatek: Register clock gate with device")
-introduces a helper function for the sole purpose of propagating a
-struct device pointer to the clk API when registering the mtk-gate
-clocks to take advantage of Runtime PM when/where needed and where
-a power domain is defined in devicetree.
-
-Function mtk_clk_register_gates() then becomes a wrapper around the
-new mtk_clk_register_gates_with_dev() function that will simply pass
-NULL as struct device: this is essential when registering drivers
-with CLK_OF_DECLARE instead of as a platform device, as there will
-be no struct device to pass... but we can as well simply have only
-one function that always takes such pointer as a param and pass NULL
-when unavoidable.
-
-This commit removes the mtk_clk_register_gates() wrapper and renames
-mtk_clk_register_gates_with_dev() to the former and all of the calls
-to either of the two functions were fixed in all drivers in order to
-reflect this change; also, to improve consistency with other kernel
-functions, the pointer to struct device was moved as the first param.
-
-Since a lot of MediaTek clock drivers are actually registering as a
-platform device, but were still registering the mtk-gate clocks
-without passing any struct device to the clock framework, they've
-been changed to pass a valid one now, as to make all those platforms
-able to use runtime power management where available.
-
-While at it, some much needed indentation changes were also done.
-
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
-Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
-Tested-by: Miles Chen <miles.chen@mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-4-angelogioacchino.delregno@collabora.com
-Tested-by: Mingming Su <mingming.su@mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-Stable-dep-of: 3db7285e0441 ("clk: mediatek: fix of_iomap memory leak")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/mediatek/clk-gate.c              | 23 ++++++-------------
- drivers/clk/mediatek/clk-gate.h              |  7 +-----
- drivers/clk/mediatek/clk-mt2701-aud.c        |  4 ++--
- drivers/clk/mediatek/clk-mt2701-eth.c        |  4 ++--
- drivers/clk/mediatek/clk-mt2701-g3d.c        |  2 +-
- drivers/clk/mediatek/clk-mt2701-hif.c        |  4 ++--
- drivers/clk/mediatek/clk-mt2701-mm.c         |  4 ++--
- drivers/clk/mediatek/clk-mt2701.c            | 12 +++++-----
- drivers/clk/mediatek/clk-mt2712-mm.c         |  4 ++--
- drivers/clk/mediatek/clk-mt2712.c            | 12 +++++-----
- drivers/clk/mediatek/clk-mt6765.c            | 10 ++++----
- drivers/clk/mediatek/clk-mt6779-mm.c         |  4 ++--
- drivers/clk/mediatek/clk-mt6779.c            |  6 ++---
- drivers/clk/mediatek/clk-mt6795-infracfg.c   |  3 ++-
- drivers/clk/mediatek/clk-mt6795-mm.c         |  3 ++-
- drivers/clk/mediatek/clk-mt6795-pericfg.c    |  3 ++-
- drivers/clk/mediatek/clk-mt6797-mm.c         |  4 ++--
- drivers/clk/mediatek/clk-mt6797.c            |  4 ++--
- drivers/clk/mediatek/clk-mt7622-aud.c        |  4 ++--
- drivers/clk/mediatek/clk-mt7622-eth.c        |  8 +++----
- drivers/clk/mediatek/clk-mt7622-hif.c        |  8 +++----
- drivers/clk/mediatek/clk-mt7622.c            | 14 ++++++------
- drivers/clk/mediatek/clk-mt7629-eth.c        |  7 +++---
- drivers/clk/mediatek/clk-mt7629-hif.c        |  8 +++----
- drivers/clk/mediatek/clk-mt7629.c            | 10 ++++----
- drivers/clk/mediatek/clk-mt7986-eth.c        | 10 ++++----
- drivers/clk/mediatek/clk-mt7986-infracfg.c   |  4 ++--
- drivers/clk/mediatek/clk-mt8135.c            |  8 +++----
- drivers/clk/mediatek/clk-mt8167-aud.c        |  2 +-
- drivers/clk/mediatek/clk-mt8167-img.c        |  2 +-
- drivers/clk/mediatek/clk-mt8167-mfgcfg.c     |  2 +-
- drivers/clk/mediatek/clk-mt8167-mm.c         |  4 ++--
- drivers/clk/mediatek/clk-mt8167-vdec.c       |  3 ++-
- drivers/clk/mediatek/clk-mt8167.c            |  2 +-
- drivers/clk/mediatek/clk-mt8173-mm.c         |  4 ++--
- drivers/clk/mediatek/clk-mt8173.c            | 24 ++++++++++----------
- drivers/clk/mediatek/clk-mt8183-audio.c      |  4 ++--
- drivers/clk/mediatek/clk-mt8183-mm.c         |  4 ++--
- drivers/clk/mediatek/clk-mt8183.c            | 16 ++++++-------
- drivers/clk/mediatek/clk-mt8186-mm.c         |  3 ++-
- drivers/clk/mediatek/clk-mt8192-aud.c        |  3 ++-
- drivers/clk/mediatek/clk-mt8192-mm.c         |  3 ++-
- drivers/clk/mediatek/clk-mt8192.c            | 17 +++++++-------
- drivers/clk/mediatek/clk-mt8195-apmixedsys.c |  3 ++-
- drivers/clk/mediatek/clk-mt8195-topckgen.c   |  3 ++-
- drivers/clk/mediatek/clk-mt8195-vdo0.c       |  3 ++-
- drivers/clk/mediatek/clk-mt8195-vdo1.c       |  3 ++-
- drivers/clk/mediatek/clk-mt8365-mm.c         |  5 ++--
- drivers/clk/mediatek/clk-mt8365.c            |  4 ++--
- drivers/clk/mediatek/clk-mt8516-aud.c        |  2 +-
- drivers/clk/mediatek/clk-mt8516.c            |  2 +-
- drivers/clk/mediatek/clk-mtk.c               |  4 ++--
- 52 files changed, 156 insertions(+), 160 deletions(-)
-
-diff --git a/drivers/clk/mediatek/clk-gate.c b/drivers/clk/mediatek/clk-gate.c
-index 0c867136e49d7..67d9e741c5e73 100644
---- a/drivers/clk/mediatek/clk-gate.c
-+++ b/drivers/clk/mediatek/clk-gate.c
-@@ -152,12 +152,12 @@ const struct clk_ops mtk_clk_gate_ops_no_setclr_inv = {
- };
- EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_no_setclr_inv);
--static struct clk_hw *mtk_clk_register_gate(const char *name,
-+static struct clk_hw *mtk_clk_register_gate(struct device *dev, const char *name,
-                                        const char *parent_name,
-                                        struct regmap *regmap, int set_ofs,
-                                        int clr_ofs, int sta_ofs, u8 bit,
-                                        const struct clk_ops *ops,
--                                       unsigned long flags, struct device *dev)
-+                                       unsigned long flags)
- {
-       struct mtk_clk_gate *cg;
-       int ret;
-@@ -202,10 +202,9 @@ static void mtk_clk_unregister_gate(struct clk_hw *hw)
-       kfree(cg);
- }
--int mtk_clk_register_gates_with_dev(struct device_node *node,
--                                  const struct mtk_gate *clks, int num,
--                                  struct clk_hw_onecell_data *clk_data,
--                                  struct device *dev)
-+int mtk_clk_register_gates(struct device *dev, struct device_node *node,
-+                         const struct mtk_gate *clks, int num,
-+                         struct clk_hw_onecell_data *clk_data)
- {
-       int i;
-       struct clk_hw *hw;
-@@ -229,13 +228,13 @@ int mtk_clk_register_gates_with_dev(struct device_node *node,
-                       continue;
-               }
--              hw = mtk_clk_register_gate(gate->name, gate->parent_name,
-+              hw = mtk_clk_register_gate(dev, gate->name, gate->parent_name,
-                                           regmap,
-                                           gate->regs->set_ofs,
-                                           gate->regs->clr_ofs,
-                                           gate->regs->sta_ofs,
-                                           gate->shift, gate->ops,
--                                          gate->flags, dev);
-+                                          gate->flags);
-               if (IS_ERR(hw)) {
-                       pr_err("Failed to register clk %s: %pe\n", gate->name,
-@@ -261,14 +260,6 @@ int mtk_clk_register_gates_with_dev(struct device_node *node,
-       return PTR_ERR(hw);
- }
--EXPORT_SYMBOL_GPL(mtk_clk_register_gates_with_dev);
--
--int mtk_clk_register_gates(struct device_node *node,
--                         const struct mtk_gate *clks, int num,
--                         struct clk_hw_onecell_data *clk_data)
--{
--      return mtk_clk_register_gates_with_dev(node, clks, num, clk_data, NULL);
--}
- EXPORT_SYMBOL_GPL(mtk_clk_register_gates);
- void mtk_clk_unregister_gates(const struct mtk_gate *clks, int num,
-diff --git a/drivers/clk/mediatek/clk-gate.h b/drivers/clk/mediatek/clk-gate.h
-index d9897ef535284..1a46b4c56fc5d 100644
---- a/drivers/clk/mediatek/clk-gate.h
-+++ b/drivers/clk/mediatek/clk-gate.h
-@@ -50,15 +50,10 @@ struct mtk_gate {
- #define GATE_MTK(_id, _name, _parent, _regs, _shift, _ops)            \
-       GATE_MTK_FLAGS(_id, _name, _parent, _regs, _shift, _ops, 0)
--int mtk_clk_register_gates(struct device_node *node,
-+int mtk_clk_register_gates(struct device *dev, struct device_node *node,
-                          const struct mtk_gate *clks, int num,
-                          struct clk_hw_onecell_data *clk_data);
--int mtk_clk_register_gates_with_dev(struct device_node *node,
--                                  const struct mtk_gate *clks, int num,
--                                  struct clk_hw_onecell_data *clk_data,
--                                  struct device *dev);
--
- void mtk_clk_unregister_gates(const struct mtk_gate *clks, int num,
-                             struct clk_hw_onecell_data *clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt2701-aud.c b/drivers/clk/mediatek/clk-mt2701-aud.c
-index 4287bd3f545ee..03ab212aa7f4e 100644
---- a/drivers/clk/mediatek/clk-mt2701-aud.c
-+++ b/drivers/clk/mediatek/clk-mt2701-aud.c
-@@ -127,8 +127,8 @@ static int clk_mt2701_aud_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_AUD_NR);
--      mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, audio_clks,
-+                             ARRAY_SIZE(audio_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r) {
-diff --git a/drivers/clk/mediatek/clk-mt2701-eth.c b/drivers/clk/mediatek/clk-mt2701-eth.c
-index 601358748750e..924725d67c13e 100644
---- a/drivers/clk/mediatek/clk-mt2701-eth.c
-+++ b/drivers/clk/mediatek/clk-mt2701-eth.c
-@@ -51,8 +51,8 @@ static int clk_mt2701_eth_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_ETHSYS_NR);
--      mtk_clk_register_gates(node, eth_clks, ARRAY_SIZE(eth_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, eth_clks,
-+                             ARRAY_SIZE(eth_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt2701-g3d.c b/drivers/clk/mediatek/clk-mt2701-g3d.c
-index 8d1fc8e3336eb..501fb99bb41a2 100644
---- a/drivers/clk/mediatek/clk-mt2701-g3d.c
-+++ b/drivers/clk/mediatek/clk-mt2701-g3d.c
-@@ -45,7 +45,7 @@ static int clk_mt2701_g3dsys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_G3DSYS_NR);
--      mtk_clk_register_gates(node, g3d_clks, ARRAY_SIZE(g3d_clks),
-+      mtk_clk_register_gates(&pdev->dev, node, g3d_clks, ARRAY_SIZE(g3d_clks),
-                              clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt2701-hif.c b/drivers/clk/mediatek/clk-mt2701-hif.c
-index edeeb033a2350..1ddefc21d6a0d 100644
---- a/drivers/clk/mediatek/clk-mt2701-hif.c
-+++ b/drivers/clk/mediatek/clk-mt2701-hif.c
-@@ -48,8 +48,8 @@ static int clk_mt2701_hif_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_HIFSYS_NR);
--      mtk_clk_register_gates(node, hif_clks, ARRAY_SIZE(hif_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, hif_clks,
-+                             ARRAY_SIZE(hif_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r) {
-diff --git a/drivers/clk/mediatek/clk-mt2701-mm.c b/drivers/clk/mediatek/clk-mt2701-mm.c
-index eb069f3bc9a2b..f4885dffb324f 100644
---- a/drivers/clk/mediatek/clk-mt2701-mm.c
-+++ b/drivers/clk/mediatek/clk-mt2701-mm.c
-@@ -76,8 +76,8 @@ static int clk_mt2701_mm_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_MM_NR);
--      mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, mm_clks,
-+                             ARRAY_SIZE(mm_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c
-index 1c3a93143dc5e..6c9350e1240fa 100644
---- a/drivers/clk/mediatek/clk-mt2701.c
-+++ b/drivers/clk/mediatek/clk-mt2701.c
-@@ -683,8 +683,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
-       mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
-                               base, &mt2701_clk_lock, clk_data);
--      mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+                             ARRAY_SIZE(top_clks), clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-@@ -783,8 +783,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
-               }
-       }
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--                                              infra_clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), infra_clk_data);
-       mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs),
-                                               infra_clk_data);
-@@ -894,8 +894,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_PERI_NR);
--      mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+                             ARRAY_SIZE(peri_clks), clk_data);
-       mtk_clk_register_composites(peri_muxs, ARRAY_SIZE(peri_muxs), base,
-                       &mt2701_clk_lock, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt2712-mm.c b/drivers/clk/mediatek/clk-mt2712-mm.c
-index ad6daa8f28a83..e5264f1ce60d0 100644
---- a/drivers/clk/mediatek/clk-mt2712-mm.c
-+++ b/drivers/clk/mediatek/clk-mt2712-mm.c
-@@ -117,8 +117,8 @@ static int clk_mt2712_mm_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
--      mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks),
--                      clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, mm_clks,
-+                             ARRAY_SIZE(mm_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt2712.c b/drivers/clk/mediatek/clk-mt2712.c
-index d6c2cc183b1a1..78ebb4f2335c1 100644
---- a/drivers/clk/mediatek/clk-mt2712.c
-+++ b/drivers/clk/mediatek/clk-mt2712.c
-@@ -1324,8 +1324,8 @@ static int clk_mt2712_top_probe(struct platform_device *pdev)
-                       &mt2712_clk_lock, top_clk_data);
-       mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), base,
-                       &mt2712_clk_lock, top_clk_data);
--      mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks),
--                      top_clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+                             ARRAY_SIZE(top_clks), top_clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, top_clk_data);
-@@ -1344,8 +1344,8 @@ static int clk_mt2712_infra_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--                      clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-@@ -1366,8 +1366,8 @@ static int clk_mt2712_peri_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
--      mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
--                      clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+                             ARRAY_SIZE(peri_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt6765.c b/drivers/clk/mediatek/clk-mt6765.c
-index 665981fc411f5..a94851d11d774 100644
---- a/drivers/clk/mediatek/clk-mt6765.c
-+++ b/drivers/clk/mediatek/clk-mt6765.c
-@@ -741,7 +741,7 @@ static int clk_mt6765_apmixed_probe(struct platform_device *pdev)
-       mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);
--      mtk_clk_register_gates(node, apmixed_clks,
-+      mtk_clk_register_gates(&pdev->dev, node, apmixed_clks,
-                              ARRAY_SIZE(apmixed_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-@@ -780,8 +780,8 @@ static int clk_mt6765_top_probe(struct platform_device *pdev)
-                                clk_data);
-       mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
-                              &mt6765_clk_lock, clk_data);
--      mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+                             ARRAY_SIZE(top_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-@@ -814,8 +814,8 @@ static int clk_mt6765_ifr_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_IFR_NR_CLK);
--      mtk_clk_register_gates(node, ifr_clks, ARRAY_SIZE(ifr_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, ifr_clks,
-+                             ARRAY_SIZE(ifr_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt6779-mm.c b/drivers/clk/mediatek/clk-mt6779-mm.c
-index eda8cbee3d234..2cccf62d3b36f 100644
---- a/drivers/clk/mediatek/clk-mt6779-mm.c
-+++ b/drivers/clk/mediatek/clk-mt6779-mm.c
-@@ -93,8 +93,8 @@ static int clk_mt6779_mm_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
--      mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, mm_clks,
-+                             ARRAY_SIZE(mm_clks), clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-diff --git a/drivers/clk/mediatek/clk-mt6779.c b/drivers/clk/mediatek/clk-mt6779.c
-index 0d0a90ee5eb2c..559d4d596e0c3 100644
---- a/drivers/clk/mediatek/clk-mt6779.c
-+++ b/drivers/clk/mediatek/clk-mt6779.c
-@@ -1221,7 +1221,7 @@ static int clk_mt6779_apmixed_probe(struct platform_device *pdev)
-       mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);
--      mtk_clk_register_gates(node, apmixed_clks,
-+      mtk_clk_register_gates(&pdev->dev, node, apmixed_clks,
-                              ARRAY_SIZE(apmixed_clks), clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-@@ -1263,8 +1263,8 @@ static int clk_mt6779_infra_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-diff --git a/drivers/clk/mediatek/clk-mt6795-infracfg.c b/drivers/clk/mediatek/clk-mt6795-infracfg.c
-index df7eed6e071e3..8025d171d6923 100644
---- a/drivers/clk/mediatek/clk-mt6795-infracfg.c
-+++ b/drivers/clk/mediatek/clk-mt6795-infracfg.c
-@@ -101,7 +101,8 @@ static int clk_mt6795_infracfg_probe(struct platform_device *pdev)
-       if (ret)
-               goto free_clk_data;
--      ret = mtk_clk_register_gates(node, infra_gates, ARRAY_SIZE(infra_gates), clk_data);
-+      ret = mtk_clk_register_gates(&pdev->dev, node, infra_gates,
-+                                   ARRAY_SIZE(infra_gates), clk_data);
-       if (ret)
-               goto free_clk_data;
-diff --git a/drivers/clk/mediatek/clk-mt6795-mm.c b/drivers/clk/mediatek/clk-mt6795-mm.c
-index fd73f202f2925..eebb6143ada22 100644
---- a/drivers/clk/mediatek/clk-mt6795-mm.c
-+++ b/drivers/clk/mediatek/clk-mt6795-mm.c
-@@ -87,7 +87,8 @@ static int clk_mt6795_mm_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      ret = mtk_clk_register_gates(node, mm_gates, ARRAY_SIZE(mm_gates), clk_data);
-+      ret = mtk_clk_register_gates(&pdev->dev, node, mm_gates,
-+                                   ARRAY_SIZE(mm_gates), clk_data);
-       if (ret)
-               goto free_clk_data;
-diff --git a/drivers/clk/mediatek/clk-mt6795-pericfg.c b/drivers/clk/mediatek/clk-mt6795-pericfg.c
-index cb28d35dad59b..f69e715e0c1f3 100644
---- a/drivers/clk/mediatek/clk-mt6795-pericfg.c
-+++ b/drivers/clk/mediatek/clk-mt6795-pericfg.c
-@@ -109,7 +109,8 @@ static int clk_mt6795_pericfg_probe(struct platform_device *pdev)
-       if (ret)
-               goto free_clk_data;
--      ret = mtk_clk_register_gates(node, peri_gates, ARRAY_SIZE(peri_gates), clk_data);
-+      ret = mtk_clk_register_gates(&pdev->dev, node, peri_gates,
-+                                   ARRAY_SIZE(peri_gates), clk_data);
-       if (ret)
-               goto free_clk_data;
-diff --git a/drivers/clk/mediatek/clk-mt6797-mm.c b/drivers/clk/mediatek/clk-mt6797-mm.c
-index 99a63f46642fa..d5e9fe445e308 100644
---- a/drivers/clk/mediatek/clk-mt6797-mm.c
-+++ b/drivers/clk/mediatek/clk-mt6797-mm.c
-@@ -89,8 +89,8 @@ static int clk_mt6797_mm_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_MM_NR);
--      mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, mm_clks,
-+                             ARRAY_SIZE(mm_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt6797.c b/drivers/clk/mediatek/clk-mt6797.c
-index 78339cb35beb0..9cb7d4eb4918d 100644
---- a/drivers/clk/mediatek/clk-mt6797.c
-+++ b/drivers/clk/mediatek/clk-mt6797.c
-@@ -578,8 +578,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
-               }
-       }
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--                             infra_clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), infra_clk_data);
-       mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs),
-                                infra_clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
-index b17731fa11445..e9070d0bea8d6 100644
---- a/drivers/clk/mediatek/clk-mt7622-aud.c
-+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
-@@ -114,8 +114,8 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK);
--      mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, audio_clks,
-+                             ARRAY_SIZE(audio_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r) {
-diff --git a/drivers/clk/mediatek/clk-mt7622-eth.c b/drivers/clk/mediatek/clk-mt7622-eth.c
-index a60190e834186..ece0f7a7c5f62 100644
---- a/drivers/clk/mediatek/clk-mt7622-eth.c
-+++ b/drivers/clk/mediatek/clk-mt7622-eth.c
-@@ -69,8 +69,8 @@ static int clk_mt7622_ethsys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_ETH_NR_CLK);
--      mtk_clk_register_gates(node, eth_clks, ARRAY_SIZE(eth_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, eth_clks,
-+                             ARRAY_SIZE(eth_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -91,8 +91,8 @@ static int clk_mt7622_sgmiisys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_SGMII_NR_CLK);
--      mtk_clk_register_gates(node, sgmii_clks, ARRAY_SIZE(sgmii_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, sgmii_clks,
-+                             ARRAY_SIZE(sgmii_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt7622-hif.c b/drivers/clk/mediatek/clk-mt7622-hif.c
-index 55baa6d06a205..c57ac2273c4e2 100644
---- a/drivers/clk/mediatek/clk-mt7622-hif.c
-+++ b/drivers/clk/mediatek/clk-mt7622-hif.c
-@@ -80,8 +80,8 @@ static int clk_mt7622_ssusbsys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_SSUSB_NR_CLK);
--      mtk_clk_register_gates(node, ssusb_clks, ARRAY_SIZE(ssusb_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, ssusb_clks,
-+                             ARRAY_SIZE(ssusb_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -102,8 +102,8 @@ static int clk_mt7622_pciesys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_PCIE_NR_CLK);
--      mtk_clk_register_gates(node, pcie_clks, ARRAY_SIZE(pcie_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, pcie_clks,
-+                             ARRAY_SIZE(pcie_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
-index eebbb87906930..bba88018f056a 100644
---- a/drivers/clk/mediatek/clk-mt7622.c
-+++ b/drivers/clk/mediatek/clk-mt7622.c
-@@ -621,8 +621,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
-       mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
-                                 base, &mt7622_clk_lock, clk_data);
--      mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+                             ARRAY_SIZE(top_clks), clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-@@ -635,8 +635,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), clk_data);
-       mtk_clk_register_cpumuxes(node, infra_muxes, ARRAY_SIZE(infra_muxes),
-                                 clk_data);
-@@ -663,7 +663,7 @@ static int mtk_apmixedsys_init(struct platform_device *pdev)
-       mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls),
-                             clk_data);
--      mtk_clk_register_gates(node, apmixed_clks,
-+      mtk_clk_register_gates(&pdev->dev, node, apmixed_clks,
-                              ARRAY_SIZE(apmixed_clks), clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-@@ -682,8 +682,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
--      mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+                             ARRAY_SIZE(peri_clks), clk_data);
-       mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
-                                   &mt7622_clk_lock, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt7629-eth.c b/drivers/clk/mediatek/clk-mt7629-eth.c
-index b0c8fa3b8bbec..719a47fef7980 100644
---- a/drivers/clk/mediatek/clk-mt7629-eth.c
-+++ b/drivers/clk/mediatek/clk-mt7629-eth.c
-@@ -80,7 +80,8 @@ static int clk_mt7629_ethsys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_ETH_NR_CLK);
--      mtk_clk_register_gates(node, eth_clks, CLK_ETH_NR_CLK, clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, eth_clks,
-+                             CLK_ETH_NR_CLK, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -102,8 +103,8 @@ static int clk_mt7629_sgmiisys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_SGMII_NR_CLK);
--      mtk_clk_register_gates(node, sgmii_clks[id++], CLK_SGMII_NR_CLK,
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, sgmii_clks[id++],
-+                             CLK_SGMII_NR_CLK, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt7629-hif.c b/drivers/clk/mediatek/clk-mt7629-hif.c
-index 3628811a2f57f..804900792e490 100644
---- a/drivers/clk/mediatek/clk-mt7629-hif.c
-+++ b/drivers/clk/mediatek/clk-mt7629-hif.c
-@@ -75,8 +75,8 @@ static int clk_mt7629_ssusbsys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_SSUSB_NR_CLK);
--      mtk_clk_register_gates(node, ssusb_clks, ARRAY_SIZE(ssusb_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, ssusb_clks,
-+                             ARRAY_SIZE(ssusb_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -97,8 +97,8 @@ static int clk_mt7629_pciesys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_PCIE_NR_CLK);
--      mtk_clk_register_gates(node, pcie_clks, ARRAY_SIZE(pcie_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, pcie_clks,
-+                             ARRAY_SIZE(pcie_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c
-index 0bc88b7d171b5..6642e00cfc7a7 100644
---- a/drivers/clk/mediatek/clk-mt7629.c
-+++ b/drivers/clk/mediatek/clk-mt7629.c
-@@ -581,8 +581,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), clk_data);
-       mtk_clk_register_cpumuxes(node, infra_muxes, ARRAY_SIZE(infra_muxes),
-                                 clk_data);
-@@ -604,8 +604,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
--      mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+                             ARRAY_SIZE(peri_clks), clk_data);
-       mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
-                                   &mt7629_clk_lock, clk_data);
-@@ -631,7 +631,7 @@ static int mtk_apmixedsys_init(struct platform_device *pdev)
-       mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls),
-                             clk_data);
--      mtk_clk_register_gates(node, apmixed_clks,
-+      mtk_clk_register_gates(&pdev->dev, node, apmixed_clks,
-                              ARRAY_SIZE(apmixed_clks), clk_data);
-       clk_prepare_enable(clk_data->hws[CLK_APMIXED_ARMPLL]->clk);
-diff --git a/drivers/clk/mediatek/clk-mt7986-eth.c b/drivers/clk/mediatek/clk-mt7986-eth.c
-index c21e1d672384a..e04bc6845ea6d 100644
---- a/drivers/clk/mediatek/clk-mt7986-eth.c
-+++ b/drivers/clk/mediatek/clk-mt7986-eth.c
-@@ -72,8 +72,8 @@ static void __init mtk_sgmiisys_0_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(ARRAY_SIZE(sgmii0_clks));
--      mtk_clk_register_gates(node, sgmii0_clks, ARRAY_SIZE(sgmii0_clks),
--                             clk_data);
-+      mtk_clk_register_gates(NULL, node, sgmii0_clks,
-+                             ARRAY_SIZE(sgmii0_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -90,8 +90,8 @@ static void __init mtk_sgmiisys_1_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(ARRAY_SIZE(sgmii1_clks));
--      mtk_clk_register_gates(node, sgmii1_clks, ARRAY_SIZE(sgmii1_clks),
--                             clk_data);
-+      mtk_clk_register_gates(NULL, node, sgmii1_clks,
-+                             ARRAY_SIZE(sgmii1_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-@@ -109,7 +109,7 @@ static void __init mtk_ethsys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(ARRAY_SIZE(eth_clks));
--      mtk_clk_register_gates(node, eth_clks, ARRAY_SIZE(eth_clks), clk_data);
-+      mtk_clk_register_gates(NULL, node, eth_clks, ARRAY_SIZE(eth_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt7986-infracfg.c b/drivers/clk/mediatek/clk-mt7986-infracfg.c
-index 74e68a7197301..578f150e0ee52 100644
---- a/drivers/clk/mediatek/clk-mt7986-infracfg.c
-+++ b/drivers/clk/mediatek/clk-mt7986-infracfg.c
-@@ -180,8 +180,8 @@ static int clk_mt7986_infracfg_probe(struct platform_device *pdev)
-       mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data);
-       mtk_clk_register_muxes(infra_muxes, ARRAY_SIZE(infra_muxes), node,
-                              &mt7986_clk_lock, clk_data);
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r) {
-diff --git a/drivers/clk/mediatek/clk-mt8135.c b/drivers/clk/mediatek/clk-mt8135.c
-index 3ea06d2ec2f11..8137cf2252724 100644
---- a/drivers/clk/mediatek/clk-mt8135.c
-+++ b/drivers/clk/mediatek/clk-mt8135.c
-@@ -553,8 +553,8 @@ static void __init mtk_infrasys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(NULL, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -579,8 +579,8 @@ static void __init mtk_pericfg_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
--      mtk_clk_register_gates(node, peri_gates, ARRAY_SIZE(peri_gates),
--                                              clk_data);
-+      mtk_clk_register_gates(NULL, node, peri_gates,
-+                             ARRAY_SIZE(peri_gates), clk_data);
-       mtk_clk_register_composites(peri_clks, ARRAY_SIZE(peri_clks), base,
-                       &mt8135_clk_lock, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt8167-aud.c b/drivers/clk/mediatek/clk-mt8167-aud.c
-index b5ac196cd9454..47a7d89d5777c 100644
---- a/drivers/clk/mediatek/clk-mt8167-aud.c
-+++ b/drivers/clk/mediatek/clk-mt8167-aud.c
-@@ -50,7 +50,7 @@ static void __init mtk_audsys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_AUD_NR_CLK);
--      mtk_clk_register_gates(node, aud_clks, ARRAY_SIZE(aud_clks), clk_data);
-+      mtk_clk_register_gates(NULL, node, aud_clks, ARRAY_SIZE(aud_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt8167-img.c b/drivers/clk/mediatek/clk-mt8167-img.c
-index 4e7c0772b4f99..e196b3b894a16 100644
---- a/drivers/clk/mediatek/clk-mt8167-img.c
-+++ b/drivers/clk/mediatek/clk-mt8167-img.c
-@@ -42,7 +42,7 @@ static void __init mtk_imgsys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_IMG_NR_CLK);
--      mtk_clk_register_gates(node, img_clks, ARRAY_SIZE(img_clks), clk_data);
-+      mtk_clk_register_gates(NULL, node, img_clks, ARRAY_SIZE(img_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt8167-mfgcfg.c b/drivers/clk/mediatek/clk-mt8167-mfgcfg.c
-index 192714498b2ec..602d25f4cb2e2 100644
---- a/drivers/clk/mediatek/clk-mt8167-mfgcfg.c
-+++ b/drivers/clk/mediatek/clk-mt8167-mfgcfg.c
-@@ -40,7 +40,7 @@ static void __init mtk_mfgcfg_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_MFG_NR_CLK);
--      mtk_clk_register_gates(node, mfg_clks, ARRAY_SIZE(mfg_clks), clk_data);
-+      mtk_clk_register_gates(NULL, node, mfg_clks, ARRAY_SIZE(mfg_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt8167-mm.c b/drivers/clk/mediatek/clk-mt8167-mm.c
-index a94961b7b8cc6..abc70e1221bf9 100644
---- a/drivers/clk/mediatek/clk-mt8167-mm.c
-+++ b/drivers/clk/mediatek/clk-mt8167-mm.c
-@@ -98,8 +98,8 @@ static int clk_mt8167_mm_probe(struct platform_device *pdev)
-       data = &mt8167_mmsys_driver_data;
--      ret = mtk_clk_register_gates(node, data->gates_clk, data->gates_num,
--                                   clk_data);
-+      ret = mtk_clk_register_gates(&pdev->dev, node, data->gates_clk,
-+                                   data->gates_num, clk_data);
-       if (ret)
-               return ret;
-diff --git a/drivers/clk/mediatek/clk-mt8167-vdec.c b/drivers/clk/mediatek/clk-mt8167-vdec.c
-index 38f0ba357d599..92bc05d997985 100644
---- a/drivers/clk/mediatek/clk-mt8167-vdec.c
-+++ b/drivers/clk/mediatek/clk-mt8167-vdec.c
-@@ -49,7 +49,8 @@ static void __init mtk_vdecsys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_VDEC_NR_CLK);
--      mtk_clk_register_gates(node, vdec_clks, ARRAY_SIZE(vdec_clks), clk_data);
-+      mtk_clk_register_gates(NULL, node, vdec_clks, ARRAY_SIZE(vdec_clks),
-+                             clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt8167.c b/drivers/clk/mediatek/clk-mt8167.c
-index f900ac4bf7b8d..59fe82ba5c7a1 100644
---- a/drivers/clk/mediatek/clk-mt8167.c
-+++ b/drivers/clk/mediatek/clk-mt8167.c
-@@ -937,7 +937,7 @@ static void __init mtk_topckgen_init(struct device_node *node)
-       mtk_clk_register_fixed_clks(fixed_clks, ARRAY_SIZE(fixed_clks),
-                                   clk_data);
--      mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), clk_data);
-+      mtk_clk_register_gates(NULL, node, top_clks, ARRAY_SIZE(top_clks), clk_data);
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
-       mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
-diff --git a/drivers/clk/mediatek/clk-mt8173-mm.c b/drivers/clk/mediatek/clk-mt8173-mm.c
-index 5826eabdc9c77..444a3d58c8bf5 100644
---- a/drivers/clk/mediatek/clk-mt8173-mm.c
-+++ b/drivers/clk/mediatek/clk-mt8173-mm.c
-@@ -112,8 +112,8 @@ static int clk_mt8173_mm_probe(struct platform_device *pdev)
-       data = &mt8173_mmsys_driver_data;
--      ret = mtk_clk_register_gates(node, data->gates_clk, data->gates_num,
--                                   clk_data);
-+      ret = mtk_clk_register_gates(&pdev->dev, node, data->gates_clk,
-+                                   data->gates_num, clk_data);
-       if (ret)
-               return ret;
-diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c
-index b8529ee7199da..74ed7dd129f47 100644
---- a/drivers/clk/mediatek/clk-mt8173.c
-+++ b/drivers/clk/mediatek/clk-mt8173.c
-@@ -888,8 +888,8 @@ static void __init mtk_infrasys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(NULL, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), clk_data);
-       mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data);
-       mtk_clk_register_cpumuxes(node, cpu_muxes, ARRAY_SIZE(cpu_muxes),
-@@ -918,8 +918,8 @@ static void __init mtk_pericfg_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
--      mtk_clk_register_gates(node, peri_gates, ARRAY_SIZE(peri_gates),
--                                              clk_data);
-+      mtk_clk_register_gates(NULL, node, peri_gates,
-+                             ARRAY_SIZE(peri_gates), clk_data);
-       mtk_clk_register_composites(peri_clks, ARRAY_SIZE(peri_clks), base,
-                       &mt8173_clk_lock, clk_data);
-@@ -1062,8 +1062,8 @@ static void __init mtk_imgsys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_IMG_NR_CLK);
--      mtk_clk_register_gates(node, img_clks, ARRAY_SIZE(img_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(NULL, node, img_clks,
-+                             ARRAY_SIZE(img_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-@@ -1080,8 +1080,8 @@ static void __init mtk_vdecsys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_VDEC_NR_CLK);
--      mtk_clk_register_gates(node, vdec_clks, ARRAY_SIZE(vdec_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(NULL, node, vdec_clks,
-+                             ARRAY_SIZE(vdec_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -1097,8 +1097,8 @@ static void __init mtk_vencsys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_VENC_NR_CLK);
--      mtk_clk_register_gates(node, venc_clks, ARRAY_SIZE(venc_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(NULL, node, venc_clks,
-+                             ARRAY_SIZE(venc_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -1114,8 +1114,8 @@ static void __init mtk_vencltsys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_VENCLT_NR_CLK);
--      mtk_clk_register_gates(node, venclt_clks, ARRAY_SIZE(venclt_clks),
--                                              clk_data);
-+      mtk_clk_register_gates(NULL, node, venclt_clks,
-+                             ARRAY_SIZE(venclt_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt8183-audio.c b/drivers/clk/mediatek/clk-mt8183-audio.c
-index b2d7746eddbed..f358a6e7a3408 100644
---- a/drivers/clk/mediatek/clk-mt8183-audio.c
-+++ b/drivers/clk/mediatek/clk-mt8183-audio.c
-@@ -75,8 +75,8 @@ static int clk_mt8183_audio_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK);
--      mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks),
--                      clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, audio_clks,
-+                             ARRAY_SIZE(audio_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt8183-mm.c b/drivers/clk/mediatek/clk-mt8183-mm.c
-index 11ecc6fb0065b..3580315309132 100644
---- a/drivers/clk/mediatek/clk-mt8183-mm.c
-+++ b/drivers/clk/mediatek/clk-mt8183-mm.c
-@@ -90,8 +90,8 @@ static int clk_mt8183_mm_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
--      mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks),
--                      clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, mm_clks,
-+                             ARRAY_SIZE(mm_clks), clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-diff --git a/drivers/clk/mediatek/clk-mt8183.c b/drivers/clk/mediatek/clk-mt8183.c
-index 1860a35a723a5..ba0d6ba10b359 100644
---- a/drivers/clk/mediatek/clk-mt8183.c
-+++ b/drivers/clk/mediatek/clk-mt8183.c
-@@ -1172,8 +1172,8 @@ static int clk_mt8183_apmixed_probe(struct platform_device *pdev)
-       mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);
--      mtk_clk_register_gates(node, apmixed_clks, ARRAY_SIZE(apmixed_clks),
--              clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, apmixed_clks,
-+                             ARRAY_SIZE(apmixed_clks), clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-@@ -1247,8 +1247,8 @@ static int clk_mt8183_top_probe(struct platform_device *pdev)
-       mtk_clk_register_composites(top_aud_divs, ARRAY_SIZE(top_aud_divs),
-               base, &mt8183_clk_lock, top_clk_data);
--      mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks),
--              top_clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+                             ARRAY_SIZE(top_clks), top_clk_data);
-       ret = clk_mt8183_reg_mfg_mux_notifier(&pdev->dev,
-                                             top_clk_data->hws[CLK_TOP_MUX_MFG]->clk);
-@@ -1267,8 +1267,8 @@ static int clk_mt8183_infra_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
--      mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--              clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+                             ARRAY_SIZE(infra_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r) {
-@@ -1290,8 +1290,8 @@ static int clk_mt8183_peri_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
--      mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
--                             clk_data);
-+      mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+                             ARRAY_SIZE(peri_clks), clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-diff --git a/drivers/clk/mediatek/clk-mt8186-mm.c b/drivers/clk/mediatek/clk-mt8186-mm.c
-index 1d33be4079470..0b72607777fa1 100644
---- a/drivers/clk/mediatek/clk-mt8186-mm.c
-+++ b/drivers/clk/mediatek/clk-mt8186-mm.c
-@@ -69,7 +69,8 @@ static int clk_mt8186_mm_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks), clk_data);
-+      r = mtk_clk_register_gates(&pdev->dev, node, mm_clks,
-+                                 ARRAY_SIZE(mm_clks), clk_data);
-       if (r)
-               goto free_mm_data;
-diff --git a/drivers/clk/mediatek/clk-mt8192-aud.c b/drivers/clk/mediatek/clk-mt8192-aud.c
-index 8c989bffd8c72..f524188fe4c2d 100644
---- a/drivers/clk/mediatek/clk-mt8192-aud.c
-+++ b/drivers/clk/mediatek/clk-mt8192-aud.c
-@@ -87,7 +87,8 @@ static int clk_mt8192_aud_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates(node, aud_clks, ARRAY_SIZE(aud_clks), clk_data);
-+      r = mtk_clk_register_gates(&pdev->dev, node, aud_clks,
-+                                 ARRAY_SIZE(aud_clks), clk_data);
-       if (r)
-               return r;
-diff --git a/drivers/clk/mediatek/clk-mt8192-mm.c b/drivers/clk/mediatek/clk-mt8192-mm.c
-index 1be3ff4d407db..e9eb4cf8349ac 100644
---- a/drivers/clk/mediatek/clk-mt8192-mm.c
-+++ b/drivers/clk/mediatek/clk-mt8192-mm.c
-@@ -91,7 +91,8 @@ static int clk_mt8192_mm_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks), clk_data);
-+      r = mtk_clk_register_gates(&pdev->dev, node, mm_clks,
-+                             ARRAY_SIZE(mm_clks), clk_data);
-       if (r)
-               return r;
-diff --git a/drivers/clk/mediatek/clk-mt8192.c b/drivers/clk/mediatek/clk-mt8192.c
-index 508af9bbcc46c..ac1eee513649b 100644
---- a/drivers/clk/mediatek/clk-mt8192.c
-+++ b/drivers/clk/mediatek/clk-mt8192.c
-@@ -1127,8 +1127,8 @@ static int clk_mt8192_top_probe(struct platform_device *pdev)
-       if (r)
-               goto unregister_top_composites;
--      r = mtk_clk_register_gates_with_dev(node, top_clks, ARRAY_SIZE(top_clks),
--                                          top_clk_data, &pdev->dev);
-+      r = mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+                                 ARRAY_SIZE(top_clks), top_clk_data);
-       if (r)
-               goto unregister_adj_divs_composites;
-@@ -1171,8 +1171,8 @@ static int clk_mt8192_infra_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates_with_dev(node, infra_clks, ARRAY_SIZE(infra_clks),
--                                          clk_data, &pdev->dev);
-+      r = mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+                                 ARRAY_SIZE(infra_clks), clk_data);
-       if (r)
-               goto free_clk_data;
-@@ -1203,8 +1203,8 @@ static int clk_mt8192_peri_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates_with_dev(node, peri_clks, ARRAY_SIZE(peri_clks),
--                                          clk_data, &pdev->dev);
-+      r = mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+                                 ARRAY_SIZE(peri_clks), clk_data);
-       if (r)
-               goto free_clk_data;
-@@ -1232,9 +1232,8 @@ static int clk_mt8192_apmixed_probe(struct platform_device *pdev)
-               return -ENOMEM;
-       mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);
--      r = mtk_clk_register_gates_with_dev(node, apmixed_clks,
--                                          ARRAY_SIZE(apmixed_clks), clk_data,
--                                          &pdev->dev);
-+      r = mtk_clk_register_gates(&pdev->dev, node, apmixed_clks,
-+                                 ARRAY_SIZE(apmixed_clks), clk_data);
-       if (r)
-               goto free_clk_data;
-diff --git a/drivers/clk/mediatek/clk-mt8195-apmixedsys.c b/drivers/clk/mediatek/clk-mt8195-apmixedsys.c
-index 0dfed6ec4d155..1bc917f2667e4 100644
---- a/drivers/clk/mediatek/clk-mt8195-apmixedsys.c
-+++ b/drivers/clk/mediatek/clk-mt8195-apmixedsys.c
-@@ -124,7 +124,8 @@ static int clk_mt8195_apmixed_probe(struct platform_device *pdev)
-       if (r)
-               goto free_apmixed_data;
--      r = mtk_clk_register_gates(node, apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data);
-+      r = mtk_clk_register_gates(&pdev->dev, node, apmixed_clks,
-+                                 ARRAY_SIZE(apmixed_clks), clk_data);
-       if (r)
-               goto unregister_plls;
-diff --git a/drivers/clk/mediatek/clk-mt8195-topckgen.c b/drivers/clk/mediatek/clk-mt8195-topckgen.c
-index 1e016329c1d23..e6e0298d64494 100644
---- a/drivers/clk/mediatek/clk-mt8195-topckgen.c
-+++ b/drivers/clk/mediatek/clk-mt8195-topckgen.c
-@@ -1286,7 +1286,8 @@ static int clk_mt8195_topck_probe(struct platform_device *pdev)
-       if (r)
-               goto unregister_muxes;
--      r = mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), top_clk_data);
-+      r = mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+                                 ARRAY_SIZE(top_clks), top_clk_data);
-       if (r)
-               goto unregister_composite_divs;
-diff --git a/drivers/clk/mediatek/clk-mt8195-vdo0.c b/drivers/clk/mediatek/clk-mt8195-vdo0.c
-index 07b46bfd50406..839b730688acb 100644
---- a/drivers/clk/mediatek/clk-mt8195-vdo0.c
-+++ b/drivers/clk/mediatek/clk-mt8195-vdo0.c
-@@ -104,7 +104,8 @@ static int clk_mt8195_vdo0_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates(node, vdo0_clks, ARRAY_SIZE(vdo0_clks), clk_data);
-+      r = mtk_clk_register_gates(&pdev->dev, node, vdo0_clks,
-+                                 ARRAY_SIZE(vdo0_clks), clk_data);
-       if (r)
-               goto free_vdo0_data;
-diff --git a/drivers/clk/mediatek/clk-mt8195-vdo1.c b/drivers/clk/mediatek/clk-mt8195-vdo1.c
-index 835335b9d87bb..7df695b289258 100644
---- a/drivers/clk/mediatek/clk-mt8195-vdo1.c
-+++ b/drivers/clk/mediatek/clk-mt8195-vdo1.c
-@@ -131,7 +131,8 @@ static int clk_mt8195_vdo1_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates(node, vdo1_clks, ARRAY_SIZE(vdo1_clks), clk_data);
-+      r = mtk_clk_register_gates(&pdev->dev, node, vdo1_clks,
-+                                 ARRAY_SIZE(vdo1_clks), clk_data);
-       if (r)
-               goto free_vdo1_data;
-diff --git a/drivers/clk/mediatek/clk-mt8365-mm.c b/drivers/clk/mediatek/clk-mt8365-mm.c
-index 5c8bf18ab1f1d..22c75a03a6452 100644
---- a/drivers/clk/mediatek/clk-mt8365-mm.c
-+++ b/drivers/clk/mediatek/clk-mt8365-mm.c
-@@ -81,9 +81,8 @@ static int clk_mt8365_mm_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
--      ret = mtk_clk_register_gates_with_dev(node, mm_clks,
--                                            ARRAY_SIZE(mm_clks), clk_data,
--                                            dev);
-+      ret = mtk_clk_register_gates(dev, node, mm_clks,
-+                                   ARRAY_SIZE(mm_clks), clk_data);
-       if (ret)
-               goto err_free_clk_data;
-diff --git a/drivers/clk/mediatek/clk-mt8365.c b/drivers/clk/mediatek/clk-mt8365.c
-index adfecb618f102..b30cbeae1c3d3 100644
---- a/drivers/clk/mediatek/clk-mt8365.c
-+++ b/drivers/clk/mediatek/clk-mt8365.c
-@@ -1019,8 +1019,8 @@ static int clk_mt8365_infra_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      ret = mtk_clk_register_gates(node, ifr_clks, ARRAY_SIZE(ifr_clks),
--                                   clk_data);
-+      ret = mtk_clk_register_gates(&pdev->dev, node, ifr_clks,
-+                                   ARRAY_SIZE(ifr_clks), clk_data);
-       if (ret)
-               goto free_clk_data;
-diff --git a/drivers/clk/mediatek/clk-mt8516-aud.c b/drivers/clk/mediatek/clk-mt8516-aud.c
-index a3dafc719799c..a6ae8003b9ff6 100644
---- a/drivers/clk/mediatek/clk-mt8516-aud.c
-+++ b/drivers/clk/mediatek/clk-mt8516-aud.c
-@@ -48,7 +48,7 @@ static void __init mtk_audsys_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_AUD_NR_CLK);
--      mtk_clk_register_gates(node, aud_clks, ARRAY_SIZE(aud_clks), clk_data);
-+      mtk_clk_register_gates(NULL, node, aud_clks, ARRAY_SIZE(aud_clks), clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt8516.c b/drivers/clk/mediatek/clk-mt8516.c
-index 056953d594c66..bde0b8c761d47 100644
---- a/drivers/clk/mediatek/clk-mt8516.c
-+++ b/drivers/clk/mediatek/clk-mt8516.c
-@@ -655,7 +655,7 @@ static void __init mtk_topckgen_init(struct device_node *node)
-       mtk_clk_register_fixed_clks(fixed_clks, ARRAY_SIZE(fixed_clks),
-                                   clk_data);
--      mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), clk_data);
-+      mtk_clk_register_gates(NULL, node, top_clks, ARRAY_SIZE(top_clks), clk_data);
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
-       mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
-diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
-index d31f01d0ba1c2..6123b234d3c3b 100644
---- a/drivers/clk/mediatek/clk-mtk.c
-+++ b/drivers/clk/mediatek/clk-mtk.c
-@@ -459,8 +459,8 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates_with_dev(node, mcd->clks, mcd->num_clks,
--                                          clk_data, &pdev->dev);
-+      r = mtk_clk_register_gates(&pdev->dev, node, mcd->clks, mcd->num_clks,
-+                                 clk_data);
-       if (r)
-               goto free_data;
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-mediatek-clk-mtk-extend-mtk_clk_simple_probe.patch b/queue-6.1/clk-mediatek-clk-mtk-extend-mtk_clk_simple_probe.patch
deleted file mode 100644 (file)
index c35288f..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-From d737465cca1c48d0aad0e8faf2fbfd06d7df0b09 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 20 Jan 2023 10:20:42 +0100
-Subject: clk: mediatek: clk-mtk: Extend mtk_clk_simple_probe()
-
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
-[ Upstream commit 7b6183108c8ccf0dc295f39cdf78bd8078455636 ]
-
-As a preparation to increase probe functions commonization across
-various MediaTek SoC clock controller drivers, extend function
-mtk_clk_simple_probe() to be able to register not only gates, but
-also fixed clocks, factors, muxes and composites.
-
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-Reviewed-by: Miles Chen <miles.chen@mediatek.com>
-Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
-Tested-by: Miles Chen <miles.chen@mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-13-angelogioacchino.delregno@collabora.com
-Tested-by: Mingming Su <mingming.su@mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-Stable-dep-of: 3db7285e0441 ("clk: mediatek: fix of_iomap memory leak")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/mediatek/clk-mtk.c | 101 ++++++++++++++++++++++++++++++---
- drivers/clk/mediatek/clk-mtk.h |  10 ++++
- 2 files changed, 103 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
-index 152f3d906ef8a..bfabd94a474a5 100644
---- a/drivers/clk/mediatek/clk-mtk.c
-+++ b/drivers/clk/mediatek/clk-mtk.c
-@@ -11,12 +11,14 @@
- #include <linux/mfd/syscon.h>
- #include <linux/module.h>
- #include <linux/of.h>
-+#include <linux/of_address.h>
- #include <linux/of_device.h>
- #include <linux/platform_device.h>
- #include <linux/slab.h>
- #include "clk-mtk.h"
- #include "clk-gate.h"
-+#include "clk-mux.h"
- static void mtk_init_clk_data(struct clk_hw_onecell_data *clk_data,
-                             unsigned int clk_num)
-@@ -450,20 +452,71 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
-       const struct mtk_clk_desc *mcd;
-       struct clk_hw_onecell_data *clk_data;
-       struct device_node *node = pdev->dev.of_node;
--      int r;
-+      void __iomem *base;
-+      int num_clks, r;
-       mcd = of_device_get_match_data(&pdev->dev);
-       if (!mcd)
-               return -EINVAL;
--      clk_data = mtk_alloc_clk_data(mcd->num_clks);
-+      /* Composite clocks needs us to pass iomem pointer */
-+      if (mcd->composite_clks) {
-+              if (!mcd->shared_io)
-+                      base = devm_platform_ioremap_resource(pdev, 0);
-+              else
-+                      base = of_iomap(node, 0);
-+
-+              if (IS_ERR_OR_NULL(base))
-+                      return IS_ERR(base) ? PTR_ERR(base) : -ENOMEM;
-+      }
-+
-+      /* Calculate how many clk_hw_onecell_data entries to allocate */
-+      num_clks = mcd->num_clks + mcd->num_composite_clks;
-+      num_clks += mcd->num_fixed_clks + mcd->num_factor_clks;
-+      num_clks += mcd->num_mux_clks;
-+
-+      clk_data = mtk_alloc_clk_data(num_clks);
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates(&pdev->dev, node, mcd->clks, mcd->num_clks,
--                                 clk_data);
--      if (r)
--              goto free_data;
-+      if (mcd->fixed_clks) {
-+              r = mtk_clk_register_fixed_clks(mcd->fixed_clks,
-+                                              mcd->num_fixed_clks, clk_data);
-+              if (r)
-+                      goto free_data;
-+      }
-+
-+      if (mcd->factor_clks) {
-+              r = mtk_clk_register_factors(mcd->factor_clks,
-+                                           mcd->num_factor_clks, clk_data);
-+              if (r)
-+                      goto unregister_fixed_clks;
-+      }
-+
-+      if (mcd->mux_clks) {
-+              r = mtk_clk_register_muxes(&pdev->dev, mcd->mux_clks,
-+                                         mcd->num_mux_clks, node,
-+                                         mcd->clk_lock, clk_data);
-+              if (r)
-+                      goto unregister_factors;
-+      };
-+
-+      if (mcd->composite_clks) {
-+              /* We don't check composite_lock because it's optional */
-+              r = mtk_clk_register_composites(&pdev->dev,
-+                                              mcd->composite_clks,
-+                                              mcd->num_composite_clks,
-+                                              base, mcd->clk_lock, clk_data);
-+              if (r)
-+                      goto unregister_muxes;
-+      }
-+
-+      if (mcd->clks) {
-+              r = mtk_clk_register_gates(&pdev->dev, node, mcd->clks,
-+                                         mcd->num_clks, clk_data);
-+              if (r)
-+                      goto unregister_composites;
-+      }
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -481,9 +534,28 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
-       return r;
- unregister_clks:
--      mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
-+      if (mcd->clks)
-+              mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
-+unregister_composites:
-+      if (mcd->composite_clks)
-+              mtk_clk_unregister_composites(mcd->composite_clks,
-+                                            mcd->num_composite_clks, clk_data);
-+unregister_muxes:
-+      if (mcd->mux_clks)
-+              mtk_clk_unregister_muxes(mcd->mux_clks,
-+                                       mcd->num_mux_clks, clk_data);
-+unregister_factors:
-+      if (mcd->factor_clks)
-+              mtk_clk_unregister_factors(mcd->factor_clks,
-+                                         mcd->num_factor_clks, clk_data);
-+unregister_fixed_clks:
-+      if (mcd->fixed_clks)
-+              mtk_clk_unregister_fixed_clks(mcd->fixed_clks,
-+                                            mcd->num_fixed_clks, clk_data);
- free_data:
-       mtk_free_clk_data(clk_data);
-+      if (mcd->shared_io && base)
-+              iounmap(base);
-       return r;
- }
- EXPORT_SYMBOL_GPL(mtk_clk_simple_probe);
-@@ -495,7 +567,20 @@ int mtk_clk_simple_remove(struct platform_device *pdev)
-       struct device_node *node = pdev->dev.of_node;
-       of_clk_del_provider(node);
--      mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
-+      if (mcd->clks)
-+              mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
-+      if (mcd->composite_clks)
-+              mtk_clk_unregister_composites(mcd->composite_clks,
-+                                            mcd->num_composite_clks, clk_data);
-+      if (mcd->mux_clks)
-+              mtk_clk_unregister_muxes(mcd->mux_clks,
-+                                       mcd->num_mux_clks, clk_data);
-+      if (mcd->factor_clks)
-+              mtk_clk_unregister_factors(mcd->factor_clks,
-+                                         mcd->num_factor_clks, clk_data);
-+      if (mcd->fixed_clks)
-+              mtk_clk_unregister_fixed_clks(mcd->fixed_clks,
-+                                            mcd->num_fixed_clks, clk_data);
-       mtk_free_clk_data(clk_data);
-       return 0;
-diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
-index 3993a60738c77..880b3d6d80119 100644
---- a/drivers/clk/mediatek/clk-mtk.h
-+++ b/drivers/clk/mediatek/clk-mtk.h
-@@ -196,7 +196,17 @@ void mtk_clk_unregister_ref2usb_tx(struct clk_hw *hw);
- struct mtk_clk_desc {
-       const struct mtk_gate *clks;
-       size_t num_clks;
-+      const struct mtk_composite *composite_clks;
-+      size_t num_composite_clks;
-+      const struct mtk_fixed_clk *fixed_clks;
-+      size_t num_fixed_clks;
-+      const struct mtk_fixed_factor *factor_clks;
-+      size_t num_factor_clks;
-+      const struct mtk_mux *mux_clks;
-+      size_t num_mux_clks;
-       const struct mtk_clk_rst_desc *rst_desc;
-+      spinlock_t *clk_lock;
-+      bool shared_io;
- };
- int mtk_clk_simple_probe(struct platform_device *pdev);
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-mediatek-clk-mtk-propagate-struct-device-for-com.patch b/queue-6.1/clk-mediatek-clk-mtk-propagate-struct-device-for-com.patch
deleted file mode 100644 (file)
index 5328e11..0000000
+++ /dev/null
@@ -1,518 +0,0 @@
-From da5fa141146026b6e8774f73ec8c7358fc0fe45d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 20 Jan 2023 10:20:35 +0100
-Subject: clk: mediatek: clk-mtk: Propagate struct device for composites
-
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
-[ Upstream commit 01a6c1ab57c3a474c8d23c7d82c3fcce85f62612 ]
-
-Like done for cpumux clocks, propagate struct device for composite
-clocks registered through clk-mtk helpers to be able to get runtime
-pm support for MTK clocks.
-
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-Tested-by: Miles Chen <miles.chen@mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-6-angelogioacchino.delregno@collabora.com
-Tested-by: Mingming Su <mingming.su@mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-Stable-dep-of: 3db7285e0441 ("clk: mediatek: fix of_iomap memory leak")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/mediatek/clk-mt2701.c          | 10 ++++++----
- drivers/clk/mediatek/clk-mt2712.c          | 12 ++++++++----
- drivers/clk/mediatek/clk-mt6779.c          | 10 ++++++----
- drivers/clk/mediatek/clk-mt6795-pericfg.c  |  3 ++-
- drivers/clk/mediatek/clk-mt6795-topckgen.c |  3 ++-
- drivers/clk/mediatek/clk-mt6797.c          |  3 ++-
- drivers/clk/mediatek/clk-mt7622.c          |  8 +++++---
- drivers/clk/mediatek/clk-mt7629.c          |  8 +++++---
- drivers/clk/mediatek/clk-mt8135.c          | 10 ++++++----
- drivers/clk/mediatek/clk-mt8167.c          | 10 ++++++----
- drivers/clk/mediatek/clk-mt8173.c          | 10 ++++++----
- drivers/clk/mediatek/clk-mt8183.c          | 15 +++++++++------
- drivers/clk/mediatek/clk-mt8186-mcu.c      |  3 ++-
- drivers/clk/mediatek/clk-mt8186-topckgen.c |  6 ++++--
- drivers/clk/mediatek/clk-mt8192.c          |  6 ++++--
- drivers/clk/mediatek/clk-mt8195-topckgen.c |  3 ++-
- drivers/clk/mediatek/clk-mt8365.c          |  7 ++++---
- drivers/clk/mediatek/clk-mt8516.c          | 10 ++++++----
- drivers/clk/mediatek/clk-mtk.c             | 11 ++++++-----
- drivers/clk/mediatek/clk-mtk.h             |  3 ++-
- 20 files changed, 93 insertions(+), 58 deletions(-)
-
-diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c
-index 6c9350e1240fa..d63385d710f3f 100644
---- a/drivers/clk/mediatek/clk-mt2701.c
-+++ b/drivers/clk/mediatek/clk-mt2701.c
-@@ -677,8 +677,9 @@ static int mtk_topckgen_init(struct platform_device *pdev)
-       mtk_clk_register_factors(top_fixed_divs, ARRAY_SIZE(top_fixed_divs),
-                                                               clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes),
--                              base, &mt2701_clk_lock, clk_data);
-+      mtk_clk_register_composites(&pdev->dev, top_muxes,
-+                                  ARRAY_SIZE(top_muxes), base,
-+                                  &mt2701_clk_lock, clk_data);
-       mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
-                               base, &mt2701_clk_lock, clk_data);
-@@ -897,8 +898,9 @@ static int mtk_pericfg_init(struct platform_device *pdev)
-       mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-                              ARRAY_SIZE(peri_clks), clk_data);
--      mtk_clk_register_composites(peri_muxs, ARRAY_SIZE(peri_muxs), base,
--                      &mt2701_clk_lock, clk_data);
-+      mtk_clk_register_composites(&pdev->dev, peri_muxs,
-+                                  ARRAY_SIZE(peri_muxs), base,
-+                                  &mt2701_clk_lock, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt2712.c b/drivers/clk/mediatek/clk-mt2712.c
-index 78ebb4f2335c1..a0f0c9ed48d10 100644
---- a/drivers/clk/mediatek/clk-mt2712.c
-+++ b/drivers/clk/mediatek/clk-mt2712.c
-@@ -1320,8 +1320,9 @@ static int clk_mt2712_top_probe(struct platform_device *pdev)
-       mtk_clk_register_factors(top_early_divs, ARRAY_SIZE(top_early_divs),
-                       top_clk_data);
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
--                      &mt2712_clk_lock, top_clk_data);
-+      mtk_clk_register_composites(&pdev->dev, top_muxes,
-+                                  ARRAY_SIZE(top_muxes), base,
-+                                  &mt2712_clk_lock, top_clk_data);
-       mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), base,
-                       &mt2712_clk_lock, top_clk_data);
-       mtk_clk_register_gates(&pdev->dev, node, top_clks,
-@@ -1395,8 +1396,11 @@ static int clk_mt2712_mcu_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_MCU_NR_CLK);
--      mtk_clk_register_composites(mcu_muxes, ARRAY_SIZE(mcu_muxes), base,
--                      &mt2712_clk_lock, clk_data);
-+      r = mtk_clk_register_composites(&pdev->dev, mcu_muxes,
-+                                      ARRAY_SIZE(mcu_muxes), base,
-+                                      &mt2712_clk_lock, clk_data);
-+      if (r)
-+              dev_err(&pdev->dev, "Could not register composites: %d\n", r);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt6779.c b/drivers/clk/mediatek/clk-mt6779.c
-index 559d4d596e0c3..a1c387d9731a7 100644
---- a/drivers/clk/mediatek/clk-mt6779.c
-+++ b/drivers/clk/mediatek/clk-mt6779.c
-@@ -1247,11 +1247,13 @@ static int clk_mt6779_top_probe(struct platform_device *pdev)
-       mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes),
-                              node, &mt6779_clk_lock, clk_data);
--      mtk_clk_register_composites(top_aud_muxes, ARRAY_SIZE(top_aud_muxes),
--                                  base, &mt6779_clk_lock, clk_data);
-+      mtk_clk_register_composites(&pdev->dev, top_aud_muxes,
-+                                  ARRAY_SIZE(top_aud_muxes), base,
-+                                  &mt6779_clk_lock, clk_data);
--      mtk_clk_register_composites(top_aud_divs, ARRAY_SIZE(top_aud_divs),
--                                  base, &mt6779_clk_lock, clk_data);
-+      mtk_clk_register_composites(&pdev->dev, top_aud_divs,
-+                                  ARRAY_SIZE(top_aud_divs), base,
-+                                  &mt6779_clk_lock, clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-diff --git a/drivers/clk/mediatek/clk-mt6795-pericfg.c b/drivers/clk/mediatek/clk-mt6795-pericfg.c
-index f69e715e0c1f3..08aaa9b09c363 100644
---- a/drivers/clk/mediatek/clk-mt6795-pericfg.c
-+++ b/drivers/clk/mediatek/clk-mt6795-pericfg.c
-@@ -114,7 +114,8 @@ static int clk_mt6795_pericfg_probe(struct platform_device *pdev)
-       if (ret)
-               goto free_clk_data;
--      ret = mtk_clk_register_composites(peri_clks, ARRAY_SIZE(peri_clks), base,
-+      ret = mtk_clk_register_composites(&pdev->dev, peri_clks,
-+                                        ARRAY_SIZE(peri_clks), base,
-                                         &mt6795_peri_clk_lock, clk_data);
-       if (ret)
-               goto unregister_gates;
-diff --git a/drivers/clk/mediatek/clk-mt6795-topckgen.c b/drivers/clk/mediatek/clk-mt6795-topckgen.c
-index 2948dd1aee8fa..845cc87049303 100644
---- a/drivers/clk/mediatek/clk-mt6795-topckgen.c
-+++ b/drivers/clk/mediatek/clk-mt6795-topckgen.c
-@@ -557,7 +557,8 @@ static int clk_mt6795_topckgen_probe(struct platform_device *pdev)
-       if (ret)
-               goto unregister_factors;
--      ret = mtk_clk_register_composites(top_aud_divs, ARRAY_SIZE(top_aud_divs), base,
-+      ret = mtk_clk_register_composites(&pdev->dev, top_aud_divs,
-+                                        ARRAY_SIZE(top_aud_divs), base,
-                                         &mt6795_top_clk_lock, clk_data);
-       if (ret)
-               goto unregister_muxes;
-diff --git a/drivers/clk/mediatek/clk-mt6797.c b/drivers/clk/mediatek/clk-mt6797.c
-index 9cb7d4eb4918d..17b23ee4faee6 100644
---- a/drivers/clk/mediatek/clk-mt6797.c
-+++ b/drivers/clk/mediatek/clk-mt6797.c
-@@ -396,7 +396,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
-       mtk_clk_register_factors(top_fixed_divs, ARRAY_SIZE(top_fixed_divs),
-                                clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
-+      mtk_clk_register_composites(&pdev->dev, top_muxes,
-+                                  ARRAY_SIZE(top_muxes), base,
-                                   &mt6797_clk_lock, clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
-index bba88018f056a..67a296646722f 100644
---- a/drivers/clk/mediatek/clk-mt7622.c
-+++ b/drivers/clk/mediatek/clk-mt7622.c
-@@ -615,8 +615,9 @@ static int mtk_topckgen_init(struct platform_device *pdev)
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs),
-                                clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes),
--                                  base, &mt7622_clk_lock, clk_data);
-+      mtk_clk_register_composites(&pdev->dev, top_muxes,
-+                                  ARRAY_SIZE(top_muxes), base,
-+                                  &mt7622_clk_lock, clk_data);
-       mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
-                                 base, &mt7622_clk_lock, clk_data);
-@@ -685,7 +686,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
-       mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-                              ARRAY_SIZE(peri_clks), clk_data);
--      mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
-+      mtk_clk_register_composites(&pdev->dev, peri_muxes,
-+                                  ARRAY_SIZE(peri_muxes), base,
-                                   &mt7622_clk_lock, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c
-index 6642e00cfc7a7..ec4e506bdf459 100644
---- a/drivers/clk/mediatek/clk-mt7629.c
-+++ b/drivers/clk/mediatek/clk-mt7629.c
-@@ -564,8 +564,9 @@ static int mtk_topckgen_init(struct platform_device *pdev)
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs),
-                                clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes),
--                                  base, &mt7629_clk_lock, clk_data);
-+      mtk_clk_register_composites(&pdev->dev, top_muxes,
-+                                  ARRAY_SIZE(top_muxes), base,
-+                                  &mt7629_clk_lock, clk_data);
-       clk_prepare_enable(clk_data->hws[CLK_TOP_AXI_SEL]->clk);
-       clk_prepare_enable(clk_data->hws[CLK_TOP_MEM_SEL]->clk);
-@@ -607,7 +608,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
-       mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-                              ARRAY_SIZE(peri_clks), clk_data);
--      mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
-+      mtk_clk_register_composites(&pdev->dev, peri_muxes,
-+                                  ARRAY_SIZE(peri_muxes), base,
-                                   &mt7629_clk_lock, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt8135.c b/drivers/clk/mediatek/clk-mt8135.c
-index 8137cf2252724..a39ad58e27418 100644
---- a/drivers/clk/mediatek/clk-mt8135.c
-+++ b/drivers/clk/mediatek/clk-mt8135.c
-@@ -536,8 +536,9 @@ static void __init mtk_topckgen_init(struct device_node *node)
-       mtk_clk_register_factors(root_clk_alias, ARRAY_SIZE(root_clk_alias), clk_data);
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
--                      &mt8135_clk_lock, clk_data);
-+      mtk_clk_register_composites(NULL, top_muxes,
-+                                  ARRAY_SIZE(top_muxes), base,
-+                                  &mt8135_clk_lock, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -581,8 +582,9 @@ static void __init mtk_pericfg_init(struct device_node *node)
-       mtk_clk_register_gates(NULL, node, peri_gates,
-                              ARRAY_SIZE(peri_gates), clk_data);
--      mtk_clk_register_composites(peri_clks, ARRAY_SIZE(peri_clks), base,
--                      &mt8135_clk_lock, clk_data);
-+      mtk_clk_register_composites(NULL, peri_clks,
-+                                  ARRAY_SIZE(peri_clks), base,
-+                                  &mt8135_clk_lock, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt8167.c b/drivers/clk/mediatek/clk-mt8167.c
-index 59fe82ba5c7a1..91669ebafaf9b 100644
---- a/drivers/clk/mediatek/clk-mt8167.c
-+++ b/drivers/clk/mediatek/clk-mt8167.c
-@@ -940,8 +940,9 @@ static void __init mtk_topckgen_init(struct device_node *node)
-       mtk_clk_register_gates(NULL, node, top_clks, ARRAY_SIZE(top_clks), clk_data);
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
--              &mt8167_clk_lock, clk_data);
-+      mtk_clk_register_composites(NULL, top_muxes,
-+                                  ARRAY_SIZE(top_muxes), base,
-+                                  &mt8167_clk_lock, clk_data);
-       mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
-                               base, &mt8167_clk_lock, clk_data);
-@@ -966,8 +967,9 @@ static void __init mtk_infracfg_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_IFR_NR_CLK);
--      mtk_clk_register_composites(ifr_muxes, ARRAY_SIZE(ifr_muxes), base,
--              &mt8167_clk_lock, clk_data);
-+      mtk_clk_register_composites(NULL, ifr_muxes,
-+                                  ARRAY_SIZE(ifr_muxes), base,
-+                                  &mt8167_clk_lock, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c
-index 74ed7dd129f47..d05c1109b4f87 100644
---- a/drivers/clk/mediatek/clk-mt8173.c
-+++ b/drivers/clk/mediatek/clk-mt8173.c
-@@ -869,8 +869,9 @@ static void __init mtk_topckgen_init(struct device_node *node)
-       mtk_clk_register_fixed_clks(fixed_clks, ARRAY_SIZE(fixed_clks), clk_data);
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
--                      &mt8173_clk_lock, clk_data);
-+      mtk_clk_register_composites(NULL, top_muxes,
-+                                  ARRAY_SIZE(top_muxes), base,
-+                                  &mt8173_clk_lock, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-@@ -920,8 +921,9 @@ static void __init mtk_pericfg_init(struct device_node *node)
-       mtk_clk_register_gates(NULL, node, peri_gates,
-                              ARRAY_SIZE(peri_gates), clk_data);
--      mtk_clk_register_composites(peri_clks, ARRAY_SIZE(peri_clks), base,
--                      &mt8173_clk_lock, clk_data);
-+      mtk_clk_register_composites(NULL, peri_clks,
-+                                  ARRAY_SIZE(peri_clks), base,
-+                                  &mt8173_clk_lock, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mt8183.c b/drivers/clk/mediatek/clk-mt8183.c
-index ba0d6ba10b359..bf7b342332536 100644
---- a/drivers/clk/mediatek/clk-mt8183.c
-+++ b/drivers/clk/mediatek/clk-mt8183.c
-@@ -1241,11 +1241,13 @@ static int clk_mt8183_top_probe(struct platform_device *pdev)
-       mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes),
-               node, &mt8183_clk_lock, top_clk_data);
--      mtk_clk_register_composites(top_aud_muxes, ARRAY_SIZE(top_aud_muxes),
--              base, &mt8183_clk_lock, top_clk_data);
-+      mtk_clk_register_composites(&pdev->dev, top_aud_muxes,
-+                                  ARRAY_SIZE(top_aud_muxes), base,
-+                                  &mt8183_clk_lock, top_clk_data);
--      mtk_clk_register_composites(top_aud_divs, ARRAY_SIZE(top_aud_divs),
--              base, &mt8183_clk_lock, top_clk_data);
-+      mtk_clk_register_composites(&pdev->dev, top_aud_divs,
-+                                  ARRAY_SIZE(top_aud_divs), base,
-+                                  &mt8183_clk_lock, top_clk_data);
-       mtk_clk_register_gates(&pdev->dev, node, top_clks,
-                              ARRAY_SIZE(top_clks), top_clk_data);
-@@ -1308,8 +1310,9 @@ static int clk_mt8183_mcu_probe(struct platform_device *pdev)
-       clk_data = mtk_alloc_clk_data(CLK_MCU_NR_CLK);
--      mtk_clk_register_composites(mcu_muxes, ARRAY_SIZE(mcu_muxes), base,
--                      &mt8183_clk_lock, clk_data);
-+      mtk_clk_register_composites(&pdev->dev, mcu_muxes,
-+                                  ARRAY_SIZE(mcu_muxes), base,
-+                                  &mt8183_clk_lock, clk_data);
-       return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-diff --git a/drivers/clk/mediatek/clk-mt8186-mcu.c b/drivers/clk/mediatek/clk-mt8186-mcu.c
-index dfc305c1fc5d8..e52a2d986c99c 100644
---- a/drivers/clk/mediatek/clk-mt8186-mcu.c
-+++ b/drivers/clk/mediatek/clk-mt8186-mcu.c
-@@ -65,7 +65,8 @@ static int clk_mt8186_mcu_probe(struct platform_device *pdev)
-               goto free_mcu_data;
-       }
--      r = mtk_clk_register_composites(mcu_muxes, ARRAY_SIZE(mcu_muxes), base,
-+      r = mtk_clk_register_composites(&pdev->dev, mcu_muxes,
-+                                      ARRAY_SIZE(mcu_muxes), base,
-                                       NULL, clk_data);
-       if (r)
-               goto free_mcu_data;
-diff --git a/drivers/clk/mediatek/clk-mt8186-topckgen.c b/drivers/clk/mediatek/clk-mt8186-topckgen.c
-index d7f2c4663c853..4ac157320a6b9 100644
---- a/drivers/clk/mediatek/clk-mt8186-topckgen.c
-+++ b/drivers/clk/mediatek/clk-mt8186-topckgen.c
-@@ -720,12 +720,14 @@ static int clk_mt8186_topck_probe(struct platform_device *pdev)
-       if (r)
-               goto unregister_factors;
--      r = mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
-+      r = mtk_clk_register_composites(&pdev->dev, top_muxes,
-+                                      ARRAY_SIZE(top_muxes), base,
-                                       &mt8186_clk_lock, clk_data);
-       if (r)
-               goto unregister_muxes;
--      r = mtk_clk_register_composites(top_adj_divs, ARRAY_SIZE(top_adj_divs), base,
-+      r = mtk_clk_register_composites(&pdev->dev, top_adj_divs,
-+                                      ARRAY_SIZE(top_adj_divs), base,
-                                       &mt8186_clk_lock, clk_data);
-       if (r)
-               goto unregister_composite_muxes;
-diff --git a/drivers/clk/mediatek/clk-mt8192.c b/drivers/clk/mediatek/clk-mt8192.c
-index ac1eee513649b..ab856d0276184 100644
---- a/drivers/clk/mediatek/clk-mt8192.c
-+++ b/drivers/clk/mediatek/clk-mt8192.c
-@@ -1117,12 +1117,14 @@ static int clk_mt8192_top_probe(struct platform_device *pdev)
-       if (r)
-               goto unregister_factors;
--      r = mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
-+      r = mtk_clk_register_composites(&pdev->dev, top_muxes,
-+                                      ARRAY_SIZE(top_muxes), base,
-                                       &mt8192_clk_lock, top_clk_data);
-       if (r)
-               goto unregister_muxes;
--      r = mtk_clk_register_composites(top_adj_divs, ARRAY_SIZE(top_adj_divs), base,
-+      r = mtk_clk_register_composites(&pdev->dev, top_adj_divs,
-+                                      ARRAY_SIZE(top_adj_divs), base,
-                                       &mt8192_clk_lock, top_clk_data);
-       if (r)
-               goto unregister_top_composites;
-diff --git a/drivers/clk/mediatek/clk-mt8195-topckgen.c b/drivers/clk/mediatek/clk-mt8195-topckgen.c
-index e6e0298d64494..aae31ef3903de 100644
---- a/drivers/clk/mediatek/clk-mt8195-topckgen.c
-+++ b/drivers/clk/mediatek/clk-mt8195-topckgen.c
-@@ -1281,7 +1281,8 @@ static int clk_mt8195_topck_probe(struct platform_device *pdev)
-       if (r)
-               goto unregister_muxes;
--      r = mtk_clk_register_composites(top_adj_divs, ARRAY_SIZE(top_adj_divs), base,
-+      r = mtk_clk_register_composites(&pdev->dev, top_adj_divs,
-+                                      ARRAY_SIZE(top_adj_divs), base,
-                                       &mt8195_clk_lock, top_clk_data);
-       if (r)
-               goto unregister_muxes;
-diff --git a/drivers/clk/mediatek/clk-mt8365.c b/drivers/clk/mediatek/clk-mt8365.c
-index b30cbeae1c3d3..0482a8aa43cc9 100644
---- a/drivers/clk/mediatek/clk-mt8365.c
-+++ b/drivers/clk/mediatek/clk-mt8365.c
-@@ -952,7 +952,7 @@ static int clk_mt8365_top_probe(struct platform_device *pdev)
-       if (ret)
-               goto unregister_factors;
--      ret = mtk_clk_register_composites(top_misc_mux_gates,
-+      ret = mtk_clk_register_composites(&pdev->dev, top_misc_mux_gates,
-                                         ARRAY_SIZE(top_misc_mux_gates), base,
-                                         &mt8365_clk_lock, clk_data);
-       if (ret)
-@@ -1080,8 +1080,9 @@ static int clk_mt8365_mcu_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      ret = mtk_clk_register_composites(mcu_muxes, ARRAY_SIZE(mcu_muxes),
--                                        base, &mt8365_clk_lock, clk_data);
-+      ret = mtk_clk_register_composites(&pdev->dev, mcu_muxes,
-+                                        ARRAY_SIZE(mcu_muxes), base,
-+                                        &mt8365_clk_lock, clk_data);
-       if (ret)
-               goto free_clk_data;
-diff --git a/drivers/clk/mediatek/clk-mt8516.c b/drivers/clk/mediatek/clk-mt8516.c
-index bde0b8c761d47..6983d3a48dc9a 100644
---- a/drivers/clk/mediatek/clk-mt8516.c
-+++ b/drivers/clk/mediatek/clk-mt8516.c
-@@ -658,8 +658,9 @@ static void __init mtk_topckgen_init(struct device_node *node)
-       mtk_clk_register_gates(NULL, node, top_clks, ARRAY_SIZE(top_clks), clk_data);
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
--              &mt8516_clk_lock, clk_data);
-+      mtk_clk_register_composites(NULL, top_muxes,
-+                                  ARRAY_SIZE(top_muxes), base,
-+                                  &mt8516_clk_lock, clk_data);
-       mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
-                               base, &mt8516_clk_lock, clk_data);
-@@ -684,8 +685,9 @@ static void __init mtk_infracfg_init(struct device_node *node)
-       clk_data = mtk_alloc_clk_data(CLK_IFR_NR_CLK);
--      mtk_clk_register_composites(ifr_muxes, ARRAY_SIZE(ifr_muxes), base,
--              &mt8516_clk_lock, clk_data);
-+      mtk_clk_register_composites(NULL, ifr_muxes,
-+                                  ARRAY_SIZE(ifr_muxes), base,
-+                                  &mt8516_clk_lock, clk_data);
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
-diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
-index 6123b234d3c3b..152f3d906ef8a 100644
---- a/drivers/clk/mediatek/clk-mtk.c
-+++ b/drivers/clk/mediatek/clk-mtk.c
-@@ -197,8 +197,8 @@ void mtk_clk_unregister_factors(const struct mtk_fixed_factor *clks, int num,
- }
- EXPORT_SYMBOL_GPL(mtk_clk_unregister_factors);
--static struct clk_hw *mtk_clk_register_composite(const struct mtk_composite *mc,
--              void __iomem *base, spinlock_t *lock)
-+static struct clk_hw *mtk_clk_register_composite(struct device *dev,
-+              const struct mtk_composite *mc, void __iomem *base, spinlock_t *lock)
- {
-       struct clk_hw *hw;
-       struct clk_mux *mux = NULL;
-@@ -264,7 +264,7 @@ static struct clk_hw *mtk_clk_register_composite(const struct mtk_composite *mc,
-               div_ops = &clk_divider_ops;
-       }
--      hw = clk_hw_register_composite(NULL, mc->name, parent_names, num_parents,
-+      hw = clk_hw_register_composite(dev, mc->name, parent_names, num_parents,
-               mux_hw, mux_ops,
-               div_hw, div_ops,
-               gate_hw, gate_ops,
-@@ -308,7 +308,8 @@ static void mtk_clk_unregister_composite(struct clk_hw *hw)
-       kfree(mux);
- }
--int mtk_clk_register_composites(const struct mtk_composite *mcs, int num,
-+int mtk_clk_register_composites(struct device *dev,
-+                              const struct mtk_composite *mcs, int num,
-                               void __iomem *base, spinlock_t *lock,
-                               struct clk_hw_onecell_data *clk_data)
- {
-@@ -327,7 +328,7 @@ int mtk_clk_register_composites(const struct mtk_composite *mcs, int num,
-                       continue;
-               }
--              hw = mtk_clk_register_composite(mc, base, lock);
-+              hw = mtk_clk_register_composite(dev, mc, base, lock);
-               if (IS_ERR(hw)) {
-                       pr_err("Failed to register clk %s: %pe\n", mc->name,
-diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
-index 63ae7941aa92f..3993a60738c77 100644
---- a/drivers/clk/mediatek/clk-mtk.h
-+++ b/drivers/clk/mediatek/clk-mtk.h
-@@ -149,7 +149,8 @@ struct mtk_composite {
-               .flags = 0,                                             \
-       }
--int mtk_clk_register_composites(const struct mtk_composite *mcs, int num,
-+int mtk_clk_register_composites(struct device *dev,
-+                              const struct mtk_composite *mcs, int num,
-                               void __iomem *base, spinlock_t *lock,
-                               struct clk_hw_onecell_data *clk_data);
- void mtk_clk_unregister_composites(const struct mtk_composite *mcs, int num,
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-mediatek-clk-mux-propagate-struct-device-for-mtk.patch b/queue-6.1/clk-mediatek-clk-mux-propagate-struct-device-for-mtk.patch
deleted file mode 100644 (file)
index 9fe06b6..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-From 90e4007dc588c979a45cb4c7af8c10e38bed0cb2 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 20 Jan 2023 10:20:36 +0100
-Subject: clk: mediatek: clk-mux: Propagate struct device for mtk-mux
-
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
-[ Upstream commit d3d6bd5e25cdc460df33ae1db4f051c4bdd3aa60 ]
-
-Like done for other clocks, propagate struct device for mtk mux clocks
-registered through clk-mux helpers to enable runtime pm support.
-
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-Tested-by: Miles Chen <miles.chen@mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-7-angelogioacchino.delregno@collabora.com
-Tested-by: Mingming Su <mingming.su@mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-Stable-dep-of: 3db7285e0441 ("clk: mediatek: fix of_iomap memory leak")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/mediatek/clk-mt6765.c          |  3 ++-
- drivers/clk/mediatek/clk-mt6779.c          |  5 +++--
- drivers/clk/mediatek/clk-mt6795-topckgen.c |  3 ++-
- drivers/clk/mediatek/clk-mt7986-infracfg.c |  3 ++-
- drivers/clk/mediatek/clk-mt7986-topckgen.c |  3 ++-
- drivers/clk/mediatek/clk-mt8183.c          |  5 +++--
- drivers/clk/mediatek/clk-mt8186-topckgen.c |  3 ++-
- drivers/clk/mediatek/clk-mt8192.c          |  3 ++-
- drivers/clk/mediatek/clk-mt8195-topckgen.c |  3 ++-
- drivers/clk/mediatek/clk-mt8365.c          |  3 ++-
- drivers/clk/mediatek/clk-mux.c             | 14 ++++++++------
- drivers/clk/mediatek/clk-mux.h             |  3 ++-
- 12 files changed, 32 insertions(+), 19 deletions(-)
-
-diff --git a/drivers/clk/mediatek/clk-mt6765.c b/drivers/clk/mediatek/clk-mt6765.c
-index a94851d11d774..0c20ce678350e 100644
---- a/drivers/clk/mediatek/clk-mt6765.c
-+++ b/drivers/clk/mediatek/clk-mt6765.c
-@@ -778,7 +778,8 @@ static int clk_mt6765_top_probe(struct platform_device *pdev)
-                                   clk_data);
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs),
-                                clk_data);
--      mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
-+      mtk_clk_register_muxes(&pdev->dev, top_muxes,
-+                             ARRAY_SIZE(top_muxes), node,
-                              &mt6765_clk_lock, clk_data);
-       mtk_clk_register_gates(&pdev->dev, node, top_clks,
-                              ARRAY_SIZE(top_clks), clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt6779.c b/drivers/clk/mediatek/clk-mt6779.c
-index a1c387d9731a7..248aaa50ced14 100644
---- a/drivers/clk/mediatek/clk-mt6779.c
-+++ b/drivers/clk/mediatek/clk-mt6779.c
-@@ -1244,8 +1244,9 @@ static int clk_mt6779_top_probe(struct platform_device *pdev)
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
--      mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes),
--                             node, &mt6779_clk_lock, clk_data);
-+      mtk_clk_register_muxes(&pdev->dev, top_muxes,
-+                             ARRAY_SIZE(top_muxes), node,
-+                             &mt6779_clk_lock, clk_data);
-       mtk_clk_register_composites(&pdev->dev, top_aud_muxes,
-                                   ARRAY_SIZE(top_aud_muxes), base,
-diff --git a/drivers/clk/mediatek/clk-mt6795-topckgen.c b/drivers/clk/mediatek/clk-mt6795-topckgen.c
-index 845cc87049303..2ab8bf5d6d6d9 100644
---- a/drivers/clk/mediatek/clk-mt6795-topckgen.c
-+++ b/drivers/clk/mediatek/clk-mt6795-topckgen.c
-@@ -552,7 +552,8 @@ static int clk_mt6795_topckgen_probe(struct platform_device *pdev)
-       if (ret)
-               goto unregister_fixed_clks;
--      ret = mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
-+      ret = mtk_clk_register_muxes(&pdev->dev, top_muxes,
-+                                   ARRAY_SIZE(top_muxes), node,
-                                    &mt6795_top_clk_lock, clk_data);
-       if (ret)
-               goto unregister_factors;
-diff --git a/drivers/clk/mediatek/clk-mt7986-infracfg.c b/drivers/clk/mediatek/clk-mt7986-infracfg.c
-index 578f150e0ee52..0a4bf87ee1607 100644
---- a/drivers/clk/mediatek/clk-mt7986-infracfg.c
-+++ b/drivers/clk/mediatek/clk-mt7986-infracfg.c
-@@ -178,7 +178,8 @@ static int clk_mt7986_infracfg_probe(struct platform_device *pdev)
-               return -ENOMEM;
-       mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data);
--      mtk_clk_register_muxes(infra_muxes, ARRAY_SIZE(infra_muxes), node,
-+      mtk_clk_register_muxes(&pdev->dev, infra_muxes,
-+                             ARRAY_SIZE(infra_muxes), node,
-                              &mt7986_clk_lock, clk_data);
-       mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-                              ARRAY_SIZE(infra_clks), clk_data);
-diff --git a/drivers/clk/mediatek/clk-mt7986-topckgen.c b/drivers/clk/mediatek/clk-mt7986-topckgen.c
-index de5121cf28774..c9bf47e6098fd 100644
---- a/drivers/clk/mediatek/clk-mt7986-topckgen.c
-+++ b/drivers/clk/mediatek/clk-mt7986-topckgen.c
-@@ -303,7 +303,8 @@ static int clk_mt7986_topckgen_probe(struct platform_device *pdev)
-       mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks),
-                                   clk_data);
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
--      mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
-+      mtk_clk_register_muxes(&pdev->dev, top_muxes,
-+                             ARRAY_SIZE(top_muxes), node,
-                              &mt7986_clk_lock, clk_data);
-       clk_prepare_enable(clk_data->hws[CLK_TOP_SYSAXI_SEL]->clk);
-diff --git a/drivers/clk/mediatek/clk-mt8183.c b/drivers/clk/mediatek/clk-mt8183.c
-index bf7b342332536..78620244144e8 100644
---- a/drivers/clk/mediatek/clk-mt8183.c
-+++ b/drivers/clk/mediatek/clk-mt8183.c
-@@ -1238,8 +1238,9 @@ static int clk_mt8183_top_probe(struct platform_device *pdev)
-       mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data);
--      mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes),
--              node, &mt8183_clk_lock, top_clk_data);
-+      mtk_clk_register_muxes(&pdev->dev, top_muxes,
-+                             ARRAY_SIZE(top_muxes), node,
-+                             &mt8183_clk_lock, top_clk_data);
-       mtk_clk_register_composites(&pdev->dev, top_aud_muxes,
-                                   ARRAY_SIZE(top_aud_muxes), base,
-diff --git a/drivers/clk/mediatek/clk-mt8186-topckgen.c b/drivers/clk/mediatek/clk-mt8186-topckgen.c
-index 4ac157320a6b9..70b6e008a188b 100644
---- a/drivers/clk/mediatek/clk-mt8186-topckgen.c
-+++ b/drivers/clk/mediatek/clk-mt8186-topckgen.c
-@@ -715,7 +715,8 @@ static int clk_mt8186_topck_probe(struct platform_device *pdev)
-       if (r)
-               goto unregister_fixed_clks;
--      r = mtk_clk_register_muxes(top_mtk_muxes, ARRAY_SIZE(top_mtk_muxes), node,
-+      r = mtk_clk_register_muxes(&pdev->dev, top_mtk_muxes,
-+                                 ARRAY_SIZE(top_mtk_muxes), node,
-                                  &mt8186_clk_lock, clk_data);
-       if (r)
-               goto unregister_factors;
-diff --git a/drivers/clk/mediatek/clk-mt8192.c b/drivers/clk/mediatek/clk-mt8192.c
-index ab856d0276184..16feb86dcb1b8 100644
---- a/drivers/clk/mediatek/clk-mt8192.c
-+++ b/drivers/clk/mediatek/clk-mt8192.c
-@@ -1112,7 +1112,8 @@ static int clk_mt8192_top_probe(struct platform_device *pdev)
-       if (r)
-               goto unregister_early_factors;
--      r = mtk_clk_register_muxes(top_mtk_muxes, ARRAY_SIZE(top_mtk_muxes), node,
-+      r = mtk_clk_register_muxes(&pdev->dev, top_mtk_muxes,
-+                                 ARRAY_SIZE(top_mtk_muxes), node,
-                                  &mt8192_clk_lock, top_clk_data);
-       if (r)
-               goto unregister_factors;
-diff --git a/drivers/clk/mediatek/clk-mt8195-topckgen.c b/drivers/clk/mediatek/clk-mt8195-topckgen.c
-index aae31ef3903de..3485ebb17ab83 100644
---- a/drivers/clk/mediatek/clk-mt8195-topckgen.c
-+++ b/drivers/clk/mediatek/clk-mt8195-topckgen.c
-@@ -1262,7 +1262,8 @@ static int clk_mt8195_topck_probe(struct platform_device *pdev)
-       if (r)
-               goto unregister_fixed_clks;
--      r = mtk_clk_register_muxes(top_mtk_muxes, ARRAY_SIZE(top_mtk_muxes), node,
-+      r = mtk_clk_register_muxes(&pdev->dev, top_mtk_muxes,
-+                                 ARRAY_SIZE(top_mtk_muxes), node,
-                                  &mt8195_clk_lock, top_clk_data);
-       if (r)
-               goto unregister_factors;
-diff --git a/drivers/clk/mediatek/clk-mt8365.c b/drivers/clk/mediatek/clk-mt8365.c
-index 0482a8aa43cc9..c9faa07ec0a64 100644
---- a/drivers/clk/mediatek/clk-mt8365.c
-+++ b/drivers/clk/mediatek/clk-mt8365.c
-@@ -947,7 +947,8 @@ static int clk_mt8365_top_probe(struct platform_device *pdev)
-       if (ret)
-               goto unregister_fixed_clks;
--      ret = mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
-+      ret = mtk_clk_register_muxes(&pdev->dev, top_muxes,
-+                                   ARRAY_SIZE(top_muxes), node,
-                                    &mt8365_clk_lock, clk_data);
-       if (ret)
-               goto unregister_factors;
-diff --git a/drivers/clk/mediatek/clk-mux.c b/drivers/clk/mediatek/clk-mux.c
-index ba1720b9e2310..c8593554239d6 100644
---- a/drivers/clk/mediatek/clk-mux.c
-+++ b/drivers/clk/mediatek/clk-mux.c
-@@ -154,9 +154,10 @@ const struct clk_ops mtk_mux_gate_clr_set_upd_ops  = {
- };
- EXPORT_SYMBOL_GPL(mtk_mux_gate_clr_set_upd_ops);
--static struct clk_hw *mtk_clk_register_mux(const struct mtk_mux *mux,
--                               struct regmap *regmap,
--                               spinlock_t *lock)
-+static struct clk_hw *mtk_clk_register_mux(struct device *dev,
-+                                         const struct mtk_mux *mux,
-+                                         struct regmap *regmap,
-+                                         spinlock_t *lock)
- {
-       struct mtk_clk_mux *clk_mux;
-       struct clk_init_data init = {};
-@@ -177,7 +178,7 @@ static struct clk_hw *mtk_clk_register_mux(const struct mtk_mux *mux,
-       clk_mux->lock = lock;
-       clk_mux->hw.init = &init;
--      ret = clk_hw_register(NULL, &clk_mux->hw);
-+      ret = clk_hw_register(dev, &clk_mux->hw);
-       if (ret) {
-               kfree(clk_mux);
-               return ERR_PTR(ret);
-@@ -198,7 +199,8 @@ static void mtk_clk_unregister_mux(struct clk_hw *hw)
-       kfree(mux);
- }
--int mtk_clk_register_muxes(const struct mtk_mux *muxes,
-+int mtk_clk_register_muxes(struct device *dev,
-+                         const struct mtk_mux *muxes,
-                          int num, struct device_node *node,
-                          spinlock_t *lock,
-                          struct clk_hw_onecell_data *clk_data)
-@@ -222,7 +224,7 @@ int mtk_clk_register_muxes(const struct mtk_mux *muxes,
-                       continue;
-               }
--              hw = mtk_clk_register_mux(mux, regmap, lock);
-+              hw = mtk_clk_register_mux(dev, mux, regmap, lock);
-               if (IS_ERR(hw)) {
-                       pr_err("Failed to register clk %s: %pe\n", mux->name,
-diff --git a/drivers/clk/mediatek/clk-mux.h b/drivers/clk/mediatek/clk-mux.h
-index 83ff420f4ebe6..7ecb963b0ec68 100644
---- a/drivers/clk/mediatek/clk-mux.h
-+++ b/drivers/clk/mediatek/clk-mux.h
-@@ -83,7 +83,8 @@ extern const struct clk_ops mtk_mux_gate_clr_set_upd_ops;
-                       0, _upd_ofs, _upd, CLK_SET_RATE_PARENT,         \
-                       mtk_mux_clr_set_upd_ops)
--int mtk_clk_register_muxes(const struct mtk_mux *muxes,
-+int mtk_clk_register_muxes(struct device *dev,
-+                         const struct mtk_mux *muxes,
-                          int num, struct device_node *node,
-                          spinlock_t *lock,
-                          struct clk_hw_onecell_data *clk_data);
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-mediatek-fix-of_iomap-memory-leak.patch b/queue-6.1/clk-mediatek-fix-of_iomap-memory-leak.patch
deleted file mode 100644 (file)
index ceb828b..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 20dc2f887e6793acb93a1af56ab3c7038d56b852 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sat, 22 Apr 2023 08:43:31 +0000
-Subject: clk: mediatek: fix of_iomap memory leak
-
-From: Bosi Zhang <u201911157@hust.edu.cn>
-
-[ Upstream commit 3db7285e044144fd88a356f5b641b9cd4b231a77 ]
-
-Smatch reports:
-drivers/clk/mediatek/clk-mtk.c:583 mtk_clk_simple_probe() warn:
-    'base' from of_iomap() not released on lines: 496.
-
-This problem was also found in linux-next. In mtk_clk_simple_probe(),
-base is not released when handling errors
-if clk_data is not existed, which may cause a leak.
-So free_base should be added here to release base.
-
-Fixes: c58cd0e40ffa ("clk: mediatek: Add mtk_clk_simple_probe() to simplify clock providers")
-Signed-off-by: Bosi Zhang <u201911157@hust.edu.cn>
-Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
-Link: https://lore.kernel.org/r/20230422084331.47198-1-u201911157@hust.edu.cn
-Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/mediatek/clk-mtk.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
-index bfabd94a474a5..bb89963e5e1fa 100644
---- a/drivers/clk/mediatek/clk-mtk.c
-+++ b/drivers/clk/mediatek/clk-mtk.c
-@@ -476,8 +476,10 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
-       num_clks += mcd->num_mux_clks;
-       clk_data = mtk_alloc_clk_data(num_clks);
--      if (!clk_data)
--              return -ENOMEM;
-+      if (!clk_data) {
-+              r = -ENOMEM;
-+              goto free_base;
-+      }
-       if (mcd->fixed_clks) {
-               r = mtk_clk_register_fixed_clks(mcd->fixed_clks,
-@@ -554,6 +556,7 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
-                                             mcd->num_fixed_clks, clk_data);
- free_data:
-       mtk_free_clk_data(clk_data);
-+free_base:
-       if (mcd->shared_io && base)
-               iounmap(base);
-       return r;
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-mediatek-mt8192-correctly-unregister-and-free-cl.patch b/queue-6.1/clk-mediatek-mt8192-correctly-unregister-and-free-cl.patch
deleted file mode 100644 (file)
index db63e4a..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-From 9c5b8c494328f83883334a908d43b8a072a9a9c3 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 20 Jan 2023 10:20:31 +0100
-Subject: clk: mediatek: mt8192: Correctly unregister and free clocks on
- failure
-
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
-[ Upstream commit 0cbe12694990501be92f997d987925132002dbe5 ]
-
-If anything fails during probe of the clock controller(s), unregister
-(and kfree!) whatever we have previously registered to leave with a
-clean state and prevent leaks.
-
-Fixes: 710573dee31b ("clk: mediatek: Add MT8192 basic clocks support")
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
-Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
-Tested-by: Miles Chen <miles.chen@mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-2-angelogioacchino.delregno@collabora.com
-Tested-by: Mingming Su <mingming.su@mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-Stable-dep-of: 3db7285e0441 ("clk: mediatek: fix of_iomap memory leak")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/mediatek/clk-mt8192.c | 77 ++++++++++++++++++++++++-------
- 1 file changed, 60 insertions(+), 17 deletions(-)
-
-diff --git a/drivers/clk/mediatek/clk-mt8192.c b/drivers/clk/mediatek/clk-mt8192.c
-index d0f2269310706..74bd8bac94a35 100644
---- a/drivers/clk/mediatek/clk-mt8192.c
-+++ b/drivers/clk/mediatek/clk-mt8192.c
-@@ -1100,27 +1100,64 @@ static int clk_mt8192_top_probe(struct platform_device *pdev)
-       if (IS_ERR(base))
-               return PTR_ERR(base);
--      mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks), top_clk_data);
--      mtk_clk_register_factors(top_early_divs, ARRAY_SIZE(top_early_divs), top_clk_data);
--      mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data);
--      mtk_clk_register_muxes(top_mtk_muxes, ARRAY_SIZE(top_mtk_muxes), node, &mt8192_clk_lock,
--                             top_clk_data);
--      mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base, &mt8192_clk_lock,
--                                  top_clk_data);
--      mtk_clk_register_composites(top_adj_divs, ARRAY_SIZE(top_adj_divs), base, &mt8192_clk_lock,
--                                  top_clk_data);
--      r = mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), top_clk_data);
-+      r = mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks), top_clk_data);
-       if (r)
-               return r;
-+      r = mtk_clk_register_factors(top_early_divs, ARRAY_SIZE(top_early_divs), top_clk_data);
-+      if (r)
-+              goto unregister_fixed_clks;
-+
-+      r = mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data);
-+      if (r)
-+              goto unregister_early_factors;
-+
-+      r = mtk_clk_register_muxes(top_mtk_muxes, ARRAY_SIZE(top_mtk_muxes), node,
-+                                 &mt8192_clk_lock, top_clk_data);
-+      if (r)
-+              goto unregister_factors;
-+
-+      r = mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
-+                                      &mt8192_clk_lock, top_clk_data);
-+      if (r)
-+              goto unregister_muxes;
-+
-+      r = mtk_clk_register_composites(top_adj_divs, ARRAY_SIZE(top_adj_divs), base,
-+                                      &mt8192_clk_lock, top_clk_data);
-+      if (r)
-+              goto unregister_top_composites;
-+
-+      r = mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), top_clk_data);
-+      if (r)
-+              goto unregister_adj_divs_composites;
-+
-       r = clk_mt8192_reg_mfg_mux_notifier(&pdev->dev,
-                                           top_clk_data->hws[CLK_TOP_MFG_PLL_SEL]->clk);
-       if (r)
--              return r;
--
-+              goto unregister_gates;
--      return of_clk_add_hw_provider(node, of_clk_hw_onecell_get,
-+      r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, top_clk_data);
-+      if (r)
-+              goto unregister_gates;
-+
-+      return 0;
-+
-+unregister_gates:
-+      mtk_clk_unregister_gates(top_clks, ARRAY_SIZE(top_clks), top_clk_data);
-+unregister_adj_divs_composites:
-+      mtk_clk_unregister_composites(top_adj_divs, ARRAY_SIZE(top_adj_divs), top_clk_data);
-+unregister_top_composites:
-+      mtk_clk_unregister_composites(top_muxes, ARRAY_SIZE(top_muxes), top_clk_data);
-+unregister_muxes:
-+      mtk_clk_unregister_muxes(top_mtk_muxes, ARRAY_SIZE(top_mtk_muxes), top_clk_data);
-+unregister_factors:
-+      mtk_clk_unregister_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data);
-+unregister_early_factors:
-+      mtk_clk_unregister_factors(top_early_divs, ARRAY_SIZE(top_early_divs), top_clk_data);
-+unregister_fixed_clks:
-+      mtk_clk_unregister_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks),
-                                     top_clk_data);
-+      return r;
- }
- static int clk_mt8192_infra_probe(struct platform_device *pdev)
-@@ -1139,14 +1176,16 @@ static int clk_mt8192_infra_probe(struct platform_device *pdev)
-       r = mtk_register_reset_controller_with_dev(&pdev->dev, &clk_rst_desc);
-       if (r)
--              goto free_clk_data;
-+              goto unregister_gates;
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
--              goto free_clk_data;
-+              goto unregister_gates;
-       return r;
-+unregister_gates:
-+      mtk_clk_unregister_gates(infra_clks, ARRAY_SIZE(infra_clks), clk_data);
- free_clk_data:
-       mtk_free_clk_data(clk_data);
-       return r;
-@@ -1168,10 +1207,12 @@ static int clk_mt8192_peri_probe(struct platform_device *pdev)
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
--              goto free_clk_data;
-+              goto unregister_gates;
-       return r;
-+unregister_gates:
-+      mtk_clk_unregister_gates(peri_clks, ARRAY_SIZE(peri_clks), clk_data);
- free_clk_data:
-       mtk_free_clk_data(clk_data);
-       return r;
-@@ -1194,10 +1235,12 @@ static int clk_mt8192_apmixed_probe(struct platform_device *pdev)
-       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-       if (r)
--              goto free_clk_data;
-+              goto unregister_gates;
-       return r;
-+unregister_gates:
-+      mtk_clk_unregister_gates(apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data);
- free_clk_data:
-       mtk_free_clk_data(clk_data);
-       return r;
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-mediatek-mt8192-propagate-struct-device-for-gate.patch b/queue-6.1/clk-mediatek-mt8192-propagate-struct-device-for-gate.patch
deleted file mode 100644 (file)
index d2be99f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-From 2d3bb8ca091ed11a86744720d6daa56d9d206f07 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 20 Jan 2023 10:20:32 +0100
-Subject: clk: mediatek: mt8192: Propagate struct device for gate clocks
-
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
-[ Upstream commit fdc325c8f79cb4155009db8394db19793c4d07cd ]
-
-Convert instances of mtk_clk_register_gates() to use the newer
-mtk_clk_register_gates_with_dev() to propagate struct device to
-the clk framework.
-
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
-Tested-by: Miles Chen <miles.chen@mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-3-angelogioacchino.delregno@collabora.com
-Tested-by: Mingming Su <mingming.su@mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-Stable-dep-of: 3db7285e0441 ("clk: mediatek: fix of_iomap memory leak")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/mediatek/clk-mt8192.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/clk/mediatek/clk-mt8192.c b/drivers/clk/mediatek/clk-mt8192.c
-index 74bd8bac94a35..508af9bbcc46c 100644
---- a/drivers/clk/mediatek/clk-mt8192.c
-+++ b/drivers/clk/mediatek/clk-mt8192.c
-@@ -1127,7 +1127,8 @@ static int clk_mt8192_top_probe(struct platform_device *pdev)
-       if (r)
-               goto unregister_top_composites;
--      r = mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), top_clk_data);
-+      r = mtk_clk_register_gates_with_dev(node, top_clks, ARRAY_SIZE(top_clks),
-+                                          top_clk_data, &pdev->dev);
-       if (r)
-               goto unregister_adj_divs_composites;
-@@ -1170,7 +1171,8 @@ static int clk_mt8192_infra_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), clk_data);
-+      r = mtk_clk_register_gates_with_dev(node, infra_clks, ARRAY_SIZE(infra_clks),
-+                                          clk_data, &pdev->dev);
-       if (r)
-               goto free_clk_data;
-@@ -1201,7 +1203,8 @@ static int clk_mt8192_peri_probe(struct platform_device *pdev)
-       if (!clk_data)
-               return -ENOMEM;
--      r = mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks), clk_data);
-+      r = mtk_clk_register_gates_with_dev(node, peri_clks, ARRAY_SIZE(peri_clks),
-+                                          clk_data, &pdev->dev);
-       if (r)
-               goto free_clk_data;
-@@ -1229,7 +1232,9 @@ static int clk_mt8192_apmixed_probe(struct platform_device *pdev)
-               return -ENOMEM;
-       mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);
--      r = mtk_clk_register_gates(node, apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data);
-+      r = mtk_clk_register_gates_with_dev(node, apmixed_clks,
-+                                          ARRAY_SIZE(apmixed_clks), clk_data,
-+                                          &pdev->dev);
-       if (r)
-               goto free_clk_data;
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-qcom-mmcc-msm8974-move-clock-parent-tables-down.patch b/queue-6.1/clk-qcom-mmcc-msm8974-move-clock-parent-tables-down.patch
deleted file mode 100644 (file)
index 920602e..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-From acdbb1acc7382b5c65a72241ea2a90dcfedd1480 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 4 Dec 2022 14:45:04 +0200
-Subject: clk: qcom: mmcc-msm8974: move clock parent tables down
-
-From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-
-[ Upstream commit 28c6c02527757a4b3c63b30d77f7e7d5c112c085 ]
-
-Move clock parent tables down, after the PLL declarataions, so that we
-can use pll hw clock fields in the next commit.
-
-Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
-Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
-Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-Signed-off-by: Bjorn Andersson <andersson@kernel.org>
-Link: https://lore.kernel.org/r/20221204124508.1415713-8-dmitry.baryshkov@linaro.org
-Stable-dep-of: 853c064b5749 ("clk: qcom: mmcc-msm8974: remove oxili_ocmemgx_clk")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/qcom/mmcc-msm8974.c | 170 ++++++++++++++++----------------
- 1 file changed, 85 insertions(+), 85 deletions(-)
-
-diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
-index 9008df2305df5..57f1a351c8f67 100644
---- a/drivers/clk/qcom/mmcc-msm8974.c
-+++ b/drivers/clk/qcom/mmcc-msm8974.c
-@@ -42,6 +42,91 @@ enum {
-       P_DSI1PLL_BYTE,
- };
-+static struct clk_pll mmpll0 = {
-+      .l_reg = 0x0004,
-+      .m_reg = 0x0008,
-+      .n_reg = 0x000c,
-+      .config_reg = 0x0014,
-+      .mode_reg = 0x0000,
-+      .status_reg = 0x001c,
-+      .status_bit = 17,
-+        .clkr.hw.init = &(struct clk_init_data){
-+                .name = "mmpll0",
-+                .parent_names = (const char *[]){ "xo" },
-+                .num_parents = 1,
-+                .ops = &clk_pll_ops,
-+        },
-+};
-+
-+static struct clk_regmap mmpll0_vote = {
-+      .enable_reg = 0x0100,
-+      .enable_mask = BIT(0),
-+      .hw.init = &(struct clk_init_data){
-+              .name = "mmpll0_vote",
-+              .parent_names = (const char *[]){ "mmpll0" },
-+              .num_parents = 1,
-+              .ops = &clk_pll_vote_ops,
-+      },
-+};
-+
-+static struct clk_pll mmpll1 = {
-+      .l_reg = 0x0044,
-+      .m_reg = 0x0048,
-+      .n_reg = 0x004c,
-+      .config_reg = 0x0050,
-+      .mode_reg = 0x0040,
-+      .status_reg = 0x005c,
-+      .status_bit = 17,
-+        .clkr.hw.init = &(struct clk_init_data){
-+                .name = "mmpll1",
-+                .parent_names = (const char *[]){ "xo" },
-+                .num_parents = 1,
-+                .ops = &clk_pll_ops,
-+        },
-+};
-+
-+static struct clk_regmap mmpll1_vote = {
-+      .enable_reg = 0x0100,
-+      .enable_mask = BIT(1),
-+      .hw.init = &(struct clk_init_data){
-+              .name = "mmpll1_vote",
-+              .parent_names = (const char *[]){ "mmpll1" },
-+              .num_parents = 1,
-+              .ops = &clk_pll_vote_ops,
-+      },
-+};
-+
-+static struct clk_pll mmpll2 = {
-+      .l_reg = 0x4104,
-+      .m_reg = 0x4108,
-+      .n_reg = 0x410c,
-+      .config_reg = 0x4110,
-+      .mode_reg = 0x4100,
-+      .status_reg = 0x411c,
-+        .clkr.hw.init = &(struct clk_init_data){
-+                .name = "mmpll2",
-+                .parent_names = (const char *[]){ "xo" },
-+                .num_parents = 1,
-+                .ops = &clk_pll_ops,
-+        },
-+};
-+
-+static struct clk_pll mmpll3 = {
-+      .l_reg = 0x0084,
-+      .m_reg = 0x0088,
-+      .n_reg = 0x008c,
-+      .config_reg = 0x0090,
-+      .mode_reg = 0x0080,
-+      .status_reg = 0x009c,
-+      .status_bit = 17,
-+        .clkr.hw.init = &(struct clk_init_data){
-+                .name = "mmpll3",
-+                .parent_names = (const char *[]){ "xo" },
-+                .num_parents = 1,
-+                .ops = &clk_pll_ops,
-+        },
-+};
-+
- static const struct parent_map mmcc_xo_mmpll0_mmpll1_gpll0_map[] = {
-       { P_XO, 0 },
-       { P_MMPLL0, 1 },
-@@ -160,91 +245,6 @@ static const char * const mmcc_xo_dsibyte_hdmi_edp_gpll0[] = {
-       "dsi1pllbyte",
- };
--static struct clk_pll mmpll0 = {
--      .l_reg = 0x0004,
--      .m_reg = 0x0008,
--      .n_reg = 0x000c,
--      .config_reg = 0x0014,
--      .mode_reg = 0x0000,
--      .status_reg = 0x001c,
--      .status_bit = 17,
--        .clkr.hw.init = &(struct clk_init_data){
--                .name = "mmpll0",
--                .parent_names = (const char *[]){ "xo" },
--                .num_parents = 1,
--                .ops = &clk_pll_ops,
--        },
--};
--
--static struct clk_regmap mmpll0_vote = {
--      .enable_reg = 0x0100,
--      .enable_mask = BIT(0),
--      .hw.init = &(struct clk_init_data){
--              .name = "mmpll0_vote",
--              .parent_names = (const char *[]){ "mmpll0" },
--              .num_parents = 1,
--              .ops = &clk_pll_vote_ops,
--      },
--};
--
--static struct clk_pll mmpll1 = {
--      .l_reg = 0x0044,
--      .m_reg = 0x0048,
--      .n_reg = 0x004c,
--      .config_reg = 0x0050,
--      .mode_reg = 0x0040,
--      .status_reg = 0x005c,
--      .status_bit = 17,
--        .clkr.hw.init = &(struct clk_init_data){
--                .name = "mmpll1",
--                .parent_names = (const char *[]){ "xo" },
--                .num_parents = 1,
--                .ops = &clk_pll_ops,
--        },
--};
--
--static struct clk_regmap mmpll1_vote = {
--      .enable_reg = 0x0100,
--      .enable_mask = BIT(1),
--      .hw.init = &(struct clk_init_data){
--              .name = "mmpll1_vote",
--              .parent_names = (const char *[]){ "mmpll1" },
--              .num_parents = 1,
--              .ops = &clk_pll_vote_ops,
--      },
--};
--
--static struct clk_pll mmpll2 = {
--      .l_reg = 0x4104,
--      .m_reg = 0x4108,
--      .n_reg = 0x410c,
--      .config_reg = 0x4110,
--      .mode_reg = 0x4100,
--      .status_reg = 0x411c,
--        .clkr.hw.init = &(struct clk_init_data){
--                .name = "mmpll2",
--                .parent_names = (const char *[]){ "xo" },
--                .num_parents = 1,
--                .ops = &clk_pll_ops,
--        },
--};
--
--static struct clk_pll mmpll3 = {
--      .l_reg = 0x0084,
--      .m_reg = 0x0088,
--      .n_reg = 0x008c,
--      .config_reg = 0x0090,
--      .mode_reg = 0x0080,
--      .status_reg = 0x009c,
--      .status_bit = 17,
--        .clkr.hw.init = &(struct clk_init_data){
--                .name = "mmpll3",
--                .parent_names = (const char *[]){ "xo" },
--                .num_parents = 1,
--                .ops = &clk_pll_ops,
--        },
--};
--
- static struct clk_rcg2 mmss_ahb_clk_src = {
-       .cmd_rcgr = 0x5000,
-       .hid_width = 5,
--- 
-2.39.2
-
index 18d45e190e9a4803d80d5f66c7b15801cb804de1..d9ad6057b94a42c56c1ae807384c3861b488f41c 100644 (file)
@@ -21,14 +21,12 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
 Link: https://lore.kernel.org/r/20230508153319.2371645-1-dmitry.baryshkov@linaro.org
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/clk/qcom/mmcc-msm8974.c | 19 -------------------
+ drivers/clk/qcom/mmcc-msm8974.c |   19 -------------------
  1 file changed, 19 deletions(-)
 
-diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
-index 4273fce9a4a4c..b90a9f362f5f7 100644
 --- a/drivers/clk/qcom/mmcc-msm8974.c
 +++ b/drivers/clk/qcom/mmcc-msm8974.c
-@@ -2204,23 +2204,6 @@ static struct clk_branch ocmemcx_ocmemnoc_clk = {
+@@ -2192,23 +2192,6 @@ static struct clk_branch ocmemcx_ocmemno
        },
  };
  
@@ -39,8 +37,8 @@ index 4273fce9a4a4c..b90a9f362f5f7 100644
 -              .enable_mask = BIT(0),
 -              .hw.init = &(struct clk_init_data){
 -                      .name = "oxili_ocmemgx_clk",
--                      .parent_data = (const struct clk_parent_data[]){
--                              { .fw_name = "gfx3d_clk_src", .name = "gfx3d_clk_src" },
+-                      .parent_names = (const char *[]){
+-                              "gfx3d_clk_src",
 -                      },
 -                      .num_parents = 1,
 -                      .flags = CLK_SET_RATE_PARENT,
@@ -52,7 +50,7 @@ index 4273fce9a4a4c..b90a9f362f5f7 100644
  static struct clk_branch ocmemnoc_clk = {
        .halt_reg = 0x50b4,
        .clkr = {
-@@ -2512,7 +2495,6 @@ static struct clk_regmap *mmcc_msm8226_clocks[] = {
+@@ -2500,7 +2483,6 @@ static struct clk_regmap *mmcc_msm8226_c
        [MMSS_MMSSNOC_AXI_CLK] = &mmss_mmssnoc_axi_clk.clkr,
        [MMSS_S0_AXI_CLK] = &mmss_s0_axi_clk.clkr,
        [OCMEMCX_AHB_CLK] = &ocmemcx_ahb_clk.clkr,
@@ -60,7 +58,7 @@ index 4273fce9a4a4c..b90a9f362f5f7 100644
        [OXILI_GFX3D_CLK] = &oxili_gfx3d_clk.clkr,
        [OXILICX_AHB_CLK] = &oxilicx_ahb_clk.clkr,
        [OXILICX_AXI_CLK] = &oxilicx_axi_clk.clkr,
-@@ -2670,7 +2652,6 @@ static struct clk_regmap *mmcc_msm8974_clocks[] = {
+@@ -2658,7 +2640,6 @@ static struct clk_regmap *mmcc_msm8974_c
        [MMSS_S0_AXI_CLK] = &mmss_s0_axi_clk.clkr,
        [OCMEMCX_AHB_CLK] = &ocmemcx_ahb_clk.clkr,
        [OCMEMCX_OCMEMNOC_CLK] = &ocmemcx_ocmemnoc_clk.clkr,
@@ -68,6 +66,3 @@ index 4273fce9a4a4c..b90a9f362f5f7 100644
        [OCMEMNOC_CLK] = &ocmemnoc_clk.clkr,
        [OXILI_GFX3D_CLK] = &oxili_gfx3d_clk.clkr,
        [OXILICX_AHB_CLK] = &oxilicx_ahb_clk.clkr,
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-qcom-mmcc-msm8974-use-array_size-instead-of-spec.patch b/queue-6.1/clk-qcom-mmcc-msm8974-use-array_size-instead-of-spec.patch
deleted file mode 100644 (file)
index 521d3de..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-From 5c16010e3212a0536cae7c625df9e7dd51b959ab Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 4 Dec 2022 14:45:03 +0200
-Subject: clk: qcom: mmcc-msm8974: use ARRAY_SIZE instead of specifying
- num_parents
-
-From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-
-[ Upstream commit 4e74e921ea0c576682ffd7981af1d4a73ceaca11 ]
-
-Use ARRAY_SIZE() instead of manually specifying num_parents. This makes
-adding/removing entries to/from parent_data easy and errorproof.
-
-Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
-Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
-Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-Signed-off-by: Bjorn Andersson <andersson@kernel.org>
-Link: https://lore.kernel.org/r/20221204124508.1415713-7-dmitry.baryshkov@linaro.org
-Stable-dep-of: 853c064b5749 ("clk: qcom: mmcc-msm8974: remove oxili_ocmemgx_clk")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/qcom/mmcc-msm8974.c | 74 ++++++++++++++++-----------------
- 1 file changed, 37 insertions(+), 37 deletions(-)
-
-diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
-index f74662925a582..9008df2305df5 100644
---- a/drivers/clk/qcom/mmcc-msm8974.c
-+++ b/drivers/clk/qcom/mmcc-msm8974.c
-@@ -252,7 +252,7 @@ static struct clk_rcg2 mmss_ahb_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mmss_ahb_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -289,7 +289,7 @@ static struct clk_rcg2 mmss_axi_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mmss_axi_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -313,7 +313,7 @@ static struct clk_rcg2 ocmemnoc_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "ocmemnoc_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -332,7 +332,7 @@ static struct clk_rcg2 csi0_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi0_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -345,7 +345,7 @@ static struct clk_rcg2 csi1_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi1_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -358,7 +358,7 @@ static struct clk_rcg2 csi2_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi2_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -371,7 +371,7 @@ static struct clk_rcg2 csi3_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi3_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -418,7 +418,7 @@ static struct clk_rcg2 vfe0_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "vfe0_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -431,7 +431,7 @@ static struct clk_rcg2 vfe1_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "vfe1_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -472,7 +472,7 @@ static struct clk_rcg2 mdp_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mdp_clk_src",
-               .parent_names = mmcc_xo_mmpll0_dsi_hdmi_gpll0,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_dsi_hdmi_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -495,7 +495,7 @@ static struct clk_rcg2 jpeg0_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "jpeg0_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -508,7 +508,7 @@ static struct clk_rcg2 jpeg1_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "jpeg1_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -521,7 +521,7 @@ static struct clk_rcg2 jpeg2_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "jpeg2_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -534,7 +534,7 @@ static struct clk_rcg2 pclk0_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "pclk0_clk_src",
-               .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp_gpll0),
-               .ops = &clk_pixel_ops,
-               .flags = CLK_SET_RATE_PARENT,
-       },
-@@ -548,7 +548,7 @@ static struct clk_rcg2 pclk1_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "pclk1_clk_src",
-               .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp_gpll0),
-               .ops = &clk_pixel_ops,
-               .flags = CLK_SET_RATE_PARENT,
-       },
-@@ -581,7 +581,7 @@ static struct clk_rcg2 vcodec0_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "vcodec0_clk_src",
-               .parent_names = mmcc_xo_mmpll0_1_3_gpll0,
--              .num_parents = 5,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_1_3_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -599,7 +599,7 @@ static struct clk_rcg2 cci_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "cci_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -623,7 +623,7 @@ static struct clk_rcg2 camss_gp0_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "camss_gp0_clk_src",
-               .parent_names = mmcc_xo_mmpll0_1_gpll1_0,
--              .num_parents = 5,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_1_gpll1_0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -637,7 +637,7 @@ static struct clk_rcg2 camss_gp1_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "camss_gp1_clk_src",
-               .parent_names = mmcc_xo_mmpll0_1_gpll1_0,
--              .num_parents = 5,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_1_gpll1_0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -672,7 +672,7 @@ static struct clk_rcg2 mclk0_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mclk0_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -685,7 +685,7 @@ static struct clk_rcg2 mclk1_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mclk1_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -698,7 +698,7 @@ static struct clk_rcg2 mclk2_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mclk2_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -711,7 +711,7 @@ static struct clk_rcg2 mclk3_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mclk3_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -730,7 +730,7 @@ static struct clk_rcg2 csi0phytimer_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi0phytimer_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -743,7 +743,7 @@ static struct clk_rcg2 csi1phytimer_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi1phytimer_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -756,7 +756,7 @@ static struct clk_rcg2 csi2phytimer_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi2phytimer_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -787,7 +787,7 @@ static struct clk_rcg2 cpp_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "cpp_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -805,7 +805,7 @@ static struct clk_rcg2 byte0_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "byte0_clk_src",
-               .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_dsibyte_hdmi_edp_gpll0),
-               .ops = &clk_byte2_ops,
-               .flags = CLK_SET_RATE_PARENT,
-       },
-@@ -819,7 +819,7 @@ static struct clk_rcg2 byte1_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "byte1_clk_src",
-               .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_dsibyte_hdmi_edp_gpll0),
-               .ops = &clk_byte2_ops,
-               .flags = CLK_SET_RATE_PARENT,
-       },
-@@ -838,7 +838,7 @@ static struct clk_rcg2 edpaux_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "edpaux_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -857,7 +857,7 @@ static struct clk_rcg2 edplink_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "edplink_clk_src",
-               .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp_gpll0),
-               .ops = &clk_rcg2_ops,
-               .flags = CLK_SET_RATE_PARENT,
-       },
-@@ -877,7 +877,7 @@ static struct clk_rcg2 edppixel_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "edppixel_clk_src",
-               .parent_names = mmcc_xo_dsi_hdmi_edp,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp),
-               .ops = &clk_edp_pixel_ops,
-       },
- };
-@@ -895,7 +895,7 @@ static struct clk_rcg2 esc0_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "esc0_clk_src",
-               .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_dsibyte_hdmi_edp_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -908,7 +908,7 @@ static struct clk_rcg2 esc1_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "esc1_clk_src",
-               .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_dsibyte_hdmi_edp_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -926,7 +926,7 @@ static struct clk_rcg2 extpclk_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "extpclk_clk_src",
-               .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
--              .num_parents = 6,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp_gpll0),
-               .ops = &clk_byte_ops,
-               .flags = CLK_SET_RATE_PARENT,
-       },
-@@ -945,7 +945,7 @@ static struct clk_rcg2 hdmi_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "hdmi_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
-@@ -963,7 +963,7 @@ static struct clk_rcg2 vsync_clk_src = {
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "vsync_clk_src",
-               .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
--              .num_parents = 4,
-+              .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
- };
--- 
-2.39.2
-
diff --git a/queue-6.1/clk-qcom-mmcc-msm8974-use-parent_hws-_data-instead-o.patch b/queue-6.1/clk-qcom-mmcc-msm8974-use-parent_hws-_data-instead-o.patch
deleted file mode 100644 (file)
index 0d1ce66..0000000
+++ /dev/null
@@ -1,1476 +0,0 @@
-From b406fa7418a18c782f5d928908d8dd593cd191be Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 4 Dec 2022 14:45:05 +0200
-Subject: clk: qcom: mmcc-msm8974: use parent_hws/_data instead of parent_names
-
-From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-
-[ Upstream commit a174d29a59ec9462d3e72fd00a9fd05054c4ab20 ]
-
-Convert the clock driver to specify parent data rather than parent
-names, to actually bind using 'clock-names' specified in the DTS rather
-than global clock names. Use parent_hws where possible to refer parent
-clocks directly, skipping the lookup.
-
-Note, the system names for xo clocks were changed from "xo" to
-"xo_board" to follow the example of other platforms. This switches the
-clocks to use DT-provided "xo_board" clock instead of manually
-registered "xo" clock and allows us to drop qcom_cc_register_board_clk()
-call from the driver at some point.
-
-Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-Signed-off-by: Bjorn Andersson <andersson@kernel.org>
-Link: https://lore.kernel.org/r/20221204124508.1415713-9-dmitry.baryshkov@linaro.org
-Stable-dep-of: 853c064b5749 ("clk: qcom: mmcc-msm8974: remove oxili_ocmemgx_clk")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/qcom/mmcc-msm8974.c | 516 ++++++++++++++++----------------
- 1 file changed, 264 insertions(+), 252 deletions(-)
-
-diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
-index 57f1a351c8f67..4273fce9a4a4c 100644
---- a/drivers/clk/qcom/mmcc-msm8974.c
-+++ b/drivers/clk/qcom/mmcc-msm8974.c
-@@ -52,7 +52,9 @@ static struct clk_pll mmpll0 = {
-       .status_bit = 17,
-         .clkr.hw.init = &(struct clk_init_data){
-                 .name = "mmpll0",
--                .parent_names = (const char *[]){ "xo" },
-+                .parent_data = (const struct clk_parent_data[]){
-+                      { .fw_name = "xo", .name = "xo_board" },
-+              },
-                 .num_parents = 1,
-                 .ops = &clk_pll_ops,
-         },
-@@ -63,7 +65,9 @@ static struct clk_regmap mmpll0_vote = {
-       .enable_mask = BIT(0),
-       .hw.init = &(struct clk_init_data){
-               .name = "mmpll0_vote",
--              .parent_names = (const char *[]){ "mmpll0" },
-+              .parent_hws = (const struct clk_hw*[]){
-+                      &mmpll0.clkr.hw
-+              },
-               .num_parents = 1,
-               .ops = &clk_pll_vote_ops,
-       },
-@@ -79,7 +83,9 @@ static struct clk_pll mmpll1 = {
-       .status_bit = 17,
-         .clkr.hw.init = &(struct clk_init_data){
-                 .name = "mmpll1",
--                .parent_names = (const char *[]){ "xo" },
-+                .parent_data = (const struct clk_parent_data[]){
-+                      { .fw_name = "xo", .name = "xo_board" },
-+              },
-                 .num_parents = 1,
-                 .ops = &clk_pll_ops,
-         },
-@@ -90,7 +96,9 @@ static struct clk_regmap mmpll1_vote = {
-       .enable_mask = BIT(1),
-       .hw.init = &(struct clk_init_data){
-               .name = "mmpll1_vote",
--              .parent_names = (const char *[]){ "mmpll1" },
-+              .parent_hws = (const struct clk_hw*[]){
-+                      &mmpll1.clkr.hw
-+              },
-               .num_parents = 1,
-               .ops = &clk_pll_vote_ops,
-       },
-@@ -105,7 +113,9 @@ static struct clk_pll mmpll2 = {
-       .status_reg = 0x411c,
-         .clkr.hw.init = &(struct clk_init_data){
-                 .name = "mmpll2",
--                .parent_names = (const char *[]){ "xo" },
-+                .parent_data = (const struct clk_parent_data[]){
-+                      { .fw_name = "xo", .name = "xo_board" },
-+              },
-                 .num_parents = 1,
-                 .ops = &clk_pll_ops,
-         },
-@@ -121,7 +131,9 @@ static struct clk_pll mmpll3 = {
-       .status_bit = 17,
-         .clkr.hw.init = &(struct clk_init_data){
-                 .name = "mmpll3",
--                .parent_names = (const char *[]){ "xo" },
-+                .parent_data = (const struct clk_parent_data[]){
-+                      { .fw_name = "xo", .name = "xo_board" },
-+              },
-                 .num_parents = 1,
-                 .ops = &clk_pll_ops,
-         },
-@@ -134,11 +146,11 @@ static const struct parent_map mmcc_xo_mmpll0_mmpll1_gpll0_map[] = {
-       { P_GPLL0, 5 }
- };
--static const char * const mmcc_xo_mmpll0_mmpll1_gpll0[] = {
--      "xo",
--      "mmpll0_vote",
--      "mmpll1_vote",
--      "mmss_gpll0_vote",
-+static const struct clk_parent_data mmcc_xo_mmpll0_mmpll1_gpll0[] = {
-+      { .fw_name = "xo", .name = "xo_board" },
-+      { .hw = &mmpll0_vote.hw },
-+      { .hw = &mmpll1_vote.hw },
-+      { .fw_name = "mmss_gpll0_vote", .name = "mmss_gpll0_vote" },
- };
- static const struct parent_map mmcc_xo_mmpll0_dsi_hdmi_gpll0_map[] = {
-@@ -150,13 +162,13 @@ static const struct parent_map mmcc_xo_mmpll0_dsi_hdmi_gpll0_map[] = {
-       { P_DSI1PLL, 3 }
- };
--static const char * const mmcc_xo_mmpll0_dsi_hdmi_gpll0[] = {
--      "xo",
--      "mmpll0_vote",
--      "hdmipll",
--      "mmss_gpll0_vote",
--      "dsi0pll",
--      "dsi1pll",
-+static const struct clk_parent_data mmcc_xo_mmpll0_dsi_hdmi_gpll0[] = {
-+      { .fw_name = "xo", .name = "xo_board" },
-+      { .hw = &mmpll0_vote.hw },
-+      { .fw_name = "hdmipll", .name = "hdmipll" },
-+      { .fw_name = "mmss_gpll0_vote", .name = "mmss_gpll0_vote" },
-+      { .fw_name = "dsi0pll", .name = "dsi0pll" },
-+      { .fw_name = "dsi1pll", .name = "dsi1pll" },
- };
- static const struct parent_map mmcc_xo_mmpll0_1_3_gpll0_map[] = {
-@@ -167,12 +179,12 @@ static const struct parent_map mmcc_xo_mmpll0_1_3_gpll0_map[] = {
-       { P_MMPLL3, 3 }
- };
--static const char * const mmcc_xo_mmpll0_1_3_gpll0[] = {
--      "xo",
--      "mmpll0_vote",
--      "mmpll1_vote",
--      "mmss_gpll0_vote",
--      "mmpll3",
-+static const struct clk_parent_data mmcc_xo_mmpll0_1_3_gpll0[] = {
-+      { .fw_name = "xo", .name = "xo_board" },
-+      { .hw = &mmpll0_vote.hw },
-+      { .hw = &mmpll1_vote.hw },
-+      { .fw_name = "mmss_gpll0_vote", .name = "mmss_gpll0_vote" },
-+      { .hw = &mmpll3.clkr.hw },
- };
- static const struct parent_map mmcc_xo_mmpll0_1_gpll1_0_map[] = {
-@@ -183,12 +195,12 @@ static const struct parent_map mmcc_xo_mmpll0_1_gpll1_0_map[] = {
-       { P_GPLL1, 4 }
- };
--static const char * const mmcc_xo_mmpll0_1_gpll1_0[] = {
--      "xo",
--      "mmpll0_vote",
--      "mmpll1_vote",
--      "mmss_gpll0_vote",
--      "gpll1_vote",
-+static const struct clk_parent_data mmcc_xo_mmpll0_1_gpll1_0[] = {
-+      { .fw_name = "xo", .name = "xo_board" },
-+      { .hw = &mmpll0_vote.hw },
-+      { .hw = &mmpll1_vote.hw },
-+      { .fw_name = "mmss_gpll0_vote", .name = "mmss_gpll0_vote" },
-+      { .fw_name = "gpll1_vote", .name = "gpll1_vote" },
- };
- static const struct parent_map mmcc_xo_dsi_hdmi_edp_map[] = {
-@@ -200,13 +212,13 @@ static const struct parent_map mmcc_xo_dsi_hdmi_edp_map[] = {
-       { P_DSI1PLL, 2 }
- };
--static const char * const mmcc_xo_dsi_hdmi_edp[] = {
--      "xo",
--      "edp_link_clk",
--      "hdmipll",
--      "edp_vco_div",
--      "dsi0pll",
--      "dsi1pll",
-+static const struct clk_parent_data mmcc_xo_dsi_hdmi_edp[] = {
-+      { .fw_name = "xo", .name = "xo_board" },
-+      { .fw_name = "edp_link_clk", .name = "edp_link_clk" },
-+      { .fw_name = "hdmipll", .name = "hdmipll" },
-+      { .fw_name = "edp_vco_div", .name = "edp_vco_div" },
-+      { .fw_name = "dsi0pll", .name = "dsi0pll" },
-+      { .fw_name = "dsi1pll", .name = "dsi1pll" },
- };
- static const struct parent_map mmcc_xo_dsi_hdmi_edp_gpll0_map[] = {
-@@ -218,13 +230,13 @@ static const struct parent_map mmcc_xo_dsi_hdmi_edp_gpll0_map[] = {
-       { P_DSI1PLL, 2 }
- };
--static const char * const mmcc_xo_dsi_hdmi_edp_gpll0[] = {
--      "xo",
--      "edp_link_clk",
--      "hdmipll",
--      "gpll0_vote",
--      "dsi0pll",
--      "dsi1pll",
-+static const struct clk_parent_data mmcc_xo_dsi_hdmi_edp_gpll0[] = {
-+      { .fw_name = "xo", .name = "xo_board" },
-+      { .fw_name = "edp_link_clk", .name = "edp_link_clk" },
-+      { .fw_name = "hdmipll", .name = "hdmipll" },
-+      { .fw_name = "gpll0_vote", .name = "gpll0_vote" },
-+      { .fw_name = "dsi0pll", .name = "dsi0pll" },
-+      { .fw_name = "dsi1pll", .name = "dsi1pll" },
- };
- static const struct parent_map mmcc_xo_dsibyte_hdmi_edp_gpll0_map[] = {
-@@ -236,13 +248,13 @@ static const struct parent_map mmcc_xo_dsibyte_hdmi_edp_gpll0_map[] = {
-       { P_DSI1PLL_BYTE, 2 }
- };
--static const char * const mmcc_xo_dsibyte_hdmi_edp_gpll0[] = {
--      "xo",
--      "edp_link_clk",
--      "hdmipll",
--      "gpll0_vote",
--      "dsi0pllbyte",
--      "dsi1pllbyte",
-+static const struct clk_parent_data mmcc_xo_dsibyte_hdmi_edp_gpll0[] = {
-+      { .fw_name = "xo", .name = "xo_board" },
-+      { .fw_name = "edp_link_clk", .name = "edp_link_clk" },
-+      { .fw_name = "hdmipll", .name = "hdmipll" },
-+      { .fw_name = "gpll0_vote", .name = "gpll0_vote" },
-+      { .fw_name = "dsi0pllbyte", .name = "dsi0pllbyte" },
-+      { .fw_name = "dsi1pllbyte", .name = "dsi1pllbyte" },
- };
- static struct clk_rcg2 mmss_ahb_clk_src = {
-@@ -251,7 +263,7 @@ static struct clk_rcg2 mmss_ahb_clk_src = {
-       .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mmss_ahb_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -288,7 +300,7 @@ static struct clk_rcg2 mmss_axi_clk_src = {
-       .freq_tbl = ftbl_mmss_axi_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mmss_axi_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -312,7 +324,7 @@ static struct clk_rcg2 ocmemnoc_clk_src = {
-       .freq_tbl = ftbl_ocmemnoc_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "ocmemnoc_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -331,7 +343,7 @@ static struct clk_rcg2 csi0_clk_src = {
-       .freq_tbl = ftbl_camss_csi0_3_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi0_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -344,7 +356,7 @@ static struct clk_rcg2 csi1_clk_src = {
-       .freq_tbl = ftbl_camss_csi0_3_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi1_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -357,7 +369,7 @@ static struct clk_rcg2 csi2_clk_src = {
-       .freq_tbl = ftbl_camss_csi0_3_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi2_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -370,7 +382,7 @@ static struct clk_rcg2 csi3_clk_src = {
-       .freq_tbl = ftbl_camss_csi0_3_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi3_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -417,7 +429,7 @@ static struct clk_rcg2 vfe0_clk_src = {
-       .freq_tbl = ftbl_camss_vfe_vfe0_1_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "vfe0_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -430,7 +442,7 @@ static struct clk_rcg2 vfe1_clk_src = {
-       .freq_tbl = ftbl_camss_vfe_vfe0_1_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "vfe1_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -471,7 +483,7 @@ static struct clk_rcg2 mdp_clk_src = {
-       .freq_tbl = ftbl_mdss_mdp_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mdp_clk_src",
--              .parent_names = mmcc_xo_mmpll0_dsi_hdmi_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_dsi_hdmi_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_dsi_hdmi_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -494,7 +506,7 @@ static struct clk_rcg2 jpeg0_clk_src = {
-       .freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "jpeg0_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -507,7 +519,7 @@ static struct clk_rcg2 jpeg1_clk_src = {
-       .freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "jpeg1_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -520,7 +532,7 @@ static struct clk_rcg2 jpeg2_clk_src = {
-       .freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "jpeg2_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -533,7 +545,7 @@ static struct clk_rcg2 pclk0_clk_src = {
-       .parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "pclk0_clk_src",
--              .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
-+              .parent_data = mmcc_xo_dsi_hdmi_edp_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp_gpll0),
-               .ops = &clk_pixel_ops,
-               .flags = CLK_SET_RATE_PARENT,
-@@ -547,7 +559,7 @@ static struct clk_rcg2 pclk1_clk_src = {
-       .parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "pclk1_clk_src",
--              .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
-+              .parent_data = mmcc_xo_dsi_hdmi_edp_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp_gpll0),
-               .ops = &clk_pixel_ops,
-               .flags = CLK_SET_RATE_PARENT,
-@@ -580,7 +592,7 @@ static struct clk_rcg2 vcodec0_clk_src = {
-       .freq_tbl = ftbl_venus0_vcodec0_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "vcodec0_clk_src",
--              .parent_names = mmcc_xo_mmpll0_1_3_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_1_3_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_1_3_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -598,7 +610,7 @@ static struct clk_rcg2 cci_clk_src = {
-       .freq_tbl = ftbl_camss_cci_cci_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "cci_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -622,7 +634,7 @@ static struct clk_rcg2 camss_gp0_clk_src = {
-       .freq_tbl = ftbl_camss_gp0_1_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "camss_gp0_clk_src",
--              .parent_names = mmcc_xo_mmpll0_1_gpll1_0,
-+              .parent_data = mmcc_xo_mmpll0_1_gpll1_0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_1_gpll1_0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -636,7 +648,7 @@ static struct clk_rcg2 camss_gp1_clk_src = {
-       .freq_tbl = ftbl_camss_gp0_1_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "camss_gp1_clk_src",
--              .parent_names = mmcc_xo_mmpll0_1_gpll1_0,
-+              .parent_data = mmcc_xo_mmpll0_1_gpll1_0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_1_gpll1_0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -671,7 +683,7 @@ static struct clk_rcg2 mclk0_clk_src = {
-       .freq_tbl = ftbl_camss_mclk0_3_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mclk0_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -684,7 +696,7 @@ static struct clk_rcg2 mclk1_clk_src = {
-       .freq_tbl = ftbl_camss_mclk0_3_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mclk1_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -697,7 +709,7 @@ static struct clk_rcg2 mclk2_clk_src = {
-       .freq_tbl = ftbl_camss_mclk0_3_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mclk2_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -710,7 +722,7 @@ static struct clk_rcg2 mclk3_clk_src = {
-       .freq_tbl = ftbl_camss_mclk0_3_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "mclk3_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -729,7 +741,7 @@ static struct clk_rcg2 csi0phytimer_clk_src = {
-       .freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi0phytimer_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -742,7 +754,7 @@ static struct clk_rcg2 csi1phytimer_clk_src = {
-       .freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi1phytimer_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -755,7 +767,7 @@ static struct clk_rcg2 csi2phytimer_clk_src = {
-       .freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "csi2phytimer_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -786,7 +798,7 @@ static struct clk_rcg2 cpp_clk_src = {
-       .freq_tbl = ftbl_camss_vfe_cpp_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "cpp_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -804,7 +816,7 @@ static struct clk_rcg2 byte0_clk_src = {
-       .freq_tbl = byte_freq_tbl,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "byte0_clk_src",
--              .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
-+              .parent_data = mmcc_xo_dsibyte_hdmi_edp_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_dsibyte_hdmi_edp_gpll0),
-               .ops = &clk_byte2_ops,
-               .flags = CLK_SET_RATE_PARENT,
-@@ -818,7 +830,7 @@ static struct clk_rcg2 byte1_clk_src = {
-       .freq_tbl = byte_freq_tbl,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "byte1_clk_src",
--              .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
-+              .parent_data = mmcc_xo_dsibyte_hdmi_edp_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_dsibyte_hdmi_edp_gpll0),
-               .ops = &clk_byte2_ops,
-               .flags = CLK_SET_RATE_PARENT,
-@@ -837,7 +849,7 @@ static struct clk_rcg2 edpaux_clk_src = {
-       .freq_tbl = ftbl_mdss_edpaux_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "edpaux_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -856,7 +868,7 @@ static struct clk_rcg2 edplink_clk_src = {
-       .freq_tbl = ftbl_mdss_edplink_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "edplink_clk_src",
--              .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
-+              .parent_data = mmcc_xo_dsi_hdmi_edp_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp_gpll0),
-               .ops = &clk_rcg2_ops,
-               .flags = CLK_SET_RATE_PARENT,
-@@ -876,7 +888,7 @@ static struct clk_rcg2 edppixel_clk_src = {
-       .freq_tbl = edp_pixel_freq_tbl,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "edppixel_clk_src",
--              .parent_names = mmcc_xo_dsi_hdmi_edp,
-+              .parent_data = mmcc_xo_dsi_hdmi_edp,
-               .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp),
-               .ops = &clk_edp_pixel_ops,
-       },
-@@ -894,7 +906,7 @@ static struct clk_rcg2 esc0_clk_src = {
-       .freq_tbl = ftbl_mdss_esc0_1_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "esc0_clk_src",
--              .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
-+              .parent_data = mmcc_xo_dsibyte_hdmi_edp_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_dsibyte_hdmi_edp_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -907,7 +919,7 @@ static struct clk_rcg2 esc1_clk_src = {
-       .freq_tbl = ftbl_mdss_esc0_1_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "esc1_clk_src",
--              .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
-+              .parent_data = mmcc_xo_dsibyte_hdmi_edp_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_dsibyte_hdmi_edp_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -925,7 +937,7 @@ static struct clk_rcg2 extpclk_clk_src = {
-       .freq_tbl = extpclk_freq_tbl,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "extpclk_clk_src",
--              .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
-+              .parent_data = mmcc_xo_dsi_hdmi_edp_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_dsi_hdmi_edp_gpll0),
-               .ops = &clk_byte_ops,
-               .flags = CLK_SET_RATE_PARENT,
-@@ -944,7 +956,7 @@ static struct clk_rcg2 hdmi_clk_src = {
-       .freq_tbl = ftbl_mdss_hdmi_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "hdmi_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -962,7 +974,7 @@ static struct clk_rcg2 vsync_clk_src = {
-       .freq_tbl = ftbl_mdss_vsync_clk,
-       .clkr.hw.init = &(struct clk_init_data){
-               .name = "vsync_clk_src",
--              .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
-+              .parent_data = mmcc_xo_mmpll0_mmpll1_gpll0,
-               .num_parents = ARRAY_SIZE(mmcc_xo_mmpll0_mmpll1_gpll0),
-               .ops = &clk_rcg2_ops,
-       },
-@@ -975,8 +987,8 @@ static struct clk_branch camss_cci_cci_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_cci_cci_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -991,8 +1003,8 @@ static struct clk_branch camss_cci_cci_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_cci_cci_clk",
--                      .parent_names = (const char *[]){
--                              "cci_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &cci_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1008,8 +1020,8 @@ static struct clk_branch camss_csi0_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi0_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1024,8 +1036,8 @@ static struct clk_branch camss_csi0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi0_clk",
--                      .parent_names = (const char *[]){
--                              "csi0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1041,8 +1053,8 @@ static struct clk_branch camss_csi0phy_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi0phy_clk",
--                      .parent_names = (const char *[]){
--                              "csi0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1058,8 +1070,8 @@ static struct clk_branch camss_csi0pix_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi0pix_clk",
--                      .parent_names = (const char *[]){
--                              "csi0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1075,8 +1087,8 @@ static struct clk_branch camss_csi0rdi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi0rdi_clk",
--                      .parent_names = (const char *[]){
--                              "csi0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1092,8 +1104,8 @@ static struct clk_branch camss_csi1_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi1_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1108,8 +1120,8 @@ static struct clk_branch camss_csi1_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi1_clk",
--                      .parent_names = (const char *[]){
--                              "csi1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1125,8 +1137,8 @@ static struct clk_branch camss_csi1phy_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi1phy_clk",
--                      .parent_names = (const char *[]){
--                              "csi1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1142,8 +1154,8 @@ static struct clk_branch camss_csi1pix_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi1pix_clk",
--                      .parent_names = (const char *[]){
--                              "csi1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1159,8 +1171,8 @@ static struct clk_branch camss_csi1rdi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi1rdi_clk",
--                      .parent_names = (const char *[]){
--                              "csi1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1176,8 +1188,8 @@ static struct clk_branch camss_csi2_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi2_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1192,8 +1204,8 @@ static struct clk_branch camss_csi2_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi2_clk",
--                      .parent_names = (const char *[]){
--                              "csi2_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi2_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1209,8 +1221,8 @@ static struct clk_branch camss_csi2phy_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi2phy_clk",
--                      .parent_names = (const char *[]){
--                              "csi2_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi2_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1226,8 +1238,8 @@ static struct clk_branch camss_csi2pix_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi2pix_clk",
--                      .parent_names = (const char *[]){
--                              "csi2_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi2_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1243,8 +1255,8 @@ static struct clk_branch camss_csi2rdi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi2rdi_clk",
--                      .parent_names = (const char *[]){
--                              "csi2_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi2_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1260,8 +1272,8 @@ static struct clk_branch camss_csi3_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi3_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1276,8 +1288,8 @@ static struct clk_branch camss_csi3_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi3_clk",
--                      .parent_names = (const char *[]){
--                              "csi3_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi3_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1293,8 +1305,8 @@ static struct clk_branch camss_csi3phy_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi3phy_clk",
--                      .parent_names = (const char *[]){
--                              "csi3_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi3_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1310,8 +1322,8 @@ static struct clk_branch camss_csi3pix_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi3pix_clk",
--                      .parent_names = (const char *[]){
--                              "csi3_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi3_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1327,8 +1339,8 @@ static struct clk_branch camss_csi3rdi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi3rdi_clk",
--                      .parent_names = (const char *[]){
--                              "csi3_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi3_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1344,8 +1356,8 @@ static struct clk_branch camss_csi_vfe0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi_vfe0_clk",
--                      .parent_names = (const char *[]){
--                              "vfe0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &vfe0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1361,8 +1373,8 @@ static struct clk_branch camss_csi_vfe1_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_csi_vfe1_clk",
--                      .parent_names = (const char *[]){
--                              "vfe1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &vfe1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1378,8 +1390,8 @@ static struct clk_branch camss_gp0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_gp0_clk",
--                      .parent_names = (const char *[]){
--                              "camss_gp0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &camss_gp0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1395,8 +1407,8 @@ static struct clk_branch camss_gp1_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_gp1_clk",
--                      .parent_names = (const char *[]){
--                              "camss_gp1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &camss_gp1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1412,8 +1424,8 @@ static struct clk_branch camss_ispif_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_ispif_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1428,8 +1440,8 @@ static struct clk_branch camss_jpeg_jpeg0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_jpeg_jpeg0_clk",
--                      .parent_names = (const char *[]){
--                              "jpeg0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &jpeg0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1445,8 +1457,8 @@ static struct clk_branch camss_jpeg_jpeg1_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_jpeg_jpeg1_clk",
--                      .parent_names = (const char *[]){
--                              "jpeg1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &jpeg1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1462,8 +1474,8 @@ static struct clk_branch camss_jpeg_jpeg2_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_jpeg_jpeg2_clk",
--                      .parent_names = (const char *[]){
--                              "jpeg2_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &jpeg2_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1479,8 +1491,8 @@ static struct clk_branch camss_jpeg_jpeg_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_jpeg_jpeg_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1495,8 +1507,8 @@ static struct clk_branch camss_jpeg_jpeg_axi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_jpeg_jpeg_axi_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_axi_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_axi_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1511,8 +1523,8 @@ static struct clk_branch camss_jpeg_jpeg_ocmemnoc_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_jpeg_jpeg_ocmemnoc_clk",
--                      .parent_names = (const char *[]){
--                              "ocmemnoc_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &ocmemnoc_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1528,8 +1540,8 @@ static struct clk_branch camss_mclk0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_mclk0_clk",
--                      .parent_names = (const char *[]){
--                              "mclk0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mclk0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1545,8 +1557,8 @@ static struct clk_branch camss_mclk1_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_mclk1_clk",
--                      .parent_names = (const char *[]){
--                              "mclk1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mclk1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1562,8 +1574,8 @@ static struct clk_branch camss_mclk2_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_mclk2_clk",
--                      .parent_names = (const char *[]){
--                              "mclk2_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mclk2_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1579,8 +1591,8 @@ static struct clk_branch camss_mclk3_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_mclk3_clk",
--                      .parent_names = (const char *[]){
--                              "mclk3_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mclk3_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1596,8 +1608,8 @@ static struct clk_branch camss_micro_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_micro_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1612,8 +1624,8 @@ static struct clk_branch camss_phy0_csi0phytimer_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_phy0_csi0phytimer_clk",
--                      .parent_names = (const char *[]){
--                              "csi0phytimer_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi0phytimer_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1629,8 +1641,8 @@ static struct clk_branch camss_phy1_csi1phytimer_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_phy1_csi1phytimer_clk",
--                      .parent_names = (const char *[]){
--                              "csi1phytimer_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi1phytimer_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1646,8 +1658,8 @@ static struct clk_branch camss_phy2_csi2phytimer_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_phy2_csi2phytimer_clk",
--                      .parent_names = (const char *[]){
--                              "csi2phytimer_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &csi2phytimer_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1663,8 +1675,8 @@ static struct clk_branch camss_top_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_top_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1679,8 +1691,8 @@ static struct clk_branch camss_vfe_cpp_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_vfe_cpp_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1695,8 +1707,8 @@ static struct clk_branch camss_vfe_cpp_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_vfe_cpp_clk",
--                      .parent_names = (const char *[]){
--                              "cpp_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &cpp_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1712,8 +1724,8 @@ static struct clk_branch camss_vfe_vfe0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_vfe_vfe0_clk",
--                      .parent_names = (const char *[]){
--                              "vfe0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &vfe0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1729,8 +1741,8 @@ static struct clk_branch camss_vfe_vfe1_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_vfe_vfe1_clk",
--                      .parent_names = (const char *[]){
--                              "vfe1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &vfe1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1746,8 +1758,8 @@ static struct clk_branch camss_vfe_vfe_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_vfe_vfe_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1762,8 +1774,8 @@ static struct clk_branch camss_vfe_vfe_axi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_vfe_vfe_axi_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_axi_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_axi_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1778,8 +1790,8 @@ static struct clk_branch camss_vfe_vfe_ocmemnoc_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "camss_vfe_vfe_ocmemnoc_clk",
--                      .parent_names = (const char *[]){
--                              "ocmemnoc_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &ocmemnoc_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1795,8 +1807,8 @@ static struct clk_branch mdss_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1811,8 +1823,8 @@ static struct clk_branch mdss_axi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_axi_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_axi_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_axi_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1828,8 +1840,8 @@ static struct clk_branch mdss_byte0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_byte0_clk",
--                      .parent_names = (const char *[]){
--                              "byte0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &byte0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1845,8 +1857,8 @@ static struct clk_branch mdss_byte1_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_byte1_clk",
--                      .parent_names = (const char *[]){
--                              "byte1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &byte1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1862,8 +1874,8 @@ static struct clk_branch mdss_edpaux_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_edpaux_clk",
--                      .parent_names = (const char *[]){
--                              "edpaux_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &edpaux_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1879,8 +1891,8 @@ static struct clk_branch mdss_edplink_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_edplink_clk",
--                      .parent_names = (const char *[]){
--                              "edplink_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &edplink_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1896,8 +1908,8 @@ static struct clk_branch mdss_edppixel_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_edppixel_clk",
--                      .parent_names = (const char *[]){
--                              "edppixel_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &edppixel_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1913,8 +1925,8 @@ static struct clk_branch mdss_esc0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_esc0_clk",
--                      .parent_names = (const char *[]){
--                              "esc0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &esc0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1930,8 +1942,8 @@ static struct clk_branch mdss_esc1_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_esc1_clk",
--                      .parent_names = (const char *[]){
--                              "esc1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &esc1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1947,8 +1959,8 @@ static struct clk_branch mdss_extpclk_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_extpclk_clk",
--                      .parent_names = (const char *[]){
--                              "extpclk_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &extpclk_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1964,8 +1976,8 @@ static struct clk_branch mdss_hdmi_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_hdmi_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -1980,8 +1992,8 @@ static struct clk_branch mdss_hdmi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_hdmi_clk",
--                      .parent_names = (const char *[]){
--                              "hdmi_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &hdmi_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -1997,8 +2009,8 @@ static struct clk_branch mdss_mdp_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_mdp_clk",
--                      .parent_names = (const char *[]){
--                              "mdp_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mdp_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2014,8 +2026,8 @@ static struct clk_branch mdss_mdp_lut_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_mdp_lut_clk",
--                      .parent_names = (const char *[]){
--                              "mdp_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mdp_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2031,8 +2043,8 @@ static struct clk_branch mdss_pclk0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_pclk0_clk",
--                      .parent_names = (const char *[]){
--                              "pclk0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &pclk0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2048,8 +2060,8 @@ static struct clk_branch mdss_pclk1_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_pclk1_clk",
--                      .parent_names = (const char *[]){
--                              "pclk1_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &pclk1_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2065,8 +2077,8 @@ static struct clk_branch mdss_vsync_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mdss_vsync_clk",
--                      .parent_names = (const char *[]){
--                              "vsync_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &vsync_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2082,8 +2094,8 @@ static struct clk_branch mmss_misc_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mmss_misc_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -2098,8 +2110,8 @@ static struct clk_branch mmss_mmssnoc_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mmss_mmssnoc_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -2115,8 +2127,8 @@ static struct clk_branch mmss_mmssnoc_bto_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mmss_mmssnoc_bto_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -2132,8 +2144,8 @@ static struct clk_branch mmss_mmssnoc_axi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mmss_mmssnoc_axi_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_axi_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_axi_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
-@@ -2149,8 +2161,8 @@ static struct clk_branch mmss_s0_axi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "mmss_s0_axi_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_axi_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_axi_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -2166,8 +2178,8 @@ static struct clk_branch ocmemcx_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "ocmemcx_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -2182,8 +2194,8 @@ static struct clk_branch ocmemcx_ocmemnoc_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "ocmemcx_ocmemnoc_clk",
--                      .parent_names = (const char *[]){
--                              "ocmemnoc_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &ocmemnoc_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2199,8 +2211,8 @@ static struct clk_branch oxili_ocmemgx_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "oxili_ocmemgx_clk",
--                      .parent_names = (const char *[]){
--                              "gfx3d_clk_src",
-+                      .parent_data = (const struct clk_parent_data[]){
-+                              { .fw_name = "gfx3d_clk_src", .name = "gfx3d_clk_src" },
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2216,8 +2228,8 @@ static struct clk_branch ocmemnoc_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "ocmemnoc_clk",
--                      .parent_names = (const char *[]){
--                              "ocmemnoc_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &ocmemnoc_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2233,8 +2245,8 @@ static struct clk_branch oxili_gfx3d_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "oxili_gfx3d_clk",
--                      .parent_names = (const char *[]){
--                              "gfx3d_clk_src",
-+                      .parent_data = (const struct clk_parent_data[]){
-+                              { .fw_name = "gfx3d_clk_src", .name = "gfx3d_clk_src" },
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2250,8 +2262,8 @@ static struct clk_branch oxilicx_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "oxilicx_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -2266,8 +2278,8 @@ static struct clk_branch oxilicx_axi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "oxilicx_axi_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_axi_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_axi_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -2282,8 +2294,8 @@ static struct clk_branch venus0_ahb_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "venus0_ahb_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_ahb_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_ahb_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -2298,8 +2310,8 @@ static struct clk_branch venus0_axi_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "venus0_axi_clk",
--                      .parent_names = (const char *[]){
--                              "mmss_axi_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &mmss_axi_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .ops = &clk_branch2_ops,
-@@ -2314,8 +2326,8 @@ static struct clk_branch venus0_ocmemnoc_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "venus0_ocmemnoc_clk",
--                      .parent_names = (const char *[]){
--                              "ocmemnoc_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &ocmemnoc_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
-@@ -2331,8 +2343,8 @@ static struct clk_branch venus0_vcodec0_clk = {
-               .enable_mask = BIT(0),
-               .hw.init = &(struct clk_init_data){
-                       .name = "venus0_vcodec0_clk",
--                      .parent_names = (const char *[]){
--                              "vcodec0_clk_src",
-+                      .parent_hws = (const struct clk_hw*[]){
-+                              &vcodec0_clk_src.clkr.hw
-                       },
-                       .num_parents = 1,
-                       .flags = CLK_SET_RATE_PARENT,
--- 
-2.39.2
-
diff --git a/queue-6.1/clocking-wizard-support-higher-frequency-accuracy.patch b/queue-6.1/clocking-wizard-support-higher-frequency-accuracy.patch
deleted file mode 100644 (file)
index 509f96b..0000000
+++ /dev/null
@@ -1,414 +0,0 @@
-From 73c4d4f5ed37557ff69a04021aae626425913f0e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 27 Mar 2023 11:56:37 +0530
-Subject: clocking-wizard: Support higher frequency accuracy
-
-From: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
-
-[ Upstream commit 595c88cda65d30c6b36277c232193295a45406dc ]
-
-Change the multipliers and divisors to support a higher
-frequency accuracy if there is only one output.
-Currently only O is changed now we are changing M, D and O.
-For multiple output case the earlier behavior is retained.
-
-Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
-Link: https://lore.kernel.org/r/20230327062637.22237-1-shubhrajyoti.datta@amd.com
-Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-Stable-dep-of: b1356ed1a446 ("clk: clocking-wizard: check return value of devm_kasprintf()")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 228 ++++++++++++++++++---
- 1 file changed, 204 insertions(+), 24 deletions(-)
-
-diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
-index 4a23583933bcc..5c362c622a866 100644
---- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
-+++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
-@@ -8,12 +8,14 @@
-  *
-  */
-+#include <linux/bitfield.h>
- #include <linux/platform_device.h>
- #include <linux/clk.h>
- #include <linux/clk-provider.h>
- #include <linux/slab.h>
- #include <linux/io.h>
- #include <linux/of.h>
-+#include <linux/math64.h>
- #include <linux/module.h>
- #include <linux/err.h>
- #include <linux/iopoll.h>
-@@ -37,6 +39,7 @@
- #define WZRD_CLKOUT_DIVIDE_MASK               (0xff << WZRD_DIVCLK_DIVIDE_SHIFT)
- #define WZRD_CLKOUT_FRAC_SHIFT                8
- #define WZRD_CLKOUT_FRAC_MASK         0x3ff
-+#define WZRD_CLKOUT0_FRAC_MASK                GENMASK(17, 8)
- #define WZRD_DR_MAX_INT_DIV_VALUE     255
- #define WZRD_DR_STATUS_REG_OFFSET     0x04
-@@ -49,6 +52,22 @@
- #define WZRD_USEC_POLL                10
- #define WZRD_TIMEOUT_POLL             1000
-+
-+/* Divider limits, from UG572 Table 3-4 for Ultrascale+ */
-+#define DIV_O                         0x01
-+#define DIV_ALL                               0x03
-+
-+#define WZRD_M_MIN                    2
-+#define WZRD_M_MAX                    128
-+#define WZRD_D_MIN                    1
-+#define WZRD_D_MAX                    106
-+#define WZRD_VCO_MIN                  800000000
-+#define WZRD_VCO_MAX                  1600000000
-+#define WZRD_O_MIN                    1
-+#define WZRD_O_MAX                    128
-+#define WZRD_MIN_ERR                  20000
-+#define WZRD_FRAC_POINTS              1000
-+
- /* Get the mask from width */
- #define div_mask(width)                       ((1 << (width)) - 1)
-@@ -97,6 +116,9 @@ struct clk_wzrd {
-  * @width:    width of the divider bit field
-  * @flags:    clk_wzrd divider flags
-  * @table:    array of value/divider pairs, last entry should have div = 0
-+ * @m:        value of the multiplier
-+ * @d:        value of the common divider
-+ * @o:        value of the leaf divider
-  * @lock:     register lock
-  */
- struct clk_wzrd_divider {
-@@ -107,6 +129,9 @@ struct clk_wzrd_divider {
-       u8 width;
-       u8 flags;
-       const struct clk_div_table *table;
-+      u32 m;
-+      u32 d;
-+      u32 o;
-       spinlock_t *lock;  /* divider lock */
- };
-@@ -198,12 +223,155 @@ static long clk_wzrd_round_rate(struct clk_hw *hw, unsigned long rate,
-       return *prate / div;
- }
-+static int clk_wzrd_get_divisors(struct clk_hw *hw, unsigned long rate,
-+                               unsigned long parent_rate)
-+{
-+      struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
-+      unsigned long vco_freq, freq, diff;
-+      u32 m, d, o;
-+
-+      for (m = WZRD_M_MIN; m <= WZRD_M_MAX; m++) {
-+              for (d = WZRD_D_MIN; d <= WZRD_D_MAX; d++) {
-+                      vco_freq = DIV_ROUND_CLOSEST((parent_rate * m), d);
-+                      if (vco_freq >= WZRD_VCO_MIN && vco_freq <= WZRD_VCO_MAX) {
-+                              for (o = WZRD_O_MIN; o <= WZRD_O_MAX; o++) {
-+                                      freq = DIV_ROUND_CLOSEST_ULL(vco_freq, o);
-+                                      diff = abs(freq - rate);
-+
-+                                      if (diff < WZRD_MIN_ERR) {
-+                                              divider->m = m;
-+                                              divider->d = d;
-+                                              divider->o = o;
-+                                              return 0;
-+                                      }
-+                              }
-+                      }
-+              }
-+      }
-+      return -EBUSY;
-+}
-+
-+static int clk_wzrd_dynamic_all_nolock(struct clk_hw *hw, unsigned long rate,
-+                                     unsigned long parent_rate)
-+{
-+      struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
-+      unsigned long vco_freq, rate_div, clockout0_div;
-+      u32 reg, pre, value, f;
-+      int err;
-+
-+      err = clk_wzrd_get_divisors(hw, rate, parent_rate);
-+      if (err)
-+              return err;
-+
-+      vco_freq = DIV_ROUND_CLOSEST(parent_rate * divider->m, divider->d);
-+      rate_div = DIV_ROUND_CLOSEST_ULL((vco_freq * WZRD_FRAC_POINTS), rate);
-+
-+      clockout0_div = div_u64(rate_div,  WZRD_FRAC_POINTS);
-+
-+      pre = DIV_ROUND_CLOSEST_ULL(vco_freq * WZRD_FRAC_POINTS, rate);
-+      f = (pre - (clockout0_div * WZRD_FRAC_POINTS));
-+      f &= WZRD_CLKOUT_FRAC_MASK;
-+
-+      reg = FIELD_PREP(WZRD_CLKOUT_DIVIDE_MASK, clockout0_div) |
-+            FIELD_PREP(WZRD_CLKOUT0_FRAC_MASK, f);
-+
-+      writel(reg, divider->base + WZRD_CLK_CFG_REG(2));
-+      /* Set divisor and clear phase offset */
-+      reg = FIELD_PREP(WZRD_CLKFBOUT_MULT_MASK, divider->m) |
-+            FIELD_PREP(WZRD_DIVCLK_DIVIDE_MASK, divider->d);
-+      writel(reg, divider->base + WZRD_CLK_CFG_REG(0));
-+      writel(divider->o, divider->base + WZRD_CLK_CFG_REG(2));
-+      writel(0, divider->base + WZRD_CLK_CFG_REG(3));
-+      /* Check status register */
-+      err = readl_poll_timeout(divider->base + WZRD_DR_STATUS_REG_OFFSET, value,
-+                               value & WZRD_DR_LOCK_BIT_MASK,
-+                               WZRD_USEC_POLL, WZRD_TIMEOUT_POLL);
-+      if (err)
-+              return -ETIMEDOUT;
-+
-+      /* Initiate reconfiguration */
-+      writel(WZRD_DR_BEGIN_DYNA_RECONF,
-+             divider->base + WZRD_DR_INIT_REG_OFFSET);
-+
-+      /* Check status register */
-+      return readl_poll_timeout(divider->base + WZRD_DR_STATUS_REG_OFFSET, value,
-+                               value & WZRD_DR_LOCK_BIT_MASK,
-+                               WZRD_USEC_POLL, WZRD_TIMEOUT_POLL);
-+}
-+
-+static int clk_wzrd_dynamic_all(struct clk_hw *hw, unsigned long rate,
-+                              unsigned long parent_rate)
-+{
-+      struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
-+      unsigned long flags = 0;
-+      int ret;
-+
-+      spin_lock_irqsave(divider->lock, flags);
-+
-+      ret = clk_wzrd_dynamic_all_nolock(hw, rate, parent_rate);
-+
-+      spin_unlock_irqrestore(divider->lock, flags);
-+
-+      return ret;
-+}
-+
-+static unsigned long clk_wzrd_recalc_rate_all(struct clk_hw *hw,
-+                                            unsigned long parent_rate)
-+{
-+      struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
-+      u32 m, d, o, div, reg, f;
-+
-+      reg = readl(divider->base + WZRD_CLK_CFG_REG(0));
-+      d = FIELD_GET(WZRD_DIVCLK_DIVIDE_MASK, reg);
-+      m = FIELD_GET(WZRD_CLKFBOUT_MULT_MASK, reg);
-+      reg = readl(divider->base + WZRD_CLK_CFG_REG(2));
-+      o = FIELD_GET(WZRD_DIVCLK_DIVIDE_MASK, reg);
-+      f = FIELD_GET(WZRD_CLKOUT0_FRAC_MASK, reg);
-+
-+      div = DIV_ROUND_CLOSEST(d * (WZRD_FRAC_POINTS * o + f), WZRD_FRAC_POINTS);
-+      return divider_recalc_rate(hw, parent_rate * m, div, divider->table,
-+                      divider->flags, divider->width);
-+}
-+
-+static long clk_wzrd_round_rate_all(struct clk_hw *hw, unsigned long rate,
-+                                  unsigned long *prate)
-+{
-+      struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
-+      unsigned long int_freq;
-+      u32 m, d, o, div, f;
-+      int err;
-+
-+      err = clk_wzrd_get_divisors(hw, rate, *prate);
-+      if (err)
-+              return err;
-+
-+      m = divider->m;
-+      d = divider->d;
-+      o = divider->o;
-+
-+      div = d * o;
-+      int_freq =  divider_recalc_rate(hw, *prate * m, div, divider->table,
-+                                      divider->flags, divider->width);
-+
-+      if (rate > int_freq) {
-+              f = DIV_ROUND_CLOSEST_ULL(rate * WZRD_FRAC_POINTS, int_freq);
-+              rate = DIV_ROUND_CLOSEST(int_freq * f, WZRD_FRAC_POINTS);
-+      }
-+      return rate;
-+}
-+
- static const struct clk_ops clk_wzrd_clk_divider_ops = {
-       .round_rate = clk_wzrd_round_rate,
-       .set_rate = clk_wzrd_dynamic_reconfig,
-       .recalc_rate = clk_wzrd_recalc_rate,
- };
-+static const struct clk_ops clk_wzrd_clk_div_all_ops = {
-+      .round_rate = clk_wzrd_round_rate_all,
-+      .set_rate = clk_wzrd_dynamic_all,
-+      .recalc_rate = clk_wzrd_recalc_rate_all,
-+};
-+
- static unsigned long clk_wzrd_recalc_ratef(struct clk_hw *hw,
-                                          unsigned long parent_rate)
- {
-@@ -280,7 +448,7 @@ static struct clk *clk_wzrd_register_divf(struct device *dev,
-                                         void __iomem *base, u16 offset,
-                                         u8 shift, u8 width,
-                                         u8 clk_divider_flags,
--                                        const struct clk_div_table *table,
-+                                        u32 div_type,
-                                         spinlock_t *lock)
- {
-       struct clk_wzrd_divider *div;
-@@ -307,7 +475,6 @@ static struct clk *clk_wzrd_register_divf(struct device *dev,
-       div->flags = clk_divider_flags;
-       div->lock = lock;
-       div->hw.init = &init;
--      div->table = table;
-       hw = &div->hw;
-       ret =  devm_clk_hw_register(dev, hw);
-@@ -324,7 +491,7 @@ static struct clk *clk_wzrd_register_divider(struct device *dev,
-                                            void __iomem *base, u16 offset,
-                                            u8 shift, u8 width,
-                                            u8 clk_divider_flags,
--                                           const struct clk_div_table *table,
-+                                           u32 div_type,
-                                            spinlock_t *lock)
- {
-       struct clk_wzrd_divider *div;
-@@ -337,7 +504,12 @@ static struct clk *clk_wzrd_register_divider(struct device *dev,
-               return ERR_PTR(-ENOMEM);
-       init.name = name;
--      init.ops = &clk_wzrd_clk_divider_ops;
-+      if (clk_divider_flags & CLK_DIVIDER_READ_ONLY)
-+              init.ops = &clk_divider_ro_ops;
-+      else if (div_type == DIV_O)
-+              init.ops = &clk_wzrd_clk_divider_ops;
-+      else
-+              init.ops = &clk_wzrd_clk_div_all_ops;
-       init.flags = flags;
-       init.parent_names =  &parent_name;
-       init.num_parents =  1;
-@@ -349,7 +521,6 @@ static struct clk *clk_wzrd_register_divider(struct device *dev,
-       div->flags = clk_divider_flags;
-       div->lock = lock;
-       div->hw.init = &init;
--      div->table = table;
-       hw = &div->hw;
-       ret = devm_clk_hw_register(dev, hw);
-@@ -425,6 +596,7 @@ static int clk_wzrd_probe(struct platform_device *pdev)
-       const char *clk_name;
-       void __iomem *ctrl_reg;
-       struct clk_wzrd *clk_wzrd;
-+      const char *clkout_name;
-       struct device_node *np = pdev->dev.of_node;
-       int nr_outputs;
-       unsigned long flags = 0;
-@@ -469,6 +641,26 @@ static int clk_wzrd_probe(struct platform_device *pdev)
-               goto err_disable_clk;
-       }
-+      ret = of_property_read_u32(np, "xlnx,nr-outputs", &nr_outputs);
-+      if (ret || nr_outputs > WZRD_NUM_OUTPUTS) {
-+              ret = -EINVAL;
-+              goto err_disable_clk;
-+      }
-+
-+      clkout_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_out0", dev_name(&pdev->dev));
-+      if (nr_outputs == 1) {
-+              clk_wzrd->clkout[0] = clk_wzrd_register_divider
-+                              (&pdev->dev, clkout_name,
-+                              __clk_get_name(clk_wzrd->clk_in1), 0,
-+                              clk_wzrd->base, WZRD_CLK_CFG_REG(3),
-+                              WZRD_CLKOUT_DIVIDE_SHIFT,
-+                              WZRD_CLKOUT_DIVIDE_WIDTH,
-+                              CLK_DIVIDER_ONE_BASED | CLK_DIVIDER_ALLOW_ZERO,
-+                              DIV_ALL, &clkwzrd_lock);
-+
-+              goto out;
-+      }
-+
-       reg = readl(clk_wzrd->base + WZRD_CLK_CFG_REG(0));
-       reg_f = reg & WZRD_CLKFBOUT_FRAC_MASK;
-       reg_f =  reg_f >> WZRD_CLKFBOUT_FRAC_SHIFT;
-@@ -476,20 +668,11 @@ static int clk_wzrd_probe(struct platform_device *pdev)
-       reg = reg & WZRD_CLKFBOUT_MULT_MASK;
-       reg =  reg >> WZRD_CLKFBOUT_MULT_SHIFT;
-       mult = (reg * 1000) + reg_f;
--      clk_name = kasprintf(GFP_KERNEL, "%s_mul", dev_name(&pdev->dev));
-+      clk_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_mul", dev_name(&pdev->dev));
-       if (!clk_name) {
-               ret = -ENOMEM;
-               goto err_disable_clk;
-       }
--
--      ret = of_property_read_u32(np, "xlnx,nr-outputs", &nr_outputs);
--      if (ret || nr_outputs > WZRD_NUM_OUTPUTS) {
--              ret = -EINVAL;
--              goto err_disable_clk;
--      }
--      if (nr_outputs == 1)
--              flags = CLK_SET_RATE_PARENT;
--
-       clk_wzrd->clks_internal[wzrd_clk_mul] = clk_register_fixed_factor
-                       (&pdev->dev, clk_name,
-                        __clk_get_name(clk_wzrd->clk_in1),
-@@ -500,7 +683,7 @@ static int clk_wzrd_probe(struct platform_device *pdev)
-               goto err_disable_clk;
-       }
--      clk_name = kasprintf(GFP_KERNEL, "%s_mul_div", dev_name(&pdev->dev));
-+      clk_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_mul_div", dev_name(&pdev->dev));
-       if (!clk_name) {
-               ret = -ENOMEM;
-               goto err_rm_int_clk;
-@@ -521,9 +704,8 @@ static int clk_wzrd_probe(struct platform_device *pdev)
-       /* register div per output */
-       for (i = nr_outputs - 1; i >= 0 ; i--) {
--              const char *clkout_name;
--
--              clkout_name = kasprintf(GFP_KERNEL, "%s_out%d", dev_name(&pdev->dev), i);
-+              clkout_name = devm_kasprintf(&pdev->dev, GFP_KERNEL,
-+                                           "%s_out%d", dev_name(&pdev->dev), i);
-               if (!clkout_name) {
-                       ret = -ENOMEM;
-                       goto err_rm_int_clk;
-@@ -537,7 +719,7 @@ static int clk_wzrd_probe(struct platform_device *pdev)
-                               WZRD_CLKOUT_DIVIDE_SHIFT,
-                               WZRD_CLKOUT_DIVIDE_WIDTH,
-                               CLK_DIVIDER_ONE_BASED | CLK_DIVIDER_ALLOW_ZERO,
--                              NULL, &clkwzrd_lock);
-+                              DIV_O, &clkwzrd_lock);
-               else
-                       clk_wzrd->clkout[i] = clk_wzrd_register_divider
-                               (&pdev->dev, clkout_name,
-@@ -546,7 +728,7 @@ static int clk_wzrd_probe(struct platform_device *pdev)
-                               WZRD_CLKOUT_DIVIDE_SHIFT,
-                               WZRD_CLKOUT_DIVIDE_WIDTH,
-                               CLK_DIVIDER_ONE_BASED | CLK_DIVIDER_ALLOW_ZERO,
--                              NULL, &clkwzrd_lock);
-+                              DIV_O, &clkwzrd_lock);
-               if (IS_ERR(clk_wzrd->clkout[i])) {
-                       int j;
-@@ -559,8 +741,7 @@ static int clk_wzrd_probe(struct platform_device *pdev)
-               }
-       }
--      kfree(clk_name);
--
-+out:
-       clk_wzrd->clk_data.clks = clk_wzrd->clkout;
-       clk_wzrd->clk_data.clk_num = ARRAY_SIZE(clk_wzrd->clkout);
-       of_clk_add_provider(np, of_clk_src_onecell_get, &clk_wzrd->clk_data);
-@@ -585,7 +766,6 @@ static int clk_wzrd_probe(struct platform_device *pdev)
- err_rm_int_clks:
-       clk_unregister(clk_wzrd->clks_internal[1]);
- err_rm_int_clk:
--      kfree(clk_name);
-       clk_unregister(clk_wzrd->clks_internal[0]);
- err_disable_clk:
-       clk_disable_unprepare(clk_wzrd->axi_clk);
--- 
-2.39.2
-
diff --git a/queue-6.1/hid-input-map-battery-system-charging.patch b/queue-6.1/hid-input-map-battery-system-charging.patch
deleted file mode 100644 (file)
index 23fdd64..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-From ef78edbbe21652c9e5e7af60a419c9ee18ef1c1d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 24 Nov 2022 18:59:37 +0100
-Subject: HID: input: map battery system charging
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: José Expósito <jose.exposito89@gmail.com>
-
-[ Upstream commit a608dc1c06397dc50ab773498433432fb5938f92 ]
-
-HID descriptors with Battery System (0x85) Charging (0x44) usage are
-ignored and POWER_SUPPLY_STATUS_DISCHARGING is always reported to user
-space, even when the device is charging.
-
-Map this usage and when it is reported set the right charging status.
-
-In addition, add KUnit tests to make sure that the charging status is
-correctly set and reported. They can be run with the usual command:
-
-    $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid
-
-Signed-off-by: José Expósito <jose.exposito89@gmail.com>
-Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-Stable-dep-of: 49904a0ebf23 ("HID: uclogic: Modular KUnit tests should not depend on KUNIT=y")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/hid/.kunitconfig     |  1 +
- drivers/hid/Kconfig          |  1 +
- drivers/hid/hid-input-test.c | 80 ++++++++++++++++++++++++++++++++++++
- drivers/hid/hid-input.c      | 36 +++++++++++++++-
- include/linux/hid.h          |  2 +
- 5 files changed, 118 insertions(+), 2 deletions(-)
- create mode 100644 drivers/hid/hid-input-test.c
-
-diff --git a/drivers/hid/.kunitconfig b/drivers/hid/.kunitconfig
-index 04daeff5c970e..675a8209c7aeb 100644
---- a/drivers/hid/.kunitconfig
-+++ b/drivers/hid/.kunitconfig
-@@ -1,5 +1,6 @@
- CONFIG_KUNIT=y
- CONFIG_USB=y
- CONFIG_USB_HID=y
-+CONFIG_HID_BATTERY_STRENGTH=y
- CONFIG_HID_UCLOGIC=y
- CONFIG_HID_KUNIT_TEST=y
-diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
-index 185a077d59cdd..644b4913d4d85 100644
---- a/drivers/hid/Kconfig
-+++ b/drivers/hid/Kconfig
-@@ -1263,6 +1263,7 @@ config HID_MCP2221
- config HID_KUNIT_TEST
-       tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS
-       depends on KUNIT=y
-+      depends on HID_BATTERY_STRENGTH
-       depends on HID_UCLOGIC
-       default KUNIT_ALL_TESTS
-       help
-diff --git a/drivers/hid/hid-input-test.c b/drivers/hid/hid-input-test.c
-new file mode 100644
-index 0000000000000..77c2d45ac62a7
---- /dev/null
-+++ b/drivers/hid/hid-input-test.c
-@@ -0,0 +1,80 @@
-+// SPDX-License-Identifier: GPL-2.0+
-+/*
-+ *  HID to Linux Input mapping
-+ *
-+ *  Copyright (c) 2022 José Expósito <jose.exposito89@gmail.com>
-+ */
-+
-+#include <kunit/test.h>
-+
-+static void hid_test_input_set_battery_charge_status(struct kunit *test)
-+{
-+      struct hid_device *dev;
-+      bool handled;
-+
-+      dev = kunit_kzalloc(test, sizeof(*dev), GFP_KERNEL);
-+      KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dev);
-+
-+      handled = hidinput_set_battery_charge_status(dev, HID_DG_HEIGHT, 0);
-+      KUNIT_EXPECT_FALSE(test, handled);
-+      KUNIT_EXPECT_EQ(test, dev->battery_charge_status, POWER_SUPPLY_STATUS_UNKNOWN);
-+
-+      handled = hidinput_set_battery_charge_status(dev, HID_BAT_CHARGING, 0);
-+      KUNIT_EXPECT_TRUE(test, handled);
-+      KUNIT_EXPECT_EQ(test, dev->battery_charge_status, POWER_SUPPLY_STATUS_DISCHARGING);
-+
-+      handled = hidinput_set_battery_charge_status(dev, HID_BAT_CHARGING, 1);
-+      KUNIT_EXPECT_TRUE(test, handled);
-+      KUNIT_EXPECT_EQ(test, dev->battery_charge_status, POWER_SUPPLY_STATUS_CHARGING);
-+}
-+
-+static void hid_test_input_get_battery_property(struct kunit *test)
-+{
-+      struct power_supply *psy;
-+      struct hid_device *dev;
-+      union power_supply_propval val;
-+      int ret;
-+
-+      dev = kunit_kzalloc(test, sizeof(*dev), GFP_KERNEL);
-+      KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dev);
-+      dev->battery_avoid_query = true;
-+
-+      psy = kunit_kzalloc(test, sizeof(*psy), GFP_KERNEL);
-+      KUNIT_ASSERT_NOT_ERR_OR_NULL(test, psy);
-+      psy->drv_data = dev;
-+
-+      dev->battery_status = HID_BATTERY_UNKNOWN;
-+      dev->battery_charge_status = POWER_SUPPLY_STATUS_CHARGING;
-+      ret = hidinput_get_battery_property(psy, POWER_SUPPLY_PROP_STATUS, &val);
-+      KUNIT_EXPECT_EQ(test, ret, 0);
-+      KUNIT_EXPECT_EQ(test, val.intval, POWER_SUPPLY_STATUS_UNKNOWN);
-+
-+      dev->battery_status = HID_BATTERY_REPORTED;
-+      dev->battery_charge_status = POWER_SUPPLY_STATUS_CHARGING;
-+      ret = hidinput_get_battery_property(psy, POWER_SUPPLY_PROP_STATUS, &val);
-+      KUNIT_EXPECT_EQ(test, ret, 0);
-+      KUNIT_EXPECT_EQ(test, val.intval, POWER_SUPPLY_STATUS_CHARGING);
-+
-+      dev->battery_status = HID_BATTERY_REPORTED;
-+      dev->battery_charge_status = POWER_SUPPLY_STATUS_DISCHARGING;
-+      ret = hidinput_get_battery_property(psy, POWER_SUPPLY_PROP_STATUS, &val);
-+      KUNIT_EXPECT_EQ(test, ret, 0);
-+      KUNIT_EXPECT_EQ(test, val.intval, POWER_SUPPLY_STATUS_DISCHARGING);
-+}
-+
-+static struct kunit_case hid_input_tests[] = {
-+      KUNIT_CASE(hid_test_input_set_battery_charge_status),
-+      KUNIT_CASE(hid_test_input_get_battery_property),
-+      { }
-+};
-+
-+static struct kunit_suite hid_input_test_suite = {
-+      .name = "hid_input",
-+      .test_cases = hid_input_tests,
-+};
-+
-+kunit_test_suite(hid_input_test_suite);
-+
-+MODULE_DESCRIPTION("HID input KUnit tests");
-+MODULE_LICENSE("GPL");
-+MODULE_AUTHOR("José Expósito <jose.exposito89@gmail.com>");
-diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
-index 3acaaca888acd..6e836b179bdf8 100644
---- a/drivers/hid/hid-input.c
-+++ b/drivers/hid/hid-input.c
-@@ -492,7 +492,7 @@ static int hidinput_get_battery_property(struct power_supply *psy,
-               if (dev->battery_status == HID_BATTERY_UNKNOWN)
-                       val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
-               else
--                      val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
-+                      val->intval = dev->battery_charge_status;
-               break;
-       case POWER_SUPPLY_PROP_SCOPE:
-@@ -560,6 +560,7 @@ static int hidinput_setup_battery(struct hid_device *dev, unsigned report_type,
-       dev->battery_max = max;
-       dev->battery_report_type = report_type;
-       dev->battery_report_id = field->report->id;
-+      dev->battery_charge_status = POWER_SUPPLY_STATUS_DISCHARGING;
-       /*
-        * Stylus is normally not connected to the device and thus we
-@@ -626,6 +627,20 @@ static void hidinput_update_battery(struct hid_device *dev, int value)
-               power_supply_changed(dev->battery);
-       }
- }
-+
-+static bool hidinput_set_battery_charge_status(struct hid_device *dev,
-+                                             unsigned int usage, int value)
-+{
-+      switch (usage) {
-+      case HID_BAT_CHARGING:
-+              dev->battery_charge_status = value ?
-+                                           POWER_SUPPLY_STATUS_CHARGING :
-+                                           POWER_SUPPLY_STATUS_DISCHARGING;
-+              return true;
-+      }
-+
-+      return false;
-+}
- #else  /* !CONFIG_HID_BATTERY_STRENGTH */
- static int hidinput_setup_battery(struct hid_device *dev, unsigned report_type,
-                                 struct hid_field *field, bool is_percentage)
-@@ -640,6 +655,12 @@ static void hidinput_cleanup_battery(struct hid_device *dev)
- static void hidinput_update_battery(struct hid_device *dev, int value)
- {
- }
-+
-+static bool hidinput_set_battery_charge_status(struct hid_device *dev,
-+                                             unsigned int usage, int value)
-+{
-+      return false;
-+}
- #endif        /* CONFIG_HID_BATTERY_STRENGTH */
- static bool hidinput_field_in_collection(struct hid_device *device, struct hid_field *field,
-@@ -1234,6 +1255,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
-                       hidinput_setup_battery(device, HID_INPUT_REPORT, field, true);
-                       usage->type = EV_PWR;
-                       return;
-+              case HID_BAT_CHARGING:
-+                      usage->type = EV_PWR;
-+                      return;
-               }
-               goto unknown;
-@@ -1476,7 +1500,11 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
-               return;
-       if (usage->type == EV_PWR) {
--              hidinput_update_battery(hid, value);
-+              bool handled = hidinput_set_battery_charge_status(hid, usage->hid, value);
-+
-+              if (!handled)
-+                      hidinput_update_battery(hid, value);
-+
-               return;
-       }
-@@ -2332,3 +2360,7 @@ void hidinput_disconnect(struct hid_device *hid)
-       cancel_work_sync(&hid->led_work);
- }
- EXPORT_SYMBOL_GPL(hidinput_disconnect);
-+
-+#ifdef CONFIG_HID_KUNIT_TEST
-+#include "hid-input-test.c"
-+#endif
-diff --git a/include/linux/hid.h b/include/linux/hid.h
-index 0a1ccc68e798a..70245a7695286 100644
---- a/include/linux/hid.h
-+++ b/include/linux/hid.h
-@@ -312,6 +312,7 @@ struct hid_item {
- #define HID_DG_LATENCYMODE    0x000d0060
- #define HID_BAT_ABSOLUTESTATEOFCHARGE 0x00850065
-+#define HID_BAT_CHARGING              0x00850044
- #define HID_VD_ASUS_CUSTOM_MEDIA_KEYS 0xff310076
-@@ -611,6 +612,7 @@ struct hid_device {                                                        /* device report descriptor */
-       __s32 battery_max;
-       __s32 battery_report_type;
-       __s32 battery_report_id;
-+      __s32 battery_charge_status;
-       enum hid_battery_status battery_status;
-       bool battery_avoid_query;
-       ktime_t battery_ratelimit_time;
--- 
-2.39.2
-
index 1df6d0504879a2dc61c1eeee9b91e916e592d342..b76362a7a091afe6a177b3a9d48e776500c762e8 100644 (file)
@@ -23,11 +23,9 @@ Reviewed-by: José Expósito <jose.exposito89@gmail.com>
 Signed-off-by: Jiri Kosina <jkosina@suse.cz>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/hid/Kconfig | 2 +-
+ drivers/hid/Kconfig |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
-index 644b4913d4d85..9ad5e43d9961b 100644
 --- a/drivers/hid/Kconfig
 +++ b/drivers/hid/Kconfig
 @@ -1262,7 +1262,7 @@ config HID_MCP2221
@@ -36,9 +34,6 @@ index 644b4913d4d85..9ad5e43d9961b 100644
        tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS
 -      depends on KUNIT=y
 +      depends on KUNIT
-       depends on HID_BATTERY_STRENGTH
        depends on HID_UCLOGIC
        default KUNIT_ALL_TESTS
--- 
-2.39.2
-
+       help
index e3d3c1889bed31ecc42da2c9f55546f7e3fa6b39..8dcbc12bdf372f75d411fe4bbe2fe8562763686b 100644 (file)
@@ -28,14 +28,12 @@ Reviewed-by: Hans de Goede <hdegoede@redhat.com>
 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/platform/x86/dell/dell-rbtn.c | 13 +++++++------
+ drivers/platform/x86/dell/dell-rbtn.c |   13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)
 
-diff --git a/drivers/platform/x86/dell/dell-rbtn.c b/drivers/platform/x86/dell/dell-rbtn.c
-index aa0e6c9074942..c8fcb537fd65d 100644
 --- a/drivers/platform/x86/dell/dell-rbtn.c
 +++ b/drivers/platform/x86/dell/dell-rbtn.c
-@@ -395,16 +395,16 @@ static int rbtn_add(struct acpi_device *device)
+@@ -395,16 +395,16 @@ static int rbtn_add(struct acpi_device *
                return -EINVAL;
        }
  
@@ -56,7 +54,7 @@ index aa0e6c9074942..c8fcb537fd65d 100644
        rbtn_data->type = type;
        device->driver_data = rbtn_data;
  
-@@ -420,10 +420,12 @@ static int rbtn_add(struct acpi_device *device)
+@@ -420,10 +420,12 @@ static int rbtn_add(struct acpi_device *
                break;
        default:
                ret = -EINVAL;
@@ -69,15 +67,12 @@ index aa0e6c9074942..c8fcb537fd65d 100644
 -
  }
  
- static void rbtn_remove(struct acpi_device *device)
-@@ -442,7 +444,6 @@ static void rbtn_remove(struct acpi_device *device)
+ static int rbtn_remove(struct acpi_device *device)
+@@ -442,7 +444,6 @@ static int rbtn_remove(struct acpi_devic
        }
  
        rbtn_acquire(device, false);
 -      device->driver_data = NULL;
- }
  
- static void rbtn_notify(struct acpi_device *device, u32 event)
--- 
-2.39.2
-
+       return 0;
+ }
index b42c6aac122d66f19f1f32e0701c0b65157763d8..1703d445db1066f7943b578fd1a041cb6cd6be14 100644 (file)
@@ -239,7 +239,6 @@ drm-amdkfd-fix-potential-deallocation-of-previously-.patch
 soc-mediatek-svs-fix-mt8192-gpu-node-name.patch
 drm-amd-display-fix-artifacting-on-edp-panels-when-e.patch
 drm-radeon-fix-possible-division-by-zero-errors.patch
-hid-input-map-battery-system-charging.patch
 hid-uclogic-modular-kunit-tests-should-not-depend-on.patch
 rdma-rxe-add-ibdev_dbg-macros-for-rxe.patch
 rdma-rxe-replace-pr_xxx-by-rxe_dbg_xxx-in-rxe_mw.c.patch
@@ -252,13 +251,6 @@ clk-imx-clk-imxrt1050-fix-memory-leak-in-imxrt1050_c.patch
 clk-imx-clk-imx8mn-fix-memory-leak-in-imx8mn_clocks_.patch
 clk-imx93-fix-memory-leak-and-missing-unwind-goto-in.patch
 clk-imx-clk-imx8mp-improve-error-handling-in-imx8mp_.patch
-clk-mediatek-mt8192-correctly-unregister-and-free-cl.patch
-clk-mediatek-mt8192-propagate-struct-device-for-gate.patch
-clk-mediatek-clk-gate-propagate-struct-device-with-m.patch
-clk-mediatek-clk-mtk-propagate-struct-device-for-com.patch
-clk-mediatek-clk-mux-propagate-struct-device-for-mtk.patch
-clk-mediatek-clk-mtk-extend-mtk_clk_simple_probe.patch
-clk-mediatek-fix-of_iomap-memory-leak.patch
 arm64-dts-qcom-sdm845-flush-rsc-sleep-wake-votes.patch
 arm64-dts-qcom-sm8250-edo-panel-framebuffer-is-2.5k-.patch
 clk-bcm-rpi-fix-off-by-one-in-raspberrypi_discover_c.patch
@@ -283,8 +275,6 @@ clk-si5341-check-return-value-of-devm_-kasprintf.patch
 clk-si5341-free-unused-memory-on-probe-failure.patch
 clk-keystone-sci-clk-check-return-value-of-kasprintf.patch
 clk-ti-clkctrl-check-return-value-of-kasprintf.patch
-clocking-wizard-support-higher-frequency-accuracy.patch
-clk-clocking-wizard-check-return-value-of-devm_kaspr.patch
 drivers-meson-secure-pwrc-always-enable-dma-domain.patch
 ovl-update-of-dentry-revalidate-flags-after-copy-up.patch
 asoc-imx-audmix-check-return-value-of-devm_kasprintf.patch
@@ -319,7 +309,6 @@ powerpc-signal32-force-inlining-of-__unsafe_save_use.patch
 perf-script-fix-allocation-of-evsel-priv-related-to-.patch
 platform-x86-thinkpad_acpi-fix-lkp-tests-warnings-fo.patch
 perf-dwarf-aux-fix-off-by-one-in-die_get_varname.patch
-acpi-make-remove-callback-of-acpi-driver-void.patch
 platform-x86-dell-dell-rbtn-fix-resources-leaking-on.patch
 perf-tool-x86-consolidate-is_amd-check-into-single-f.patch
 perf-tool-x86-fix-perf_env-memory-leak.patch
@@ -398,9 +387,6 @@ sh-j2-use-ioremap-to-translate-device-tree-address-i.patch
 usb-dwc2-platform-improve-error-reporting-for-proble.patch
 usb-dwc2-fix-some-error-handling-paths.patch
 serial-8250-omap-fix-freeing-of-resources-on-failed-.patch
-clk-qcom-mmcc-msm8974-use-array_size-instead-of-spec.patch
-clk-qcom-mmcc-msm8974-move-clock-parent-tables-down.patch
-clk-qcom-mmcc-msm8974-use-parent_hws-_data-instead-o.patch
 clk-qcom-mmcc-msm8974-remove-oxili_ocmemgx_clk.patch
 clk-qcom-camcc-sc7180-add-parent-dependency-to-all-c.patch
 clk-qcom-gcc-ipq6018-use-floor-ops-for-sdcc-clocks.patch