summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@codeaurora.org>2020-05-03 17:34:24 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-05 16:24:21 +0200
commit3d9231e69831551da3a78a618b31702ea4dedd5e (patch)
tree09d9ccc52282b9dab5e954f5f3ec58b6f284c4b0 /include/linux
parentc2880ec6c0862e11673742ab512c262b5e97a34c (diff)
tty: serial: qcom_geni_serial: Use OPP API to set clk/perf state
geni serial needs to express a perforamnce state requirement on CX powerdomain depending on the frequency of the clock rates. Use OPP table from DT to register with OPP framework and use dev_pm_opp_set_rate() to set the clk/perf state. Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Akash Asthana <akashast@codeaurora.org> Cc: linux-serial@vger.kernel.org Link: https://lore.kernel.org/r/1588507469-31889-2-git-send-email-rnayak@codeaurora.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/qcom-geni-se.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/qcom-geni-se.h b/include/linux/qcom-geni-se.h
index dd464943f717..6b78094a4e23 100644
--- a/include/linux/qcom-geni-se.h
+++ b/include/linux/qcom-geni-se.h
@@ -33,6 +33,8 @@ struct clk;
* @clk: Handle to the core serial engine clock
* @num_clk_levels: Number of valid clock levels in clk_perf_tbl
* @clk_perf_tbl: Table of clock frequency input to serial engine clock
+ * @opp_table: Pointer to the OPP table
+ * @has_opp_table: Specifies if the SE has an OPP table
*/
struct geni_se {
void __iomem *base;
@@ -41,6 +43,8 @@ struct geni_se {
struct clk *clk;
unsigned int num_clk_levels;
unsigned long *clk_perf_tbl;
+ struct opp_table *opp_table;
+ bool has_opp_table;
};
/* Common SE registers */