Esempio n. 1
0
int __init panel_fwvga_43_init(struct omap_dss_device *disp_data)
{
    const struct archos_display_config *disp_cfg;
    int ret = -ENODEV;
    printk("panel_fwvga_43_init\n");

    disp_cfg = omap_get_config( ARCHOS_TAG_DISPLAY, struct archos_display_config );
    if (disp_cfg == NULL)
        return ret;

    if ( hardware_rev >= disp_cfg->nrev ) {
        printk(KERN_DEBUG "archos_display_init: hardware_rev (%i) >= nrev (%i)\n",
               hardware_rev, disp_cfg->nrev);
        return ret;
    }

    *disp_data = lg_fwvga_43_panel;
    display_gpio = disp_cfg->rev[hardware_rev];

    archos_gpio_init_output(&display_gpio.lcd_pwon, "LCD_PWON");
    archos_gpio_init_output(&display_gpio.lcd_rst, "LCD_RST");

#if !defined(CONFIG_FB_OMAP_BOOTLOADER_INIT)
    panel_disable(&lg_fwvga_43_panel);
#endif

    return 0;
}
Esempio n. 2
0
static int panel_suspend(struct omap_dss_device *disp)
{
	panel_disable(disp);

	return 0;
}
Esempio n. 3
0
void op_start (OPERATION_ operation, GList *filelist, char *src, char *dest, panel *p) {
	int pid;
	int reportpipe[2];
	int actionpipe[2];
	int options = 0;
	char *finaldest = NULL;
	int flags;
	int eventid;
	void *data;
	char *srcpath; /* inclusion of '/' */
	GtkWindow *progress_dialog = NULL;
	GtkWidget *progress_path_label = NULL;
	GtkWidget *progress_bar = NULL;
	char *progress_title = NULL;
	struct stat fileinfo;
	mode_t mode;
	uid_t uid;
	gid_t gid;
//	int options;

	/* Prepare operation */
	switch (operation) {
		case OP_COPY :
			dialog_enterpath ("Copy", "Copy files to", dest, &finaldest);
			gtk_main();
			progress_title = strdup ("Copy");
			break;
		case OP_MOVE :
			dialog_enterpath ("Move","Move files to", dest, &finaldest);
			gtk_main();
			progress_title = strdup ("Move");
			break;
		case OP_MKDIR :
			if (src[strlen(src)] != '/') {
				srcpath = malloc (sizeof(char) * (strlen(src) + 2));
				sprintf (srcpath, "%s/", src);
			} else {
				srcpath = strdup(src);
			}
			
			dialog_enterpath ("Make dir","Make directory", srcpath, &finaldest);
			gtk_main();
			progress_title = strdup ("Make Dir");
			
			free (srcpath);
			break;
		case OP_DEL :
			finaldest = strdup (dest);
			progress_title = strdup ("Delete");
			break;
		case OP_LNK :
			dialog_enterpath ("Link","Link files in", dest, &finaldest);
			progress_title = strdup ("Link");
			gtk_main();
			break;
		case OP_PERM :
			srcpath = malloc (sizeof(char) * (strlen(src) + strlen(filelist->data) + 2));
			sprintf (srcpath, "%s/%s", src, (char *)filelist->data);
			stat(srcpath, &fileinfo);
			mode = fileinfo.st_mode;
			if (dialog_permissions (mode, &mode, &options) == 0) {
				finaldest = strdup(src);
			} else {
				finaldest = NULL;
			}

			break;
			
		case OP_OWN :
			srcpath = malloc (sizeof(char) * (strlen(src) + strlen(filelist->data) + 2));
			sprintf (srcpath, "%s/%s", src, (char *)filelist->data);
			stat(srcpath, &fileinfo);
			uid = fileinfo.st_uid;
			gid = fileinfo.st_gid;
			if (dialog_ownership (uid, gid, &uid, &gid, &options) == 0) {
				finaldest = strdup(src);
			} else {
				finaldest = NULL;
			}
			break;
		default:
			perror ("op_start: Unknow operation passed\n");
			break;
	}
	
	if (finaldest != NULL) {
		/* FIXME: Comment on the next line is incorrect? */
		/* action canceled */

		p->operation_busy = 1;
		p->next->operation_busy = 1;
		
		panel_disable (p);
		panel_disable (p->next);

		pipe (reportpipe);
		pipe (actionpipe);
		
		progress_path_label = gtk_label_new ("");
		progress_bar = gtk_progress_bar_new();
		progress_dialog = dialog_progress(progress_title, progress_path_label, progress_bar);

		data = gtk_param_pack ("iipppp", reportpipe[0], actionpipe[1], (void *)p, (void *)progress_path_label, (void *)progress_dialog, (void *)progress_bar);
		eventid = gtk_timeout_add (100, (GtkFunction) op_progress, (gpointer) data);
		
		if ((pid = fork()) == 0) {
			close (reportpipe[0]);
			close (actionpipe[1]);

			switch (operation) {
				case OP_COPY  :
					filelist_copy (actionpipe[0], reportpipe[1], filelist, src, finaldest, options);
					break;
				case OP_MOVE : 
					filelist_move (actionpipe[0], reportpipe[1], filelist, src, finaldest, options);
					break;
				case OP_MKDIR :
					filelist_mkdir (actionpipe[0], reportpipe[1], finaldest, src, options);
					break;
				case OP_DEL :
					filelist_del (actionpipe[0], reportpipe[1], filelist, src, options);
					break;
				case OP_LNK :
					filelist_lnk (actionpipe[0], reportpipe[1], filelist, src, finaldest, options);
					break;
				case OP_PERM :
					filelist_chmod (actionpipe[0], reportpipe[1], filelist, src, mode, options);
					break;
				case OP_OWN :
					filelist_chown (actionpipe[0], reportpipe[1], filelist, src, uid, gid, options);
					break;
				default:
					perror ("op_start: Unknow operation passed");
			}
			
			close (reportpipe[0]);
			close (reportpipe[1]);
			
			close (actionpipe[0]);
			close (actionpipe[1]);
			
			_exit (0);
		}
	
	    /* Set pipe read to non-blocking */
	    flags = fcntl(reportpipe[0], F_GETFL, 0);
	    fcntl(reportpipe[0], F_SETFL, flags | O_NONBLOCK);
	}    

	free (progress_title);
	free (finaldest);
}
Esempio n. 4
0
static int panel_suspend(struct omap_display *disp)
{
	panel_disable(disp);
	return 0;
}