86fe3f546e
The DPU has some kind of idea that it wants to be able to bring up power using GPIO lines. The struct dss_gpio is however completely unused and should this be done, it should be done using the GPIO descriptor framework rather than this API which relies on the global GPIO numberspace. Delete this code before anyone hurt themselves. The inclusion of <linux/gpio.h> was abused to get some OF and IRQ headers implicitly included into the DPU utilities, make these includes explicit and push them down into the actual implementation. Cc: Rob Clark <robdclark@gmail.com> Cc: Sean Paul <sean@poorly.run> Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Rob Clark <robdclark@chromium.org>
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright (c) 2012, 2017-2018, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __DPU_IO_UTIL_H__
|
|
#define __DPU_IO_UTIL_H__
|
|
|
|
#include <linux/platform_device.h>
|
|
#include <linux/types.h>
|
|
|
|
#define DEV_DBG(fmt, args...) pr_debug(fmt, ##args)
|
|
#define DEV_INFO(fmt, args...) pr_info(fmt, ##args)
|
|
#define DEV_WARN(fmt, args...) pr_warn(fmt, ##args)
|
|
#define DEV_ERR(fmt, args...) pr_err(fmt, ##args)
|
|
|
|
enum dss_clk_type {
|
|
DSS_CLK_AHB, /* no set rate. rate controlled through rpm */
|
|
DSS_CLK_PCLK,
|
|
};
|
|
|
|
struct dss_clk {
|
|
struct clk *clk; /* clk handle */
|
|
char clk_name[32];
|
|
enum dss_clk_type type;
|
|
unsigned long rate;
|
|
unsigned long max_rate;
|
|
};
|
|
|
|
struct dss_module_power {
|
|
unsigned int num_clk;
|
|
struct dss_clk *clk_config;
|
|
};
|
|
|
|
int msm_dss_get_clk(struct device *dev, struct dss_clk *clk_arry, int num_clk);
|
|
void msm_dss_put_clk(struct dss_clk *clk_arry, int num_clk);
|
|
int msm_dss_clk_set_rate(struct dss_clk *clk_arry, int num_clk);
|
|
int msm_dss_enable_clk(struct dss_clk *clk_arry, int num_clk, int enable);
|
|
int msm_dss_parse_clock(struct platform_device *pdev,
|
|
struct dss_module_power *mp);
|
|
#endif /* __DPU_IO_UTIL_H__ */
|