void rk616_mclk_set_rate(struct clk *mclk,unsigned long rate)
{
clk_set_rate(mclk, rate);
-
-#if defined(CONFIG_RK616_MIPI_DSI)
- rk_mipi_dsi_init_lite();
-#endif
-
}
static int rk616_i2c_read_reg(struct mfd_rk616 *rk616, u16 reg,u32 *pval)
#include <linux/seq_file.h>
#include<linux/earlysuspend.h>
#include <linux/regulator/machine.h>
-
+#include <plat/clock.h>
#else
#include "ft_lcd.h"
#endif
*v1.0 : this driver is mipi dsi driver of rockchip;
*v1.1 : add FT code
*v1.2 : add rk_mipi_dsi_init_lite() for mclk variation
+*v1.3 : add clk_notifier function for mclk variation
*/
-#define RK_MIPI_DSI_VERSION_AND_TIME "rockchip mipi_dsi v1.2 2013-08-06"
+#define RK_MIPI_DSI_VERSION_AND_TIME "rockchip mipi_dsi v1.3 2013-08-08"
int rk_mipi_dsi_init_lite(void) {
- u32 decimals = 1000, i = 0, pre = 0, val = 0, ref_clk = 0;
+ u32 decimals = 1000, i = 0, pre = 0, ref_clk = 0;
struct mipi_dsi_screen *screen = g_screen;
if(!screen)
else
read_val *= MHz;
clk_set_rate(dsi_rk616->mclk, read_val);
- rk_mipi_dsi_init_lite();
+ //rk_mipi_dsi_init_lite();
break;
case 'd':
case 'g':
#endif /* end of CONFIG_HAS_EARLYSUSPEND */
+static int rk616_mipi_dsi_notifier_event(struct notifier_block *this,
+ unsigned long event, void *ptr) {
+ rk_mipi_dsi_init_lite();
+ return 0;
+}
+struct notifier_block mipi_dsi_nb= {
+ .notifier_call = rk616_mipi_dsi_notifier_event,
+};
static int rk616_mipi_dsi_probe(struct platform_device *pdev)
{
else
dsi_rk616 = rk616;
+ clk_notifier_register(rk616->mclk, &mipi_dsi_nb);
+
screen = rk_fb_get_prmry_screen();
if(!screen) {
dev_err(&pdev->dev,"the fb prmry screen is null!\n");
static int rk616_mipi_dsi_remove(struct platform_device *pdev)
{
+ clk_notifier_unregister(dsi_rk616->mclk, &mipi_dsi_nb);
return 0;
}