Lines Matching +full:fw +full:- +full:gpios

2  * am200epd.c -- Platform device for AM200 EPD kit
12 * This work was made possible by help and equipment support from E-Ink
16 * on the AM200 EPD prototype kit/development kit with an E-Ink 800x600
35 #include <linux/platform_data/video-pxafb.h>
101 static int gpios[] = { LED_GPIO_PIN , STDBY_GPIO_PIN , RST_GPIO_PIN, variable
110 for (i = 0; i < ARRAY_SIZE(gpios); i++) { in am200_init_gpio_regs()
111 err = gpio_request(gpios[i], gpio_names[i]); in am200_init_gpio_regs()
113 dev_err(&am200_device->dev, "failed requesting " in am200_init_gpio_regs()
131 while (--i >= 0) in am200_init_gpio_regs()
132 gpio_free(gpios[i]); in am200_init_gpio_regs()
143 for (i = 0; i < ARRAY_SIZE(gpios); i++) in am200_cleanup()
144 gpio_free(gpios[i]); in am200_cleanup()
150 if ((info->var.xres != am200_fb_info.modes->xres) in am200_share_video_mem()
151 || (info->var.yres != am200_fb_info.modes->yres)) in am200_share_video_mem()
155 am200_board.metromem = info->screen_base; in am200_share_video_mem()
159 if (!try_module_get(info->fbops->owner)) in am200_share_video_mem()
160 return -ENODEV; in am200_share_video_mem()
167 dev_dbg(&am200_device->dev, "ENTER %s\n", __func__); in am200_unshare_video_mem()
172 module_put(am200_board.host_fbinfo->fbops->owner); in am200_unshare_video_mem()
180 struct fb_info *info = evdata->info; in am200_fb_notifier_callback()
182 dev_dbg(&am200_device->dev, "ENTER %s\n", __func__); in am200_fb_notifier_callback()
200 int fw; in am200_presetup_fb() local
216 dev_err(&am200_device->dev, "invalid panel_type selection," in am200_presetup_fb()
228 fw = am200_fb_info.modes->xres; in am200_presetup_fb()
229 fh = am200_fb_info.modes->yres; in am200_presetup_fb()
232 am200_board.wfm_size = roundup(16*1024 + 2, fw); in am200_presetup_fb()
234 padding_size = PAGE_SIZE + (4 * fw); in am200_presetup_fb()
237 totalsize = fw + am200_board.wfm_size + padding_size + (fw*fh); in am200_presetup_fb()
239 /* save this off because we're manipulating fw after this and in am200_presetup_fb()
241 am200_board.fw = fw; in am200_presetup_fb()
247 am200_fb_info.modes->yres = DIV_ROUND_UP(totalsize, fw); in am200_presetup_fb()
250 am200_fb_info.modes->xres /= 2; in am200_presetup_fb()
261 int fw; in am200_setup_fb() local
264 fw = am200_board.fw; in am200_setup_fb()
269 par->metromem_cmd = (struct metromem_cmd *) am200_board.metromem; in am200_setup_fb()
270 par->metromem_wfm = am200_board.metromem + fw; in am200_setup_fb()
271 par->metromem_img = par->metromem_wfm + am200_board.wfm_size; in am200_setup_fb()
272 par->metromem_img_csum = (u16 *) (par->metromem_img + (fw * fh)); in am200_setup_fb()
273 par->metromem_dma = am200_board.host_fbinfo->fix.smem_start; in am200_setup_fb()
287 wake_up_interruptible(&par->waitq); in am200_handle_irq()
296 IRQF_TRIGGER_FALLING, "AM200", info->par); in am200_setup_irq()
298 dev_err(&am200_device->dev, "request_irq failed: %d\n", ret); in am200_setup_irq()
315 return wait_event_timeout(par->waitq, gpio_get_value(RDY_GPIO_PIN), HZ); in am200_wait_event()
320 return wait_event_interruptible_timeout(par->waitq, in am200_wait_event_intr()
368 am200_device = platform_device_alloc("metronomefb", -1); in am200_init()
370 return -ENOMEM; in am200_init()