Date:2013-04-28 21:38:10 (7 years 2 months ago)
Author:Lars C.
Commit:3fff2f7707075e43804bd6addbd5fb8cc4611798
Message:video: jz4740-fb: Use clk_prepare_enable/clk_disable_unprepare

In preparation to switching the jz4740 clk driver to the common clk framework
update the clk enable/disable calls to clk_prepare_enable/clk_disable_unprepare.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Files: drivers/video/jz4740_fb.c (5 diffs)

Change Details

drivers/video/jz4740_fb.c
395395    writel(ctrl, jzfb->base + JZ_REG_LCD_CTRL);
396396
397397    if (!jzfb->is_enabled)
398        clk_disable(jzfb->ldclk);
398        clk_disable_unprepare(jzfb->ldclk);
399399
400400    mutex_unlock(&jzfb->lock);
401401
...... 
409409{
410410    uint32_t ctrl;
411411
412    clk_enable(jzfb->ldclk);
412    clk_prepare_enable(jzfb->ldclk);
413413
414414    jz_gpio_bulk_resume(jz_lcd_ctrl_pins, jzfb_num_ctrl_pins(jzfb));
415415    jz_gpio_bulk_resume(jz_lcd_data_pins, jzfb_num_data_pins(jzfb));
...... 
438438    jz_gpio_bulk_suspend(jz_lcd_ctrl_pins, jzfb_num_ctrl_pins(jzfb));
439439    jz_gpio_bulk_suspend(jz_lcd_data_pins, jzfb_num_data_pins(jzfb));
440440
441    clk_disable(jzfb->ldclk);
441    clk_disable_unprepare(jzfb->ldclk);
442442}
443443
444444static int jzfb_blank(int blank_mode, struct fb_info *info)
...... 
617617
618618    fb_alloc_cmap(&fb->cmap, 256, 0);
619619
620    clk_enable(jzfb->ldclk);
620    clk_prepare_enable(jzfb->ldclk);
621621    jzfb->is_enabled = 1;
622622
623623    writel(jzfb->framedesc->next, jzfb->base + JZ_REG_LCD_DA0);
...... 
687687static int jzfb_resume(struct device *dev)
688688{
689689    struct jzfb *jzfb = dev_get_drvdata(dev);
690    clk_enable(jzfb->ldclk);
690    clk_prepare_enable(jzfb->ldclk);
691691
692692    mutex_lock(&jzfb->lock);
693693    if (jzfb->is_enabled)

Archive Download the corresponding diff file



interactive