+static int glamofb_ioctl(struct fb_info *info, unsigned int cmd,
+ unsigned long arg) {
+ struct glamofb_handle *gfb = (struct glamofb_handle*)info->par;
+ struct glamo_core *gcore = gfb->mach_info->core;
+ int retval = -ENOTTY;
+
+ switch (cmd) {
+ case GLAMOFB_ENGINE_ENABLE:
+ retval = glamo_engine_enable(gcore, arg);
+ break;
+ case GLAMOFB_ENGINE_DISABLE:
+ retval = glamo_engine_disable(gcore, arg);
+ break;
+ case GLAMOFB_ENGINE_RESET:
+ glamo_engine_reset(gcore, arg);
+ retval = 0;
+ break;
+ default:
+ break;
+ }
+
+ return retval;
+}
+
+