Lines Matching full:keys

43 	struct ipaq_micro_keys *keys = data;  in micro_key_receive()  local
50 input_report_key(keys->input, keys->codes[key], down); in micro_key_receive()
51 input_sync(keys->input); in micro_key_receive()
55 static void micro_key_start(struct ipaq_micro_keys *keys) in micro_key_start() argument
57 spin_lock(&keys->micro->lock); in micro_key_start()
58 keys->micro->key = micro_key_receive; in micro_key_start()
59 keys->micro->key_data = keys; in micro_key_start()
60 spin_unlock(&keys->micro->lock); in micro_key_start()
63 static void micro_key_stop(struct ipaq_micro_keys *keys) in micro_key_stop() argument
65 spin_lock(&keys->micro->lock); in micro_key_stop()
66 keys->micro->key = NULL; in micro_key_stop()
67 keys->micro->key_data = NULL; in micro_key_stop()
68 spin_unlock(&keys->micro->lock); in micro_key_stop()
73 struct ipaq_micro_keys *keys = input_get_drvdata(input); in micro_key_open() local
75 micro_key_start(keys); in micro_key_open()
82 struct ipaq_micro_keys *keys = input_get_drvdata(input); in micro_key_close() local
84 micro_key_stop(keys); in micro_key_close()
89 struct ipaq_micro_keys *keys; in micro_key_probe() local
93 keys = devm_kzalloc(&pdev->dev, sizeof(*keys), GFP_KERNEL); in micro_key_probe()
94 if (!keys) in micro_key_probe()
97 keys->micro = dev_get_drvdata(pdev->dev.parent); in micro_key_probe()
99 keys->input = devm_input_allocate_device(&pdev->dev); in micro_key_probe()
100 if (!keys->input) in micro_key_probe()
103 keys->input->keycodesize = sizeof(micro_keycodes[0]); in micro_key_probe()
104 keys->input->keycodemax = ARRAY_SIZE(micro_keycodes); in micro_key_probe()
105 keys->codes = devm_kmemdup(&pdev->dev, micro_keycodes, in micro_key_probe()
106 keys->input->keycodesize * keys->input->keycodemax, in micro_key_probe()
108 if (!keys->codes) in micro_key_probe()
111 keys->input->keycode = keys->codes; in micro_key_probe()
113 __set_bit(EV_KEY, keys->input->evbit); in micro_key_probe()
115 __set_bit(micro_keycodes[i], keys->input->keybit); in micro_key_probe()
117 keys->input->name = "h3600 micro keys"; in micro_key_probe()
118 keys->input->open = micro_key_open; in micro_key_probe()
119 keys->input->close = micro_key_close; in micro_key_probe()
120 input_set_drvdata(keys->input, keys); in micro_key_probe()
122 error = input_register_device(keys->input); in micro_key_probe()
126 platform_set_drvdata(pdev, keys); in micro_key_probe()
132 struct ipaq_micro_keys *keys = dev_get_drvdata(dev); in micro_key_suspend() local
134 micro_key_stop(keys); in micro_key_suspend()
141 struct ipaq_micro_keys *keys = dev_get_drvdata(dev); in micro_key_resume() local
142 struct input_dev *input = keys->input; in micro_key_resume()
147 micro_key_start(keys); in micro_key_resume()
159 .name = "ipaq-micro-keys",
167 MODULE_DESCRIPTION("driver for iPAQ Atmel micro keys");
168 MODULE_ALIAS("platform:ipaq-micro-keys");