From patchwork Thu Oct 17 12:27:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11195575 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1F09714E5 for ; Thu, 17 Oct 2019 12:27:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DED172064B for ; Thu, 17 Oct 2019 12:27:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LFUgaeMd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502321AbfJQM1t (ORCPT ); Thu, 17 Oct 2019 08:27:49 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45027 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406117AbfJQM1s (ORCPT ); Thu, 17 Oct 2019 08:27:48 -0400 Received: by mail-pf1-f196.google.com with SMTP id q21so1553910pfn.11 for ; Thu, 17 Oct 2019 05:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=ILr9joUKye34Z5XuMa3tOX2NbCDB31U4gUj4EK9AjAc=; b=LFUgaeMdjVeFcNKERe9xHFpUZYWPcsn8/0qej7QjTdu5UabxWgRjnT6NzE3yRrQb6i LII1mzhB362FPr3U6rvDWoFg2f/Ll4TxW4TRRPhwIQRA161dxfolDo7NUFRjWLIfMIEa IzBLeDnElE12GG44AQ9OP95rnWvjhVto1pY4aqXrWR2pAWGNy85FFXsRXXqcCXThQuXd dBWszGjkGGA3X4B3G2qLLGnKthf1JvgwwCV9DI/pgLmGfJHiwrvy5sPsucbnfYOQzgA9 4QXz7LhTzFXowaAPOxY2PnXfBkM4DEo2kzvS7LaLk3+aVYy7JE91a2H3FEeul8C7oe0r gSVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=ILr9joUKye34Z5XuMa3tOX2NbCDB31U4gUj4EK9AjAc=; b=e6lLohWn5FSXEiB1/ZglxmQsVX63OyqCq4058TWWZeA0+WMsxCUaSnZiy3buLC1RU7 HRglALcMX6G2bn2EyUR1GtVKgK4KPrtj+2VJGrSVhcWUOVey65ptYp103Dr2C2iRMIiA RdEsGprFZMGSuK/6N4+qJbJ8rVkqZvJlKPrhQFFTXAgCaqJJYvHsBzU9HRNLcFskds4K wo+ib8IZ7Yy8H441XPIIhu1y31pjBReY656uxq2b9FZarTkmHe7kMV7HISGE+x18QdZq XHpntJcVJndW+WWiR7pa69XInCCZ7ji9XSMrg2HRneZNFGPh7cOsI3bewcX3UJwgkcaT r4Iw== X-Gm-Message-State: APjAAAVNglq3YXGAffcDDGAgy0aNlIJ0aJxHxoZAhTQ8SfUFl5Lp3vcW 05rfI1Mw4nPdD3AhXru+ohUAUw== X-Google-Smtp-Source: APXvYqy5uEgxPYOkmUJWAWdV5xV2aaKIGmNBY8acLpKp4r+NJadQlG+OI6nX8HZ0H4ECLRJmKxketA== X-Received: by 2002:a17:90a:aa97:: with SMTP id l23mr4002710pjq.7.1571315267761; Thu, 17 Oct 2019 05:27:47 -0700 (PDT) Received: from localhost ([49.248.54.231]) by smtp.gmail.com with ESMTPSA id ep10sm15468221pjb.2.2019.10.17.05.27.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 05:27:47 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Amit Kucheria , Zhang Rui Cc: linux-doc@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v3 1/6] thermal: Remove netlink support Date: Thu, 17 Oct 2019 17:57:33 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org There are no users of netlink messages for thermal inside the kernel. Remove the code and adjust the documentation. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- .../driver-api/thermal/sysfs-api.rst | 26 +---- drivers/thermal/thermal_core.c | 107 +----------------- include/linux/thermal.h | 11 -- 3 files changed, 10 insertions(+), 134 deletions(-) diff --git a/Documentation/driver-api/thermal/sysfs-api.rst b/Documentation/driver-api/thermal/sysfs-api.rst index fab2c9b36d08..b40b1f839148 100644 --- a/Documentation/driver-api/thermal/sysfs-api.rst +++ b/Documentation/driver-api/thermal/sysfs-api.rst @@ -725,24 +725,10 @@ method, the sys I/F structure will be built like this:: |---temp1_input: 37000 |---temp1_crit: 100000 -4. Event Notification +4. Export Symbol APIs ===================== -The framework includes a simple notification mechanism, in the form of a -netlink event. Netlink socket initialization is done during the _init_ -of the framework. Drivers which intend to use the notification mechanism -just need to call thermal_generate_netlink_event() with two arguments viz -(originator, event). The originator is a pointer to struct thermal_zone_device -from where the event has been originated. An integer which represents the -thermal zone device will be used in the message to identify the zone. The -event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL, -THERMAL_DEV_FAULT}. Notification can be sent when the current temperature -crosses any of the configured thresholds. - -5. Export Symbol APIs -===================== - -5.1. get_tz_trend +4.1. get_tz_trend ----------------- This function returns the trend of a thermal zone, i.e the rate of change @@ -751,14 +737,14 @@ are supposed to implement the callback. If they don't, the thermal framework calculated the trend by comparing the previous and the current temperature values. -5.2. get_thermal_instance +4.2. get_thermal_instance ------------------------- This function returns the thermal_instance corresponding to a given {thermal_zone, cooling_device, trip_point} combination. Returns NULL if such an instance does not exist. -5.3. thermal_notify_framework +4.3. thermal_notify_framework ----------------------------- This function handles the trip events from sensor drivers. It starts @@ -768,14 +754,14 @@ and does actual throttling for other trip points i.e ACTIVE and PASSIVE. The throttling policy is based on the configured platform data; if no platform data is provided, this uses the step_wise throttling policy. -5.4. thermal_cdev_update +4.4. thermal_cdev_update ------------------------ This function serves as an arbitrator to set the state of a cooling device. It sets the cooling device to the deepest cooling state if possible. -6. thermal_emergency_poweroff +5. thermal_emergency_poweroff ============================= On an event of critical trip temperature crossing. Thermal framework diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index d4481cc8958f..d21b754baee2 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #define CREATE_TRACE_POINTS @@ -1464,97 +1462,6 @@ struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name) } EXPORT_SYMBOL_GPL(thermal_zone_get_zone_by_name); -#ifdef CONFIG_NET -static const struct genl_multicast_group thermal_event_mcgrps[] = { - { .name = THERMAL_GENL_MCAST_GROUP_NAME, }, -}; - -static struct genl_family thermal_event_genl_family __ro_after_init = { - .module = THIS_MODULE, - .name = THERMAL_GENL_FAMILY_NAME, - .version = THERMAL_GENL_VERSION, - .maxattr = THERMAL_GENL_ATTR_MAX, - .mcgrps = thermal_event_mcgrps, - .n_mcgrps = ARRAY_SIZE(thermal_event_mcgrps), -}; - -int thermal_generate_netlink_event(struct thermal_zone_device *tz, - enum events event) -{ - struct sk_buff *skb; - struct nlattr *attr; - struct thermal_genl_event *thermal_event; - void *msg_header; - int size; - int result; - static unsigned int thermal_event_seqnum; - - if (!tz) - return -EINVAL; - - /* allocate memory */ - size = nla_total_size(sizeof(struct thermal_genl_event)) + - nla_total_size(0); - - skb = genlmsg_new(size, GFP_ATOMIC); - if (!skb) - return -ENOMEM; - - /* add the genetlink message header */ - msg_header = genlmsg_put(skb, 0, thermal_event_seqnum++, - &thermal_event_genl_family, 0, - THERMAL_GENL_CMD_EVENT); - if (!msg_header) { - nlmsg_free(skb); - return -ENOMEM; - } - - /* fill the data */ - attr = nla_reserve(skb, THERMAL_GENL_ATTR_EVENT, - sizeof(struct thermal_genl_event)); - - if (!attr) { - nlmsg_free(skb); - return -EINVAL; - } - - thermal_event = nla_data(attr); - if (!thermal_event) { - nlmsg_free(skb); - return -EINVAL; - } - - memset(thermal_event, 0, sizeof(struct thermal_genl_event)); - - thermal_event->orig = tz->id; - thermal_event->event = event; - - /* send multicast genetlink message */ - genlmsg_end(skb, msg_header); - - result = genlmsg_multicast(&thermal_event_genl_family, skb, 0, - 0, GFP_ATOMIC); - if (result) - dev_err(&tz->device, "Failed to send netlink event:%d", result); - - return result; -} -EXPORT_SYMBOL_GPL(thermal_generate_netlink_event); - -static int __init genetlink_init(void) -{ - return genl_register_family(&thermal_event_genl_family); -} - -static void genetlink_exit(void) -{ - genl_unregister_family(&thermal_event_genl_family); -} -#else /* !CONFIG_NET */ -static inline int genetlink_init(void) { return 0; } -static inline void genetlink_exit(void) {} -#endif /* !CONFIG_NET */ - static int thermal_pm_notify(struct notifier_block *nb, unsigned long mode, void *_unused) { @@ -1601,19 +1508,15 @@ static int __init thermal_init(void) mutex_init(&poweroff_lock); result = thermal_register_governors(); if (result) - goto error; + goto init_exit; result = class_register(&thermal_class); if (result) goto unregister_governors; - result = genetlink_init(); - if (result) - goto unregister_class; - result = of_parse_thermal_zones(); if (result) - goto exit_netlink; + goto exit_zone_parse; result = register_pm_notifier(&thermal_pm_nb); if (result) @@ -1622,13 +1525,11 @@ static int __init thermal_init(void) return 0; -exit_netlink: - genetlink_exit(); -unregister_class: +exit_zone_parse: class_unregister(&thermal_class); unregister_governors: thermal_unregister_governors(); -error: +init_exit: ida_destroy(&thermal_tz_ida); ida_destroy(&thermal_cdev_ida); mutex_destroy(&thermal_list_lock); diff --git a/include/linux/thermal.h b/include/linux/thermal.h index e45659c75920..d9111aebb97d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -544,15 +544,4 @@ static inline void thermal_notify_framework(struct thermal_zone_device *tz, { } #endif /* CONFIG_THERMAL */ -#if defined(CONFIG_NET) && IS_ENABLED(CONFIG_THERMAL) -extern int thermal_generate_netlink_event(struct thermal_zone_device *tz, - enum events event); -#else -static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz, - enum events event) -{ - return 0; -} -#endif - #endif /* __THERMAL_H__ */ From patchwork Thu Oct 17 12:27:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11195579 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80DA113BD for ; Thu, 17 Oct 2019 12:27:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E8492064B for ; Thu, 17 Oct 2019 12:27:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="H8ydhIBW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389885AbfJQM1x (ORCPT ); Thu, 17 Oct 2019 08:27:53 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39211 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502318AbfJQM1w (ORCPT ); Thu, 17 Oct 2019 08:27:52 -0400 Received: by mail-pf1-f195.google.com with SMTP id v4so1569137pff.6 for ; Thu, 17 Oct 2019 05:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=J2+dIH77bj5pUXUsovECtUNC+eDZQzRNadhd1RCEVqs=; b=H8ydhIBW4Hdav4jAbhdZFLfJHJ/rNTYXcPXSEpoc1DBwisHhHI2hsG9clVYOgLtj5Q lwx83X6r3G55GLeR9g55BvIxOwYOzNyZeHAmUKLgPyo5rPoXK0lxel4Nrp+YnCViHgNS GtvuCSCCb51pgg5WL64XgulygN4+2/iTQa39xCZjpAkuwLrkRehJR9O2DPH8k/F1ARfs IRPkGRYPhsEr5qrRWF7lytjQ7cNCDA0S2kJDoVsXnh8lSVkgwkN6YNmstydqRPPieqpw C3OsKtmoRM2XSUxCOT+zeAfxj7MuKI+45kSs77GROL4WWApel3iJZTmUv+RsR+Q+WMpb Y2Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=J2+dIH77bj5pUXUsovECtUNC+eDZQzRNadhd1RCEVqs=; b=Rwa2m6qPY2C2GhEWVBvydxhLK4P+kYzEtrQecIks5TRoGq7qcWEbVFa381157eEtm1 MrAB1YT34r0h1GiboALGzP660vISVgBcsK+CvV2S3i7CC6wDn/mt6bW6yROo6w6eKToE FSTzW7Vf3frrQ1uUd+V4I2RtCbDgiO5UyQqqbI9tugt6IDFPywDqxQ3F2fiXWC1LOi03 MtJu9kJSaVVYPrASrkqnB/MzfDpz1POUVdfwUQEkBkEO4vvWaJZ5u/AMYIrGj/zZLmrO Tu1ctnA7E/bjxmex858KOI+cEMelp5242c/z+2LC/bqzSO+YxSLX3mg6b75YmpF515GU lc4A== X-Gm-Message-State: APjAAAUNtODHJmq2OEuixDfKmmBihfvs2CuxjSXie2AzWbLDGOydE0TK LqW7Rv1iD15JupldTPhV6xc93g== X-Google-Smtp-Source: APXvYqzmKwMCQLucBl0CUBU8zqp2eDcOrDP2n0WXsN6rWk8R0BxLYnGg7GBjIvPXLmEI1tpdhJpSDw== X-Received: by 2002:a63:1f25:: with SMTP id f37mr3859122pgf.50.1571315271392; Thu, 17 Oct 2019 05:27:51 -0700 (PDT) Received: from localhost ([49.248.54.231]) by smtp.gmail.com with ESMTPSA id q76sm4615049pfc.86.2019.10.17.05.27.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 05:27:50 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Amit Kucheria , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v3 2/6] thermal: Initialize thermal subsystem earlier Date: Thu, 17 Oct 2019 17:57:34 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Now that the thermal framework is built-in, in order to facilitate thermal mitigation as early as possible in the boot cycle, move the thermal framework initialization to core_initcall. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/thermal/thermal_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index d21b754baee2..d8251d723459 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1537,4 +1537,5 @@ static int __init thermal_init(void) mutex_destroy(&poweroff_lock); return result; } -fs_initcall(thermal_init); + +core_initcall(thermal_init); From patchwork Thu Oct 17 12:27:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11195595 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4F6B13B1 for ; Thu, 17 Oct 2019 12:28:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A40D221A4C for ; Thu, 17 Oct 2019 12:28:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SW53kbOH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502349AbfJQM15 (ORCPT ); Thu, 17 Oct 2019 08:27:57 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:36767 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502345AbfJQM14 (ORCPT ); Thu, 17 Oct 2019 08:27:56 -0400 Received: by mail-pl1-f193.google.com with SMTP id j11so1069368plk.3 for ; Thu, 17 Oct 2019 05:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=F14E7+MnIlpQiExL8cWFs9niwCwKQjYO3IRinn+L/UE=; b=SW53kbOHuCdPg1DuOx63gq8I1iayGlxonA/1rDDbCiItozWianEK9QISjChUx+Xq7Q GNYKWlPIzJcJ+AqJ0dGEwruPuFWCXQlSD5LKyvrMFAT4QUreATzVtl5KT0Tn5lfXwqOO vLizgueqTBOf3dfRa28LH03rBDpHE/MWvmeVTSivYW67EMCfmo82FA+xFzijO9BhEUEM CP51IPGhliOBPBQJI6CNSUMoG4bS6jYpo53QOvQQRtg7NsJs4xsLhkFX5fH/04mJU9tm IEOveG5+RCVMGYpnOIfyvnAmD1ktwtEW8TOdKho+eZLTGahRrwtZBjTlKUimtOEEv31t c9WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=F14E7+MnIlpQiExL8cWFs9niwCwKQjYO3IRinn+L/UE=; b=WmrD93MEkzlPEPIzQexKwx6aBlR8e2pRfdSEj+3uCeqV6h569t0LuUgsFdS40n+W7l gnIH4iSdBgeiISsp3WwoEVx7Q6/G+3GXv6ycAkNKvm21kNACE+w2BrLoYJ9DShOf9l9O BngdnkSBKOLdc74o9mGJs70Mm09UR+SQ/X2CHXpOxkLbdLH3oJiXAVV+guJ5QHgtu/X+ nlPqxQKqNhDzXYJcvlGB7JDh8FetP1/ctjwzY1+mWOUJhmpk63ZtAH2OUEq+uGdEyRs2 mHmfDgrT4VTyg8aI48/USzbLS1dMUgRnd7A/dmbc+D5r7Kx2h4fY/OXPq7rLXM8wevAZ 94zA== X-Gm-Message-State: APjAAAUBKBmxyTrTjU4V3J2YKofS+8qiURbLi4Dt4IuA2q0OWbsOovRD ScLPYZZ3+ay6+27cnQOvwq+jhQ== X-Google-Smtp-Source: APXvYqxPkJnxEr/SitV6b1LTVPecxRv9RdR/8xgTjWWMcFC4xoO2obdw5qvD+7daSHAfkLTb8+Wwqw== X-Received: by 2002:a17:902:9a93:: with SMTP id w19mr3590819plp.316.1571315275379; Thu, 17 Oct 2019 05:27:55 -0700 (PDT) Received: from localhost ([49.248.54.231]) by smtp.gmail.com with ESMTPSA id x72sm3907375pfc.89.2019.10.17.05.27.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 05:27:54 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Amit Kucheria , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v3 3/6] cpufreq: Initialise the governors in core_initcall Date: Thu, 17 Oct 2019 17:57:35 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Initialise the cpufreq governors earlier to allow for earlier performance control during the boot process. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_ondemand.c | 2 +- drivers/cpufreq/cpufreq_performance.c | 2 +- drivers/cpufreq/cpufreq_powersave.c | 2 +- drivers/cpufreq/cpufreq_userspace.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index b66e81c06a57..737ff3b9c2c0 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -346,7 +346,7 @@ struct cpufreq_governor *cpufreq_default_governor(void) return CPU_FREQ_GOV_CONSERVATIVE; } -fs_initcall(cpufreq_gov_dbs_init); +core_initcall(cpufreq_gov_dbs_init); #else module_init(cpufreq_gov_dbs_init); #endif diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index dced033875bf..82a4d37ddecb 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -483,7 +483,7 @@ struct cpufreq_governor *cpufreq_default_governor(void) return CPU_FREQ_GOV_ONDEMAND; } -fs_initcall(cpufreq_gov_dbs_init); +core_initcall(cpufreq_gov_dbs_init); #else module_init(cpufreq_gov_dbs_init); #endif diff --git a/drivers/cpufreq/cpufreq_performance.c b/drivers/cpufreq/cpufreq_performance.c index aaa04dfcacd9..def9afe0f5b8 100644 --- a/drivers/cpufreq/cpufreq_performance.c +++ b/drivers/cpufreq/cpufreq_performance.c @@ -50,5 +50,5 @@ MODULE_AUTHOR("Dominik Brodowski "); MODULE_DESCRIPTION("CPUfreq policy governor 'performance'"); MODULE_LICENSE("GPL"); -fs_initcall(cpufreq_gov_performance_init); +core_initcall(cpufreq_gov_performance_init); module_exit(cpufreq_gov_performance_exit); diff --git a/drivers/cpufreq/cpufreq_powersave.c b/drivers/cpufreq/cpufreq_powersave.c index c143dc237d87..1ae66019eb83 100644 --- a/drivers/cpufreq/cpufreq_powersave.c +++ b/drivers/cpufreq/cpufreq_powersave.c @@ -43,7 +43,7 @@ struct cpufreq_governor *cpufreq_default_governor(void) return &cpufreq_gov_powersave; } -fs_initcall(cpufreq_gov_powersave_init); +core_initcall(cpufreq_gov_powersave_init); #else module_init(cpufreq_gov_powersave_init); #endif diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c index cbd81c58cb8f..b43e7cd502c5 100644 --- a/drivers/cpufreq/cpufreq_userspace.c +++ b/drivers/cpufreq/cpufreq_userspace.c @@ -147,7 +147,7 @@ struct cpufreq_governor *cpufreq_default_governor(void) return &cpufreq_gov_userspace; } -fs_initcall(cpufreq_gov_userspace_init); +core_initcall(cpufreq_gov_userspace_init); #else module_init(cpufreq_gov_userspace_init); #endif From patchwork Thu Oct 17 12:27:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11195591 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C02C14E5 for ; Thu, 17 Oct 2019 12:28:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3ACD72089C for ; Thu, 17 Oct 2019 12:28:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="egK4qvYj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502360AbfJQM2A (ORCPT ); Thu, 17 Oct 2019 08:28:00 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:44397 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502358AbfJQM17 (ORCPT ); Thu, 17 Oct 2019 08:27:59 -0400 Received: by mail-pg1-f193.google.com with SMTP id e10so1265156pgd.11 for ; Thu, 17 Oct 2019 05:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Dxo5X+E9Ol1EaiMF1ZycTVksoTfNCn6yYqPoCwK1ut0=; b=egK4qvYjE7EBixFsyZw/Kr078NfjAaHkhTpbfmT1U8TUKYQS3TWhZar7iJge8A07DK sU5cpQuotBcsaO4hCkFmOhPY4FbwLuQQd5m0yXzMcvo+Z69ZOXqN3BdJr2IRKQYu7vCp K9ScS/0a9YyM8Tbd2gkLDTPN/49QzDpGta13xl6ZRzPqnGn3vmMwJQHkR4SYu1b198ho KdjwHZKZZwzew3KwyZ4tYS3rNUjoJBb7eAcf+PRl70qDYOzmOMpzxBKtUDNX4wnNYRNB DmtCOTZLc81gvkP/WIFXEi6syWHVXvfPUG9JjfK3ScoMSMcs3xwFeFyeyUgAULQ653oh 693Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=Dxo5X+E9Ol1EaiMF1ZycTVksoTfNCn6yYqPoCwK1ut0=; b=L4wQTcVaKqdiEySorE+g0O/PBWzz0qnMDRoqZLASafxm1VAgH11s9i2PSa3jVrtSVS /aF68J0CRT657zt0BKaB4DHDJ8HoM/GEL70ESZXftZrKCfUtG3nB5v67BsFXl5/U/30P hQg0L083iHfPm00xygzQyRLaLKkDCZ3jj3NafTduEQXsKrdY3Yhc7H4AJ4xvXR7I68vQ SX2IrOb+PHSngW7HJzbGQkBM6mn5bQrdT3G/E9VT2FF7KzHl0cxIY5bUbdLylbX6Cenz dA8XicbzStTmQAZh5YUaZTZy72lRbLAcVfPuh4+5y9ZqfePPgXFUob40lyguUBZOqHVN P/cA== X-Gm-Message-State: APjAAAW/m/s83FQTrQH4p+RPd/zTKtg2jId02PJvDeoSRSi6OLKg4G4t oXTvVIy5whxaPglz++WxSa2HNA== X-Google-Smtp-Source: APXvYqzGLzD52zmSKxtJBG7Fgaht2Hci65RkrcVoI3J604NgxX1LNv5xLN76oaaOe048MuUDrfH3EQ== X-Received: by 2002:a65:689a:: with SMTP id e26mr3852060pgt.346.1571315279010; Thu, 17 Oct 2019 05:27:59 -0700 (PDT) Received: from localhost ([49.248.54.231]) by smtp.gmail.com with ESMTPSA id 207sm2692918pfu.129.2019.10.17.05.27.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 05:27:58 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Amit Kucheria , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v3 4/6] cpufreq: Initialize cpufreq-dt driver earlier Date: Thu, 17 Oct 2019 17:57:36 +0530 Message-Id: <9e2bce44ed6bf3aac2354650fc3bf5c43e2155b0.1571314830.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This allows HW drivers that depend on cpufreq-dt to initialise earlier. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c index bca8d1f47fd2..3282defe14d4 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -180,4 +180,4 @@ static int __init cpufreq_dt_platdev_init(void) -1, data, sizeof(struct cpufreq_dt_platform_data))); } -device_initcall(cpufreq_dt_platdev_init); +core_initcall(cpufreq_dt_platdev_init); From patchwork Thu Oct 17 12:27:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11195583 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A796113BD for ; Thu, 17 Oct 2019 12:28:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 86D64222C5 for ; Thu, 17 Oct 2019 12:28:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="k9hgU7NH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393629AbfJQM2F (ORCPT ); Thu, 17 Oct 2019 08:28:05 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41820 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391665AbfJQM2E (ORCPT ); Thu, 17 Oct 2019 08:28:04 -0400 Received: by mail-pg1-f195.google.com with SMTP id t3so1274414pga.8 for ; Thu, 17 Oct 2019 05:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=yAYxsDoF1xODxjQtRc8reB4aVCGjGyEgdApmFBnl6Wc=; b=k9hgU7NHph1qugDb4UYF1VcEpVVzTOUeZX+19VID6ZcwkAdvKbRfvm/jXaLFkFtFL7 Z5LgfHWmMv+oA1SvgK8tZ095jKiFqZ63kU8dXbAXxEaplEIGfTO5Ef6VNW+jWzD+D4O2 q1BqPUK3KoV2Sp87Ha4ePXWPvRky1jMljuordFeWKJagkqzLLWMf/85OmP7OVbG7mC/y bbL9jJj3+IUrcBN/OVP167HGInDbjXqZfoSqzXYiBn8OzM7aYgjriAkydjZ5xLGuHfCK T+mHRMhSUS98vkShSgrwXfs8KuSG4OzIiVLft2C9h+z6aqoWYko65JWjC4rvpjM6SJO4 KIPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=yAYxsDoF1xODxjQtRc8reB4aVCGjGyEgdApmFBnl6Wc=; b=EEYCp/nZoQhheK3OHtjg8F+PvvfkM6HV8wEegaPQ19ST/ucuwAp1Y0ugoY8zzkMSZw YklCwGfYfiLMz2R4WkPg/cZmgAHDuYWvOBy61N0NtvwDKGgLi2c4w00MSG6wCgqlm7PY mG7mDMftxyWzWsmCNR5d16WopxWS88sBf2e3atiT9e2JXwR1yvhZEI7U6597CIBQb07q 5yT48+/k7P3rSmODiUGN3wS7x5TqqIy92a26cDjD09dFJ8yK57uNecel20Mfys9yCTcp 9XCrWVEh8wH/0x7dy1QWjepD+3NhKnptB0CwaI0RMb/WWj9oqICSoO+xB48SvYQ4t4zG b/xQ== X-Gm-Message-State: APjAAAUUOcHQTVloJIWEVcGitnueEAJLkAoXy8tcwX5llChezARKHcrs nDnkNr/lWb12cxhH8cUeJD9bZg== X-Google-Smtp-Source: APXvYqxaZh8/ei0rPhsoRdu1VBjPfaM2CXh2uqx/mMhcODGqPoZ2pD9tiWHEa37Y2f+Z63fPGhU8rw== X-Received: by 2002:a63:2dc1:: with SMTP id t184mr3823889pgt.196.1571315282768; Thu, 17 Oct 2019 05:28:02 -0700 (PDT) Received: from localhost ([49.248.54.231]) by smtp.gmail.com with ESMTPSA id y7sm3033120pfn.142.2019.10.17.05.28.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 05:28:02 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Amit Kucheria , Zhang Rui Cc: linux-clk@vger.kernel.org Subject: [PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier Date: Thu, 17 Oct 2019 17:57:37 +0530 Message-Id: <5f1ca3bfc45e268f7f9f6e091ba13b8103fb4304.1571314830.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we can have earlier access to cpufreq during booting. Signed-off-by: Amit Kucheria Acked-by: Stephen Boyd --- drivers/clk/qcom/clk-rpmh.c | 2 +- drivers/clk/qcom/gcc-qcs404.c | 2 +- drivers/clk/qcom/gcc-sdm845.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index 96a36f6ff667..20d4258f125b 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -487,7 +487,7 @@ static int __init clk_rpmh_init(void) { return platform_driver_register(&clk_rpmh_driver); } -subsys_initcall(clk_rpmh_init); +core_initcall(clk_rpmh_init); static void __exit clk_rpmh_exit(void) { diff --git a/drivers/clk/qcom/gcc-qcs404.c b/drivers/clk/qcom/gcc-qcs404.c index bd32212f37e6..9b0c4ce2ef4e 100644 --- a/drivers/clk/qcom/gcc-qcs404.c +++ b/drivers/clk/qcom/gcc-qcs404.c @@ -2855,7 +2855,7 @@ static int __init gcc_qcs404_init(void) { return platform_driver_register(&gcc_qcs404_driver); } -subsys_initcall(gcc_qcs404_init); +core_initcall(gcc_qcs404_init); static void __exit gcc_qcs404_exit(void) { diff --git a/drivers/clk/qcom/gcc-sdm845.c b/drivers/clk/qcom/gcc-sdm845.c index 95be125c3bdd..49dcff1af2db 100644 --- a/drivers/clk/qcom/gcc-sdm845.c +++ b/drivers/clk/qcom/gcc-sdm845.c @@ -3628,7 +3628,7 @@ static int __init gcc_sdm845_init(void) { return platform_driver_register(&gcc_sdm845_driver); } -subsys_initcall(gcc_sdm845_init); +core_initcall(gcc_sdm845_init); static void __exit gcc_sdm845_exit(void) { From patchwork Thu Oct 17 12:27:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11195593 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8660913BD for ; Thu, 17 Oct 2019 12:28:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6531321D7A for ; Thu, 17 Oct 2019 12:28:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CXTEhQJB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393750AbfJQM2M (ORCPT ); Thu, 17 Oct 2019 08:28:12 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:32806 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393817AbfJQM2I (ORCPT ); Thu, 17 Oct 2019 08:28:08 -0400 Received: by mail-pg1-f196.google.com with SMTP id i76so1296576pgc.0 for ; Thu, 17 Oct 2019 05:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=smRwPgvncTjnAR1YtPvLb1bA4/kxUscSlcxDGMtB+pk=; b=CXTEhQJBPSdCMw+IoywZVcKHtNxz/LdSoAfySQJBtoF3why8XyOtLveH0F98ftlzbg lGN1tXAB5pOEi228FfTu3mTnbXXgzEL8jxCzcBQNqxu2Z8iqUYLRzTfa20NlNC2uWZ1A csJXKyMDgWRqHhEHI3FWP4EE7cwtkQ6TyPV0ntYhcX+uT1/ULigN1FbKODf9k4HqW+nx s1fLpu7h7BX13D552cMBe2TzriGx4y8IjiEFvEIpuM9W2e9wMrAOZlCFxB7Z3qrlIFgN NsDhWCfxagZcFmKo4ORUuv9OA75QRv2XeYORTsFjVx57Kj0GcbMHNK+j7izjMyYer3UC Hb2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=smRwPgvncTjnAR1YtPvLb1bA4/kxUscSlcxDGMtB+pk=; b=QwbnS+pvTUi97uUnPQFNRKIVfKUKEG/m0CygWGmCG+r+p7eLRwat7tLcuIldFv+mwS YKpIW5Vr2oqNaOZF++qX972fqXJeIGdmRRA0Zyr1O561r8FmgwxMBuzS7NPnphroiAy2 b1ChJD0ktO8sz1/tV2XvV+/ZhotX1PSdzEaMB9aq5usZBAmHwqqPITuoXaufsyOnwpz+ IbYpJVvidBDDXnAcHhhEdKLHOL6qkLxXG6pBz3WB3CG8XSbVKfYpycdRhPkdRItpEgZN QNUp8r56FT6kBl/8e0sQ9EYOE8VOhdn+i7qDq0En7omR1ODTtdh/9svqPg3VxNwZy5on F0xg== X-Gm-Message-State: APjAAAWXS5x2LNIqYj97H1UfBbgy67FOn7W1Qe5GoF6b7QseWdXyqEWS x8y6j6Pk/Qz2dXPZaAO+iCUzCg== X-Google-Smtp-Source: APXvYqwv1uq5A9qIqW0buX8pAXgbhIdbQCV4Xyis8lzdNFPlH5cGLHz39J+R4PxT0WHConQkAoKbvg== X-Received: by 2002:a62:7643:: with SMTP id r64mr3573835pfc.106.1571315286536; Thu, 17 Oct 2019 05:28:06 -0700 (PDT) Received: from localhost ([49.248.54.231]) by smtp.gmail.com with ESMTPSA id c128sm2897104pfc.166.2019.10.17.05.28.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 05:28:05 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Amit Kucheria , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v3 6/6] cpufreq: qcom-hw: Move driver initialisation earlier Date: Thu, 17 Oct 2019 17:57:38 +0530 Message-Id: <3468b8cf9c764ea139296ee149d33cd7a9d79e3e.1571314830.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Allow qcom-hw driver to initialise right after the cpufreq and thermal subsystems are initialised in core_initcall so we get earlier access to thermal mitigation. Signed-off-by: Amit Kucheria Acked-by: Daniel Lezcano Acked-by: Taniya Das --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index a9ae2f84a4ef..fc92a8842e25 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -334,7 +334,7 @@ static int __init qcom_cpufreq_hw_init(void) { return platform_driver_register(&qcom_cpufreq_hw_driver); } -device_initcall(qcom_cpufreq_hw_init); +postcore_initcall(qcom_cpufreq_hw_init); static void __exit qcom_cpufreq_hw_exit(void) {