static void report_key(struct gpio_kp *kp, int key_index, int out, int in)
{
	struct gpio_event_matrix_info *mi = kp->keypad_info;
	int pressed = test_bit(key_index, kp->keys_pressed);
	unsigned short keyentry = mi->keymap[key_index];
	unsigned short keycode = keyentry & MATRIX_KEY_MASK;
	unsigned short dev = keyentry >> MATRIX_CODE_BITS;
#ifdef CONFIG_OPTICALJOYSTICK_CRUCIAL
	static unsigned need_send_spec_key = 1;
#endif

	if (pressed != test_bit(keycode, kp->input_devs->dev[dev]->key)) {
		if (keycode == KEY_RESERVED) {
			if (mi->flags & GPIOKPF_PRINT_UNMAPPED_KEYS)
				pr_info("gpiomatrix: unmapped key, %d-%d "
					"(%d-%d) changed to %d\n",
					out, in, mi->output_gpios[out],
					mi->input_gpios[in], pressed);
		} else {
			if (mi->flags & GPIOKPF_PRINT_MAPPED_KEYS)
				pr_info("gpiomatrix: key %x, %d-%d (%d-%d) "
					"changed to %d\n", keycode,
					out, in, mi->output_gpios[out],
					mi->input_gpios[in], pressed);
#ifdef CONFIG_OPTICALJOYSTICK_CRUCIAL
			if ((machine_is_bravo() || machine_is_legend() ||
				machine_is_latte() || machine_is_liberty()
			|| machine_is_paradise() || machine_is_bravoc() ||
							machine_is_bee())
						&& keycode == BTN_MOUSE)
				;
			else
#endif
#ifdef CONFIG_MACH_HEROC
			if (button_filter(kp->input_devs->dev[dev],
				EV_KEY, keycode, pressed, kp->keys_pressed))
#endif
				input_report_key(kp->input_devs->dev[dev],
							keycode, pressed);
		}
	}
#ifdef CONFIG_OPTICALJOYSTICK_CRUCIAL
	if ((machine_is_bravo() || machine_is_legend() || machine_is_latte()
			|| machine_is_liberty() || machine_is_paradise() ||
				machine_is_bravoc() || machine_is_bee()) &&
							keycode == BTN_MOUSE) {
		if (need_send_spec_key == pressed) {
			curcial_oj_send_key(keycode, pressed);
			need_send_spec_key = !pressed;
			printk(KERN_DEBUG "%s: send key, pressed: %d\n",
				__func__, need_send_spec_key);
		}
	}
#endif
}
static int __init liberty_rfkill_init(void)
{
	if (!machine_is_liberty())
		return 0;

	return platform_driver_register(&liberty_rfkill_driver);
}
static int __init liberty_wifi_init(void)
{
	int ret;

	if (!machine_is_liberty())
		return 0;

	printk("%s: start\n", __func__);
	liberty_wifi_update_nvs("sd_oobonly=1\n");
	liberty_wifi_update_nvs("btc_params80=0\n");
	liberty_wifi_update_nvs("btc_params6=30\n");
	liberty_init_wifi_mem();
	ret = platform_device_register(&liberty_wifi_device);
        return ret;
}