#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/clk.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/backlight.h>
#include <linux/gfp.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <video/of_videomode.h>
#include <video/of_display_timing.h>
#include <linux/regulator/consumer.h>
#include <video/videomode.h>
#include <video/atmel_lcdc.h>
struct atmel_lcdfb_config { … };
struct atmel_lcdfb_info { … };
struct atmel_lcdfb_power_ctrl_gpio { … };
#define lcdc_readl(sinfo, reg) …
#define lcdc_writel(sinfo, reg, val) …
#define ATMEL_LCDC_CVAL_DEFAULT …
#define ATMEL_LCDC_DMA_BURST_LEN …
#define ATMEL_LCDC_FIFO_SIZE …
static struct atmel_lcdfb_config at91sam9261_config = …;
static struct atmel_lcdfb_config at91sam9263_config = …;
static struct atmel_lcdfb_config at91sam9g10_config = …;
static struct atmel_lcdfb_config at91sam9g45_config = …;
static struct atmel_lcdfb_config at91sam9g45es_config = …;
static struct atmel_lcdfb_config at91sam9rl_config = …;
static u32 contrast_ctr = …;
#ifdef CONFIG_BACKLIGHT_ATMEL_LCDC
static int atmel_bl_update_status(struct backlight_device *bl)
{ … }
static int atmel_bl_get_brightness(struct backlight_device *bl)
{ … }
static const struct backlight_ops atmel_lcdc_bl_ops = …;
static void init_backlight(struct atmel_lcdfb_info *sinfo)
{ … }
static void exit_backlight(struct atmel_lcdfb_info *sinfo)
{ … }
#else
static void init_backlight(struct atmel_lcdfb_info *sinfo)
{
dev_warn(&sinfo->pdev->dev, "backlight control is not available\n");
}
static void exit_backlight(struct atmel_lcdfb_info *sinfo)
{
}
#endif
static void init_contrast(struct atmel_lcdfb_info *sinfo)
{ … }
static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int on)
{ … }
static const struct fb_fix_screeninfo atmel_lcdfb_fix = …;
static unsigned long compute_hozval(struct atmel_lcdfb_info *sinfo,
unsigned long xres)
{ … }
static void atmel_lcdfb_stop_nowait(struct atmel_lcdfb_info *sinfo)
{ … }
static void atmel_lcdfb_stop(struct atmel_lcdfb_info *sinfo)
{ … }
static void atmel_lcdfb_start(struct atmel_lcdfb_info *sinfo)
{ … }
static void atmel_lcdfb_update_dma(struct fb_info *info,
struct fb_var_screeninfo *var)
{ … }
static inline void atmel_lcdfb_free_video_memory(struct atmel_lcdfb_info *sinfo)
{ … }
static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo)
{ … }
static const struct fb_videomode *atmel_lcdfb_choose_mode(struct fb_var_screeninfo *var,
struct fb_info *info)
{ … }
static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
struct fb_info *info)
{ … }
static void atmel_lcdfb_reset(struct atmel_lcdfb_info *sinfo)
{ … }
static int atmel_lcdfb_set_par(struct fb_info *info)
{ … }
static inline unsigned int chan_to_field(unsigned int chan, const struct fb_bitfield *bf)
{ … }
static int atmel_lcdfb_setcolreg(unsigned int regno, unsigned int red,
unsigned int green, unsigned int blue,
unsigned int transp, struct fb_info *info)
{ … }
static int atmel_lcdfb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{ … }
static int atmel_lcdfb_blank(int blank_mode, struct fb_info *info)
{ … }
static const struct fb_ops atmel_lcdfb_ops = …;
static irqreturn_t atmel_lcdfb_interrupt(int irq, void *dev_id)
{ … }
static void atmel_lcdfb_task(struct work_struct *work)
{ … }
static int atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo)
{ … }
static void atmel_lcdfb_start_clock(struct atmel_lcdfb_info *sinfo)
{ … }
static void atmel_lcdfb_stop_clock(struct atmel_lcdfb_info *sinfo)
{ … }
static const struct of_device_id atmel_lcdfb_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, atmel_lcdfb_dt_ids);
static const char *atmel_lcdfb_wiring_modes[] = …;
static int atmel_lcdfb_get_of_wiring_modes(struct device_node *np)
{ … }
static void atmel_lcdfb_power_control_gpio(struct atmel_lcdfb_pdata *pdata, int on)
{ … }
static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
{ … }
static int atmel_lcdfb_probe(struct platform_device *pdev)
{ … }
static void atmel_lcdfb_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int atmel_lcdfb_suspend(struct platform_device *pdev, pm_message_t mesg)
{ … }
static int atmel_lcdfb_resume(struct platform_device *pdev)
{ … }
#else
#define atmel_lcdfb_suspend …
#define atmel_lcdfb_resume …
#endif
static struct platform_driver atmel_lcdfb_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;