int key_down;
int key_up;
int restart_disabled;
+ int (*reset_fn)(void);
};
int restart_requested;
if (restart_requested)
panic("keyboard reset failed, %d", restart_requested);
pr_info("keyboard reset\n");
- schedule_work(&restart_work);
- restart_requested = 1;
+ if (state->reset_fn) {
+ restart_requested = state->reset_fn();
+ } else {
+ schedule_work(&restart_work);
+ restart_requested = 1;
+ }
}
done:
spin_unlock_irqrestore(&state->lock, flags);
__set_bit(key, state->upbit);
}
}
+
+ if (pdata->reset_fn)
+ state->reset_fn = pdata->reset_fn;
+
state->input_handler.event = keyreset_event;
state->input_handler.connect = keyreset_connect;
state->input_handler.disconnect = keyreset_disconnect;