From patchwork Thu Mar 26 22:44:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 184937 Delivered-To: patches@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp616647ilr; Thu, 26 Mar 2020 15:45:06 -0700 (PDT) X-Received: by 2002:a17:90a:1b42:: with SMTP id q60mr2583067pjq.84.1585262706629; Thu, 26 Mar 2020 15:45:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585262706; cv=none; d=google.com; s=arc-20160816; b=VWcAZj2pv7q85FwjkZn7RNrYbTmqAJVcxoPjqvqXNGitDd5Id5pCopY6UgY+ALQodL up4gsQ8F83q8+5ZqnqxmAKYW9HgG8h/EOyWT4FAZ+kNSobwdQDxOYXStCXpZ1V5jaF4c iCYGcZ5OxBq4p/wLZxeXopvbtbd6jAupnTNBVZYc9uSeKeAdUmgshkkVzUhrq6rhcT6Y 7C0ouUKdO8l6XeLndfmwaF71UUul4CAmP/JN5fBOVdjfxhE1GiJtoqdxUROMZ1P608j0 EDBQ6fiB90nlQBMB+/eodSeo3L2rmsXCvTZlTbd3SL3cNdtLvJgudKzNbuOeGkN/Y/Pp Qzkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uXFWCA6HsRoFU7UHbCkibQyhhxiptzgR3ncwTu65yOs=; b=azsbXrd05d5JYjyvEceeaZz4VL46EUyKiVcw5c/P88kriVwJuRUSy5BGGgs5jryyqA dsN2MloAbL/3m7v5jLWcKOaw3TMOHDXgQdet5Ceyfr9Dmw45mBtBpGluuJWV8Kcg8M7M lYcAmf4HxBwgntpkFV0qxinfuTcE45t4HaNmyTSzO7A4v9k4ZdXNlQb+rOUB7/KedyCs RVwf8gLgyxln+7chJ0Mnjax3KxCwZatpeoO/V8hZZLBqNJiyfaux4p4es9TQgNud+HPO b6sUZehPABr2Ie1Z1g98DkHP+tFepqfV4fzNfcpbVuVhv+/kA7cUXfGgifDggom7BmH5 HunA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b6EBDV5D; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id i64sor4608043pgd.58.2020.03.26.15.45.06 for (Google Transport Security); Thu, 26 Mar 2020 15:45:06 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b6EBDV5D; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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; bh=uXFWCA6HsRoFU7UHbCkibQyhhxiptzgR3ncwTu65yOs=; b=b6EBDV5D14KVHV3wD3Ol5xWcqk/VSycmLNDdgJZ9srR1xMjA8/P+83qr06g+dwDBF3 tpkK0HVrqwYlyhyNs/6Fb9jrYz1YUFN1U7dIz0f2lGUMngq8+meZbD8zi0FnI1x2ZtmN 1NWQpNJL3NrsmF2m+TgTg8rdjT0TVisGMeu9gwy2G1GFTZHLc7kKDbJT2g0kdR4dBT1K G/YP2FpEUoY6ZLU2tq9MsyfKtUB3dyAVMgzesmCp+jCzo7yLR7Vu2OCfOFWCzzioei41 GEZmdwuTUB+wOIx8RY0OI4BaDASpGUy6JVpuOmO70/NECorFsuLdy/35S5QODhrSfwKD o/Bg== 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; bh=uXFWCA6HsRoFU7UHbCkibQyhhxiptzgR3ncwTu65yOs=; b=F+ZLpjW4ilkEhWGbsvRNIhPy9fYdJAK+SzYDi1kO3YJG5DTIULsS9VJFgbj+R+XaqP C9evlWbZpkVFcudDByVU3xEVoJoA2H7vHotBJIpdjCJ09ve9N7jc/FVFIxjk23hEy/Li snNJmgu7TgGjj+rpkLF6tNzOQHtNPsU5YfNE5B9xnefPr6Qgc1zvUrZKCdUEWPRDLERr kgWlcA9l8BGmP9gb2nE6MMGCghLbubMejfLXCbBvT5b1nQ7IEZeR/nl9Vzinbh4Z7Ggc KZEf/pSZGxswmDf8aBicAZVO4JL1IAXlCxD0QFQx0GrEKORexK4E/vRYj3UESY3YBE1b e/ZA== X-Gm-Message-State: ANhLgQ2mJh1/f0hEd0kDJKwaJF7+AEBBSaa9FdrHcBK5J4c85vs4UCbI bXI50Q0sMyeLM4T0oq3Z/AME6Kdd X-Google-Smtp-Source: ADFU+vu9KGqoAE4crBP4wJCZ1UO5CXpzN5sdzapPizXKKa7HM9pL5RtmXtBOe7hYseU2KlJwcR0Mww== X-Received: by 2002:a63:60d:: with SMTP id 13mr10693526pgg.151.1585262706292; Thu, 26 Mar 2020 15:45:06 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id g10sm2592788pfk.90.2020.03.26.15.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 15:45:05 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Todd Kjos , Saravana Kannan , Andy Gross , Bjorn Andersson , Rajendra Nayak , linux-arm-msm@vger.kernel.org Subject: [PATCH v3 3/3] soc: qcom: rpmhpd: Allow RPMHPD driver to be loaded as a module Date: Thu, 26 Mar 2020 22:44:59 +0000 Message-Id: <20200326224459.105170-4-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200326224459.105170-1-john.stultz@linaro.org> References: <20200326224459.105170-1-john.stultz@linaro.org> This patch allow the rpmhpd driver to be loaded as a permenent module. Meaning it can be loaded from a module, but then cannot be unloaded. Ideally, it would include a remove hook and related logic, but apparently the genpd code isn't able to track usage and cleaning things up? So making it a permenent module at least improves things slightly over requiring it to be a built in driver. Feedback would be appreciated! Cc: Todd Kjos Cc: Saravana Kannan Cc: Andy Gross Cc: Bjorn Andersson Cc: Rajendra Nayak Cc: linux-arm-msm@vger.kernel.org Signed-off-by: John Stultz --- drivers/soc/qcom/Kconfig | 2 +- drivers/soc/qcom/rpmhpd.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index ac91eaf810f7..ffc04285840b 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -114,7 +114,7 @@ config QCOM_RPMH help apply the aggregated state on the resource. config QCOM_RPMHPD - bool "Qualcomm RPMh Power domain driver" + tristate "Qualcomm RPMh Power domain driver" depends on QCOM_RPMH && QCOM_COMMAND_DB help QCOM RPMh Power domain driver to support power-domains with diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index 4d264d0672c4..0bb12d5870a7 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -189,6 +190,7 @@ static const struct of_device_id rpmhpd_match_table[] = { { .compatible = "qcom,sm8150-rpmhpd", .data = &sm8150_desc }, { } }; +MODULE_DEVICE_TABLE(of, rpmhpd_match_table); static int rpmhpd_send_corner(struct rpmhpd *pd, int state, unsigned int corner, bool sync) @@ -460,3 +462,6 @@ static int __init rpmhpd_init(void) return platform_driver_register(&rpmhpd_driver); } core_initcall(rpmhpd_init); + +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. RPMh Power Domain Driver"); +MODULE_LICENSE("GPL v2");