appleir 151 drivers/hid/hid-appleir.c static void key_up(struct hid_device *hid, struct appleir *appleir, int key) appleir 153 drivers/hid/hid-appleir.c input_report_key(appleir->input_dev, key, 0); appleir 154 drivers/hid/hid-appleir.c input_sync(appleir->input_dev); appleir 157 drivers/hid/hid-appleir.c static void key_down(struct hid_device *hid, struct appleir *appleir, int key) appleir 159 drivers/hid/hid-appleir.c input_report_key(appleir->input_dev, key, 1); appleir 160 drivers/hid/hid-appleir.c input_sync(appleir->input_dev); appleir 163 drivers/hid/hid-appleir.c static void battery_flat(struct appleir *appleir) appleir 165 drivers/hid/hid-appleir.c dev_err(&appleir->input_dev->dev, "possible flat battery?\n"); appleir 170 drivers/hid/hid-appleir.c struct appleir *appleir = from_timer(appleir, t, key_up_timer); appleir 171 drivers/hid/hid-appleir.c struct hid_device *hid = appleir->hid; appleir 174 drivers/hid/hid-appleir.c spin_lock_irqsave(&appleir->lock, flags); appleir 175 drivers/hid/hid-appleir.c if (appleir->current_key) { appleir 176 drivers/hid/hid-appleir.c key_up(hid, appleir, appleir->current_key); appleir 177 drivers/hid/hid-appleir.c appleir->current_key = 0; appleir 179 drivers/hid/hid-appleir.c spin_unlock_irqrestore(&appleir->lock, flags); appleir 185 drivers/hid/hid-appleir.c struct appleir *appleir = hid_get_drvdata(hid); appleir 197 drivers/hid/hid-appleir.c spin_lock_irqsave(&appleir->lock, flags); appleir 202 drivers/hid/hid-appleir.c if (appleir->current_key) appleir 203 drivers/hid/hid-appleir.c key_up(hid, appleir, appleir->current_key); appleir 206 drivers/hid/hid-appleir.c if (appleir->prev_key_idx > 0) appleir 207 drivers/hid/hid-appleir.c index = appleir->prev_key_idx; appleir 212 drivers/hid/hid-appleir.c appleir->current_key = appleir->keymap[index]; appleir 214 drivers/hid/hid-appleir.c key_down(hid, appleir, appleir->current_key); appleir 220 drivers/hid/hid-appleir.c mod_timer(&appleir->key_up_timer, jiffies + HZ / 8); appleir 221 drivers/hid/hid-appleir.c appleir->prev_key_idx = 0; appleir 224 drivers/hid/hid-appleir.c appleir->prev_key_idx = -index; appleir 225 drivers/hid/hid-appleir.c spin_unlock_irqrestore(&appleir->lock, flags); appleir 229 drivers/hid/hid-appleir.c appleir->prev_key_idx = 0; appleir 232 drivers/hid/hid-appleir.c key_down(hid, appleir, appleir->current_key); appleir 237 drivers/hid/hid-appleir.c mod_timer(&appleir->key_up_timer, jiffies + HZ / 8); appleir 242 drivers/hid/hid-appleir.c battery_flat(appleir); appleir 255 drivers/hid/hid-appleir.c struct appleir *appleir = hid_get_drvdata(hid); appleir 258 drivers/hid/hid-appleir.c appleir->input_dev = input_dev; appleir 260 drivers/hid/hid-appleir.c input_dev->keycode = appleir->keymap; appleir 262 drivers/hid/hid-appleir.c input_dev->keycodemax = ARRAY_SIZE(appleir->keymap); appleir 266 drivers/hid/hid-appleir.c memcpy(appleir->keymap, appleir_key_table, sizeof(appleir->keymap)); appleir 268 drivers/hid/hid-appleir.c set_bit(appleir->keymap[i], input_dev->keybit); appleir 284 drivers/hid/hid-appleir.c struct appleir *appleir; appleir 286 drivers/hid/hid-appleir.c appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL); appleir 287 drivers/hid/hid-appleir.c if (!appleir) { appleir 292 drivers/hid/hid-appleir.c appleir->hid = hid; appleir 297 drivers/hid/hid-appleir.c spin_lock_init(&appleir->lock); appleir 298 drivers/hid/hid-appleir.c timer_setup(&appleir->key_up_timer, key_up_tick, 0); appleir 300 drivers/hid/hid-appleir.c hid_set_drvdata(hid, appleir); appleir 316 drivers/hid/hid-appleir.c kfree(appleir); appleir 323 drivers/hid/hid-appleir.c struct appleir *appleir = hid_get_drvdata(hid); appleir 325 drivers/hid/hid-appleir.c del_timer_sync(&appleir->key_up_timer); appleir 326 drivers/hid/hid-appleir.c kfree(appleir);