keypad 57 arch/arm/mach-mmp/clock-pxa168.c static APBC_CLK(keypad, KPC, 0, 32000); keypad 109 arch/arm/mach-mmp/pxa168.c PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); keypad 73 drivers/auxdisplay/ht16k33.c struct ht16k33_keypad keypad; keypad 245 drivers/auxdisplay/ht16k33.c static bool ht16k33_keypad_scan(struct ht16k33_keypad *keypad) keypad 247 drivers/auxdisplay/ht16k33.c const unsigned short *keycodes = keypad->dev->keycode; keypad 255 drivers/auxdisplay/ht16k33.c rc = i2c_smbus_read_i2c_block_data(keypad->client, 0x40, keypad 258 drivers/auxdisplay/ht16k33.c dev_err(&keypad->client->dev, keypad 263 drivers/auxdisplay/ht16k33.c for (col = 0; col < keypad->cols; col++) { keypad 267 drivers/auxdisplay/ht16k33.c bits_changed = keypad->last_key_state[col] ^ new_state[col]; keypad 270 drivers/auxdisplay/ht16k33.c code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); keypad 271 drivers/auxdisplay/ht16k33.c input_event(keypad->dev, EV_MSC, MSC_SCAN, code); keypad 272 drivers/auxdisplay/ht16k33.c input_report_key(keypad->dev, keycodes[code], keypad 276 drivers/auxdisplay/ht16k33.c input_sync(keypad->dev); keypad 277 drivers/auxdisplay/ht16k33.c memcpy(keypad->last_key_state, new_state, sizeof(u16) * keypad->cols); keypad 284 drivers/auxdisplay/ht16k33.c struct ht16k33_keypad *keypad = dev; keypad 287 drivers/auxdisplay/ht16k33.c wait_event_timeout(keypad->wait, keypad->stopped, keypad 288 drivers/auxdisplay/ht16k33.c msecs_to_jiffies(keypad->debounce_ms)); keypad 289 drivers/auxdisplay/ht16k33.c if (keypad->stopped) keypad 291 drivers/auxdisplay/ht16k33.c } while (ht16k33_keypad_scan(keypad)); keypad 298 drivers/auxdisplay/ht16k33.c struct ht16k33_keypad *keypad = input_get_drvdata(dev); keypad 300 drivers/auxdisplay/ht16k33.c keypad->stopped = false; keypad 302 drivers/auxdisplay/ht16k33.c enable_irq(keypad->client->irq); keypad 309 drivers/auxdisplay/ht16k33.c struct ht16k33_keypad *keypad = input_get_drvdata(dev); keypad 311 drivers/auxdisplay/ht16k33.c keypad->stopped = true; keypad 313 drivers/auxdisplay/ht16k33.c wake_up(&keypad->wait); keypad 314 drivers/auxdisplay/ht16k33.c disable_irq(keypad->client->irq); keypad 318 drivers/auxdisplay/ht16k33.c struct ht16k33_keypad *keypad) keypad 325 drivers/auxdisplay/ht16k33.c keypad->client = client; keypad 326 drivers/auxdisplay/ht16k33.c init_waitqueue_head(&keypad->wait); keypad 328 drivers/auxdisplay/ht16k33.c keypad->dev = devm_input_allocate_device(&client->dev); keypad 329 drivers/auxdisplay/ht16k33.c if (!keypad->dev) keypad 332 drivers/auxdisplay/ht16k33.c input_set_drvdata(keypad->dev, keypad); keypad 334 drivers/auxdisplay/ht16k33.c keypad->dev->name = DRIVER_NAME"-keypad"; keypad 335 drivers/auxdisplay/ht16k33.c keypad->dev->id.bustype = BUS_I2C; keypad 336 drivers/auxdisplay/ht16k33.c keypad->dev->open = ht16k33_keypad_start; keypad 337 drivers/auxdisplay/ht16k33.c keypad->dev->close = ht16k33_keypad_stop; keypad 340 drivers/auxdisplay/ht16k33.c __set_bit(EV_REP, keypad->dev->evbit); keypad 343 drivers/auxdisplay/ht16k33.c &keypad->debounce_ms); keypad 359 drivers/auxdisplay/ht16k33.c keypad->rows = rows; keypad 360 drivers/auxdisplay/ht16k33.c keypad->cols = cols; keypad 361 drivers/auxdisplay/ht16k33.c keypad->row_shift = get_count_order(cols); keypad 364 drivers/auxdisplay/ht16k33.c keypad->dev); keypad 373 drivers/auxdisplay/ht16k33.c DRIVER_NAME, keypad); keypad 380 drivers/auxdisplay/ht16k33.c ht16k33_keypad_stop(keypad->dev); keypad 382 drivers/auxdisplay/ht16k33.c err = input_register_device(keypad->dev); keypad 462 drivers/auxdisplay/ht16k33.c err = ht16k33_keypad_probe(client, &priv->keypad); keypad 192 drivers/auxdisplay/panel.c } keypad; keypad 1396 drivers/auxdisplay/panel.c if (keypad.enabled && keypad_initialized) { keypad 1612 drivers/auxdisplay/panel.c if (keypad.enabled) { keypad 1644 drivers/auxdisplay/panel.c if (keypad.enabled) { keypad 1723 drivers/auxdisplay/panel.c keypad.enabled = (selected_keypad_type > 0); keypad 1762 drivers/auxdisplay/panel.c if (!lcd.enabled && !keypad.enabled) { keypad 82 drivers/input/keyboard/ep93xx_keypad.c struct ep93xx_keypad *keypad = dev_id; keypad 83 drivers/input/keyboard/ep93xx_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 87 drivers/input/keyboard/ep93xx_keypad.c status = __raw_readl(keypad->mmio_base + KEY_REG); keypad 90 drivers/input/keyboard/ep93xx_keypad.c key1 = keypad->keycodes[keycode]; keypad 93 drivers/input/keyboard/ep93xx_keypad.c key2 = keypad->keycodes[keycode]; keypad 96 drivers/input/keyboard/ep93xx_keypad.c if (keypad->key1 && key1 != keypad->key1 && key2 != keypad->key1) keypad 97 drivers/input/keyboard/ep93xx_keypad.c input_report_key(input_dev, keypad->key1, 0); keypad 99 drivers/input/keyboard/ep93xx_keypad.c if (keypad->key2 && key1 != keypad->key2 && key2 != keypad->key2) keypad 100 drivers/input/keyboard/ep93xx_keypad.c input_report_key(input_dev, keypad->key2, 0); keypad 105 drivers/input/keyboard/ep93xx_keypad.c keypad->key1 = key1; keypad 106 drivers/input/keyboard/ep93xx_keypad.c keypad->key2 = key2; keypad 109 drivers/input/keyboard/ep93xx_keypad.c if (keypad->key1 && key1 != keypad->key1) keypad 110 drivers/input/keyboard/ep93xx_keypad.c input_report_key(input_dev, keypad->key1, 0); keypad 112 drivers/input/keyboard/ep93xx_keypad.c if (keypad->key2 && key1 != keypad->key2) keypad 113 drivers/input/keyboard/ep93xx_keypad.c input_report_key(input_dev, keypad->key2, 0); keypad 117 drivers/input/keyboard/ep93xx_keypad.c keypad->key1 = key1; keypad 118 drivers/input/keyboard/ep93xx_keypad.c keypad->key2 = 0; keypad 121 drivers/input/keyboard/ep93xx_keypad.c input_report_key(input_dev, keypad->key1, 0); keypad 122 drivers/input/keyboard/ep93xx_keypad.c input_report_key(input_dev, keypad->key2, 0); keypad 124 drivers/input/keyboard/ep93xx_keypad.c keypad->key1 = keypad->key2 = 0; keypad 131 drivers/input/keyboard/ep93xx_keypad.c static void ep93xx_keypad_config(struct ep93xx_keypad *keypad) keypad 133 drivers/input/keyboard/ep93xx_keypad.c struct ep93xx_keypad_platform_data *pdata = keypad->pdata; keypad 136 drivers/input/keyboard/ep93xx_keypad.c clk_set_rate(keypad->clk, pdata->clk_rate); keypad 151 drivers/input/keyboard/ep93xx_keypad.c __raw_writel(val, keypad->mmio_base + KEY_INIT); keypad 156 drivers/input/keyboard/ep93xx_keypad.c struct ep93xx_keypad *keypad = input_get_drvdata(pdev); keypad 158 drivers/input/keyboard/ep93xx_keypad.c if (!keypad->enabled) { keypad 159 drivers/input/keyboard/ep93xx_keypad.c ep93xx_keypad_config(keypad); keypad 160 drivers/input/keyboard/ep93xx_keypad.c clk_enable(keypad->clk); keypad 161 drivers/input/keyboard/ep93xx_keypad.c keypad->enabled = true; keypad 169 drivers/input/keyboard/ep93xx_keypad.c struct ep93xx_keypad *keypad = input_get_drvdata(pdev); keypad 171 drivers/input/keyboard/ep93xx_keypad.c if (keypad->enabled) { keypad 172 drivers/input/keyboard/ep93xx_keypad.c clk_disable(keypad->clk); keypad 173 drivers/input/keyboard/ep93xx_keypad.c keypad->enabled = false; keypad 182 drivers/input/keyboard/ep93xx_keypad.c struct ep93xx_keypad *keypad = platform_get_drvdata(pdev); keypad 183 drivers/input/keyboard/ep93xx_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 187 drivers/input/keyboard/ep93xx_keypad.c if (keypad->enabled) { keypad 188 drivers/input/keyboard/ep93xx_keypad.c clk_disable(keypad->clk); keypad 189 drivers/input/keyboard/ep93xx_keypad.c keypad->enabled = false; keypad 195 drivers/input/keyboard/ep93xx_keypad.c enable_irq_wake(keypad->irq); keypad 203 drivers/input/keyboard/ep93xx_keypad.c struct ep93xx_keypad *keypad = platform_get_drvdata(pdev); keypad 204 drivers/input/keyboard/ep93xx_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 207 drivers/input/keyboard/ep93xx_keypad.c disable_irq_wake(keypad->irq); keypad 212 drivers/input/keyboard/ep93xx_keypad.c if (!keypad->enabled) { keypad 213 drivers/input/keyboard/ep93xx_keypad.c ep93xx_keypad_config(keypad); keypad 214 drivers/input/keyboard/ep93xx_keypad.c clk_enable(keypad->clk); keypad 215 drivers/input/keyboard/ep93xx_keypad.c keypad->enabled = true; keypad 230 drivers/input/keyboard/ep93xx_keypad.c struct ep93xx_keypad *keypad; keypad 236 drivers/input/keyboard/ep93xx_keypad.c keypad = kzalloc(sizeof(struct ep93xx_keypad), GFP_KERNEL); keypad 237 drivers/input/keyboard/ep93xx_keypad.c if (!keypad) keypad 240 drivers/input/keyboard/ep93xx_keypad.c keypad->pdata = dev_get_platdata(&pdev->dev); keypad 241 drivers/input/keyboard/ep93xx_keypad.c if (!keypad->pdata) { keypad 246 drivers/input/keyboard/ep93xx_keypad.c keymap_data = keypad->pdata->keymap_data; keypad 252 drivers/input/keyboard/ep93xx_keypad.c keypad->irq = platform_get_irq(pdev, 0); keypad 253 drivers/input/keyboard/ep93xx_keypad.c if (!keypad->irq) { keypad 270 drivers/input/keyboard/ep93xx_keypad.c keypad->mmio_base = ioremap(res->start, resource_size(res)); keypad 271 drivers/input/keyboard/ep93xx_keypad.c if (keypad->mmio_base == NULL) { keypad 280 drivers/input/keyboard/ep93xx_keypad.c keypad->clk = clk_get(&pdev->dev, NULL); keypad 281 drivers/input/keyboard/ep93xx_keypad.c if (IS_ERR(keypad->clk)) { keypad 282 drivers/input/keyboard/ep93xx_keypad.c err = PTR_ERR(keypad->clk); keypad 292 drivers/input/keyboard/ep93xx_keypad.c keypad->input_dev = input_dev; keypad 302 drivers/input/keyboard/ep93xx_keypad.c keypad->keycodes, input_dev); keypad 306 drivers/input/keyboard/ep93xx_keypad.c if (keypad->pdata->flags & EP93XX_KEYPAD_AUTOREPEAT) keypad 308 drivers/input/keyboard/ep93xx_keypad.c input_set_drvdata(input_dev, keypad); keypad 310 drivers/input/keyboard/ep93xx_keypad.c err = request_irq(keypad->irq, ep93xx_keypad_irq_handler, keypad 311 drivers/input/keyboard/ep93xx_keypad.c 0, pdev->name, keypad); keypad 319 drivers/input/keyboard/ep93xx_keypad.c platform_set_drvdata(pdev, keypad); keypad 325 drivers/input/keyboard/ep93xx_keypad.c free_irq(keypad->irq, keypad); keypad 329 drivers/input/keyboard/ep93xx_keypad.c clk_put(keypad->clk); keypad 333 drivers/input/keyboard/ep93xx_keypad.c iounmap(keypad->mmio_base); keypad 337 drivers/input/keyboard/ep93xx_keypad.c kfree(keypad); keypad 343 drivers/input/keyboard/ep93xx_keypad.c struct ep93xx_keypad *keypad = platform_get_drvdata(pdev); keypad 346 drivers/input/keyboard/ep93xx_keypad.c free_irq(keypad->irq, keypad); keypad 348 drivers/input/keyboard/ep93xx_keypad.c if (keypad->enabled) keypad 349 drivers/input/keyboard/ep93xx_keypad.c clk_disable(keypad->clk); keypad 350 drivers/input/keyboard/ep93xx_keypad.c clk_put(keypad->clk); keypad 352 drivers/input/keyboard/ep93xx_keypad.c input_unregister_device(keypad->input_dev); keypad 356 drivers/input/keyboard/ep93xx_keypad.c iounmap(keypad->mmio_base); keypad 361 drivers/input/keyboard/ep93xx_keypad.c kfree(keypad); keypad 78 drivers/input/keyboard/imx_keypad.c static void imx_keypad_scan_matrix(struct imx_keypad *keypad, keypad 85 drivers/input/keyboard/imx_keypad.c if ((keypad->cols_en_mask & (1 << col)) == 0) keypad 93 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPDR); keypad 95 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPDR); keypad 97 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPCR); keypad 98 drivers/input/keyboard/imx_keypad.c reg_val &= ~((keypad->cols_en_mask & 0xff) << 8); keypad 99 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPCR); keypad 103 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPCR); keypad 104 drivers/input/keyboard/imx_keypad.c reg_val |= (keypad->cols_en_mask & 0xff) << 8; keypad 105 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPCR); keypad 112 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPDR); keypad 114 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPDR); keypad 126 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPDR); keypad 127 drivers/input/keyboard/imx_keypad.c matrix_volatile_state[col] = (~reg_val) & keypad->rows_en_mask; keypad 134 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPDR); keypad 136 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPDR); keypad 143 drivers/input/keyboard/imx_keypad.c static void imx_keypad_fire_events(struct imx_keypad *keypad, keypad 146 drivers/input/keyboard/imx_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 153 drivers/input/keyboard/imx_keypad.c if ((keypad->cols_en_mask & (1 << col)) == 0) keypad 156 drivers/input/keyboard/imx_keypad.c bits_changed = keypad->matrix_stable_state[col] ^ keypad 163 drivers/input/keyboard/imx_keypad.c if ((keypad->rows_en_mask & (1 << row)) == 0) keypad 170 drivers/input/keyboard/imx_keypad.c input_report_key(input_dev, keypad->keycodes[code], keypad 173 drivers/input/keyboard/imx_keypad.c keypad->keycodes[code], keypad 185 drivers/input/keyboard/imx_keypad.c struct imx_keypad *keypad = from_timer(keypad, t, check_matrix_timer); keypad 193 drivers/input/keyboard/imx_keypad.c imx_keypad_scan_matrix(keypad, matrix_volatile_state); keypad 197 drivers/input/keyboard/imx_keypad.c if ((keypad->cols_en_mask & (1 << i)) == 0) keypad 200 drivers/input/keyboard/imx_keypad.c if (keypad->matrix_unstable_state[i] ^ matrix_volatile_state[i]) { keypad 214 drivers/input/keyboard/imx_keypad.c memcpy(keypad->matrix_unstable_state, matrix_volatile_state, keypad 216 drivers/input/keyboard/imx_keypad.c keypad->stable_count = 0; keypad 218 drivers/input/keyboard/imx_keypad.c keypad->stable_count++; keypad 224 drivers/input/keyboard/imx_keypad.c if (keypad->stable_count < IMX_KEYPAD_SCANS_FOR_STABILITY) { keypad 225 drivers/input/keyboard/imx_keypad.c mod_timer(&keypad->check_matrix_timer, keypad 236 drivers/input/keyboard/imx_keypad.c if (keypad->stable_count == IMX_KEYPAD_SCANS_FOR_STABILITY) { keypad 237 drivers/input/keyboard/imx_keypad.c imx_keypad_fire_events(keypad, matrix_volatile_state); keypad 239 drivers/input/keyboard/imx_keypad.c memcpy(keypad->matrix_stable_state, matrix_volatile_state, keypad 258 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPSR); keypad 260 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPSR); keypad 262 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPSR); keypad 265 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPSR); keypad 273 drivers/input/keyboard/imx_keypad.c mod_timer(&keypad->check_matrix_timer, keypad 276 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPSR); keypad 278 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPSR); keypad 280 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPSR); keypad 283 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPSR); keypad 289 drivers/input/keyboard/imx_keypad.c struct imx_keypad *keypad = dev_id; keypad 292 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPSR); keypad 298 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPSR); keypad 300 drivers/input/keyboard/imx_keypad.c if (keypad->enabled) { keypad 302 drivers/input/keyboard/imx_keypad.c keypad->stable_count = 0; keypad 305 drivers/input/keyboard/imx_keypad.c mod_timer(&keypad->check_matrix_timer, keypad 312 drivers/input/keyboard/imx_keypad.c static void imx_keypad_config(struct imx_keypad *keypad) keypad 320 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPCR); keypad 321 drivers/input/keyboard/imx_keypad.c reg_val |= keypad->rows_en_mask & 0xff; /* rows */ keypad 322 drivers/input/keyboard/imx_keypad.c reg_val |= (keypad->cols_en_mask & 0xff) << 8; /* cols */ keypad 323 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPCR); keypad 326 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPDR); keypad 328 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPDR); keypad 331 drivers/input/keyboard/imx_keypad.c writew(0xff00, keypad->mmio_base + KDDR); keypad 337 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPSR); keypad 340 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPSR); keypad 345 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPSR); keypad 348 drivers/input/keyboard/imx_keypad.c static void imx_keypad_inhibit(struct imx_keypad *keypad) keypad 353 drivers/input/keyboard/imx_keypad.c reg_val = readw(keypad->mmio_base + KPSR); keypad 356 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPSR); keypad 359 drivers/input/keyboard/imx_keypad.c reg_val = (keypad->cols_en_mask & 0xff) << 8; keypad 360 drivers/input/keyboard/imx_keypad.c writew(reg_val, keypad->mmio_base + KPCR); keypad 365 drivers/input/keyboard/imx_keypad.c struct imx_keypad *keypad = input_get_drvdata(dev); keypad 370 drivers/input/keyboard/imx_keypad.c keypad->enabled = false; keypad 371 drivers/input/keyboard/imx_keypad.c synchronize_irq(keypad->irq); keypad 372 drivers/input/keyboard/imx_keypad.c del_timer_sync(&keypad->check_matrix_timer); keypad 374 drivers/input/keyboard/imx_keypad.c imx_keypad_inhibit(keypad); keypad 377 drivers/input/keyboard/imx_keypad.c clk_disable_unprepare(keypad->clk); keypad 382 drivers/input/keyboard/imx_keypad.c struct imx_keypad *keypad = input_get_drvdata(dev); keypad 388 drivers/input/keyboard/imx_keypad.c error = clk_prepare_enable(keypad->clk); keypad 393 drivers/input/keyboard/imx_keypad.c keypad->enabled = true; keypad 395 drivers/input/keyboard/imx_keypad.c imx_keypad_config(keypad); keypad 398 drivers/input/keyboard/imx_keypad.c if ((readw(keypad->mmio_base + KPDR) & keypad->rows_en_mask) == 0) { keypad 423 drivers/input/keyboard/imx_keypad.c struct imx_keypad *keypad; keypad 442 drivers/input/keyboard/imx_keypad.c keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL); keypad 443 drivers/input/keyboard/imx_keypad.c if (!keypad) { keypad 448 drivers/input/keyboard/imx_keypad.c keypad->input_dev = input_dev; keypad 449 drivers/input/keyboard/imx_keypad.c keypad->irq = irq; keypad 450 drivers/input/keyboard/imx_keypad.c keypad->stable_count = 0; keypad 452 drivers/input/keyboard/imx_keypad.c timer_setup(&keypad->check_matrix_timer, keypad 455 drivers/input/keyboard/imx_keypad.c keypad->mmio_base = devm_platform_ioremap_resource(pdev, 0); keypad 456 drivers/input/keyboard/imx_keypad.c if (IS_ERR(keypad->mmio_base)) keypad 457 drivers/input/keyboard/imx_keypad.c return PTR_ERR(keypad->mmio_base); keypad 459 drivers/input/keyboard/imx_keypad.c keypad->clk = devm_clk_get(&pdev->dev, NULL); keypad 460 drivers/input/keyboard/imx_keypad.c if (IS_ERR(keypad->clk)) { keypad 462 drivers/input/keyboard/imx_keypad.c return PTR_ERR(keypad->clk); keypad 475 drivers/input/keyboard/imx_keypad.c keypad->keycodes, input_dev); keypad 485 drivers/input/keyboard/imx_keypad.c if (keypad->keycodes[i] != KEY_RESERVED) { keypad 486 drivers/input/keyboard/imx_keypad.c keypad->rows_en_mask |= 1 << row; keypad 487 drivers/input/keyboard/imx_keypad.c keypad->cols_en_mask |= 1 << col; keypad 491 drivers/input/keyboard/imx_keypad.c dev_dbg(&pdev->dev, "enabled rows mask: %x\n", keypad->rows_en_mask); keypad 492 drivers/input/keyboard/imx_keypad.c dev_dbg(&pdev->dev, "enabled cols mask: %x\n", keypad->cols_en_mask); keypad 496 drivers/input/keyboard/imx_keypad.c input_set_drvdata(input_dev, keypad); keypad 499 drivers/input/keyboard/imx_keypad.c error = clk_prepare_enable(keypad->clk); keypad 502 drivers/input/keyboard/imx_keypad.c imx_keypad_inhibit(keypad); keypad 503 drivers/input/keyboard/imx_keypad.c clk_disable_unprepare(keypad->clk); keypad 506 drivers/input/keyboard/imx_keypad.c pdev->name, keypad); keypad 519 drivers/input/keyboard/imx_keypad.c platform_set_drvdata(pdev, keypad); keypad 85 drivers/input/keyboard/matrix_keypad.c static void enable_row_irqs(struct matrix_keypad *keypad) keypad 87 drivers/input/keyboard/matrix_keypad.c const struct matrix_keypad_platform_data *pdata = keypad->pdata; keypad 98 drivers/input/keyboard/matrix_keypad.c static void disable_row_irqs(struct matrix_keypad *keypad) keypad 100 drivers/input/keyboard/matrix_keypad.c const struct matrix_keypad_platform_data *pdata = keypad->pdata; keypad 116 drivers/input/keyboard/matrix_keypad.c struct matrix_keypad *keypad = keypad 118 drivers/input/keyboard/matrix_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 120 drivers/input/keyboard/matrix_keypad.c const struct matrix_keypad_platform_data *pdata = keypad->pdata; keypad 144 drivers/input/keyboard/matrix_keypad.c bits_changed = keypad->last_key_state[col] ^ new_state[col]; keypad 152 drivers/input/keyboard/matrix_keypad.c code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); keypad 161 drivers/input/keyboard/matrix_keypad.c memcpy(keypad->last_key_state, new_state, sizeof(new_state)); keypad 166 drivers/input/keyboard/matrix_keypad.c spin_lock_irq(&keypad->lock); keypad 167 drivers/input/keyboard/matrix_keypad.c keypad->scan_pending = false; keypad 168 drivers/input/keyboard/matrix_keypad.c enable_row_irqs(keypad); keypad 169 drivers/input/keyboard/matrix_keypad.c spin_unlock_irq(&keypad->lock); keypad 174 drivers/input/keyboard/matrix_keypad.c struct matrix_keypad *keypad = id; keypad 177 drivers/input/keyboard/matrix_keypad.c spin_lock_irqsave(&keypad->lock, flags); keypad 184 drivers/input/keyboard/matrix_keypad.c if (unlikely(keypad->scan_pending || keypad->stopped)) keypad 187 drivers/input/keyboard/matrix_keypad.c disable_row_irqs(keypad); keypad 188 drivers/input/keyboard/matrix_keypad.c keypad->scan_pending = true; keypad 189 drivers/input/keyboard/matrix_keypad.c schedule_delayed_work(&keypad->work, keypad 190 drivers/input/keyboard/matrix_keypad.c msecs_to_jiffies(keypad->pdata->debounce_ms)); keypad 193 drivers/input/keyboard/matrix_keypad.c spin_unlock_irqrestore(&keypad->lock, flags); keypad 199 drivers/input/keyboard/matrix_keypad.c struct matrix_keypad *keypad = input_get_drvdata(dev); keypad 201 drivers/input/keyboard/matrix_keypad.c keypad->stopped = false; keypad 208 drivers/input/keyboard/matrix_keypad.c schedule_delayed_work(&keypad->work, 0); keypad 215 drivers/input/keyboard/matrix_keypad.c struct matrix_keypad *keypad = input_get_drvdata(dev); keypad 217 drivers/input/keyboard/matrix_keypad.c spin_lock_irq(&keypad->lock); keypad 218 drivers/input/keyboard/matrix_keypad.c keypad->stopped = true; keypad 219 drivers/input/keyboard/matrix_keypad.c spin_unlock_irq(&keypad->lock); keypad 221 drivers/input/keyboard/matrix_keypad.c flush_delayed_work(&keypad->work); keypad 226 drivers/input/keyboard/matrix_keypad.c disable_row_irqs(keypad); keypad 230 drivers/input/keyboard/matrix_keypad.c static void matrix_keypad_enable_wakeup(struct matrix_keypad *keypad) keypad 232 drivers/input/keyboard/matrix_keypad.c const struct matrix_keypad_platform_data *pdata = keypad->pdata; keypad 238 drivers/input/keyboard/matrix_keypad.c keypad->gpio_all_disabled = true; keypad 242 drivers/input/keyboard/matrix_keypad.c if (!test_bit(i, keypad->disabled_gpios)) { keypad 246 drivers/input/keyboard/matrix_keypad.c __set_bit(i, keypad->disabled_gpios); keypad 252 drivers/input/keyboard/matrix_keypad.c static void matrix_keypad_disable_wakeup(struct matrix_keypad *keypad) keypad 254 drivers/input/keyboard/matrix_keypad.c const struct matrix_keypad_platform_data *pdata = keypad->pdata; keypad 259 drivers/input/keyboard/matrix_keypad.c if (keypad->gpio_all_disabled) { keypad 261 drivers/input/keyboard/matrix_keypad.c keypad->gpio_all_disabled = false; keypad 265 drivers/input/keyboard/matrix_keypad.c if (test_and_clear_bit(i, keypad->disabled_gpios)) { keypad 276 drivers/input/keyboard/matrix_keypad.c struct matrix_keypad *keypad = platform_get_drvdata(pdev); keypad 278 drivers/input/keyboard/matrix_keypad.c matrix_keypad_stop(keypad->input_dev); keypad 281 drivers/input/keyboard/matrix_keypad.c matrix_keypad_enable_wakeup(keypad); keypad 289 drivers/input/keyboard/matrix_keypad.c struct matrix_keypad *keypad = platform_get_drvdata(pdev); keypad 292 drivers/input/keyboard/matrix_keypad.c matrix_keypad_disable_wakeup(keypad); keypad 294 drivers/input/keyboard/matrix_keypad.c matrix_keypad_start(keypad->input_dev); keypad 304 drivers/input/keyboard/matrix_keypad.c struct matrix_keypad *keypad) keypad 306 drivers/input/keyboard/matrix_keypad.c const struct matrix_keypad_platform_data *pdata = keypad->pdata; keypad 338 drivers/input/keyboard/matrix_keypad.c "matrix-keypad", keypad); keypad 351 drivers/input/keyboard/matrix_keypad.c "matrix-keypad", keypad); keypad 362 drivers/input/keyboard/matrix_keypad.c disable_row_irqs(keypad); keypad 367 drivers/input/keyboard/matrix_keypad.c free_irq(gpio_to_irq(pdata->row_gpios[i]), keypad); keypad 380 drivers/input/keyboard/matrix_keypad.c static void matrix_keypad_free_gpio(struct matrix_keypad *keypad) keypad 382 drivers/input/keyboard/matrix_keypad.c const struct matrix_keypad_platform_data *pdata = keypad->pdata; keypad 386 drivers/input/keyboard/matrix_keypad.c free_irq(pdata->clustered_irq, keypad); keypad 389 drivers/input/keyboard/matrix_keypad.c free_irq(gpio_to_irq(pdata->row_gpios[i]), keypad); keypad 483 drivers/input/keyboard/matrix_keypad.c struct matrix_keypad *keypad; keypad 497 drivers/input/keyboard/matrix_keypad.c keypad = kzalloc(sizeof(struct matrix_keypad), GFP_KERNEL); keypad 499 drivers/input/keyboard/matrix_keypad.c if (!keypad || !input_dev) { keypad 504 drivers/input/keyboard/matrix_keypad.c keypad->input_dev = input_dev; keypad 505 drivers/input/keyboard/matrix_keypad.c keypad->pdata = pdata; keypad 506 drivers/input/keyboard/matrix_keypad.c keypad->row_shift = get_count_order(pdata->num_col_gpios); keypad 507 drivers/input/keyboard/matrix_keypad.c keypad->stopped = true; keypad 508 drivers/input/keyboard/matrix_keypad.c INIT_DELAYED_WORK(&keypad->work, matrix_keypad_scan); keypad 509 drivers/input/keyboard/matrix_keypad.c spin_lock_init(&keypad->lock); keypad 529 drivers/input/keyboard/matrix_keypad.c input_set_drvdata(input_dev, keypad); keypad 531 drivers/input/keyboard/matrix_keypad.c err = matrix_keypad_init_gpio(pdev, keypad); keypad 535 drivers/input/keyboard/matrix_keypad.c err = input_register_device(keypad->input_dev); keypad 540 drivers/input/keyboard/matrix_keypad.c platform_set_drvdata(pdev, keypad); keypad 545 drivers/input/keyboard/matrix_keypad.c matrix_keypad_free_gpio(keypad); keypad 548 drivers/input/keyboard/matrix_keypad.c kfree(keypad); keypad 554 drivers/input/keyboard/matrix_keypad.c struct matrix_keypad *keypad = platform_get_drvdata(pdev); keypad 556 drivers/input/keyboard/matrix_keypad.c matrix_keypad_free_gpio(keypad); keypad 557 drivers/input/keyboard/matrix_keypad.c input_unregister_device(keypad->input_dev); keypad 558 drivers/input/keyboard/matrix_keypad.c kfree(keypad); keypad 87 drivers/input/keyboard/max7359_keypad.c struct max7359_keypad *keypad = dev_id; keypad 88 drivers/input/keyboard/max7359_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 91 drivers/input/keyboard/max7359_keypad.c val = max7359_read_reg(keypad->client, MAX7359_REG_KEYFIFO); keypad 98 drivers/input/keyboard/max7359_keypad.c dev_dbg(&keypad->client->dev, keypad 102 drivers/input/keyboard/max7359_keypad.c input_report_key(input_dev, keypad->keycodes[code], !release); keypad 129 drivers/input/keyboard/max7359_keypad.c struct max7359_keypad *keypad = input_get_drvdata(dev); keypad 131 drivers/input/keyboard/max7359_keypad.c max7359_take_catnap(keypad->client); keypad 138 drivers/input/keyboard/max7359_keypad.c struct max7359_keypad *keypad = input_get_drvdata(dev); keypad 140 drivers/input/keyboard/max7359_keypad.c max7359_fall_deepsleep(keypad->client); keypad 163 drivers/input/keyboard/max7359_keypad.c struct max7359_keypad *keypad; keypad 182 drivers/input/keyboard/max7359_keypad.c keypad = devm_kzalloc(&client->dev, sizeof(struct max7359_keypad), keypad 184 drivers/input/keyboard/max7359_keypad.c if (!keypad) { keypad 195 drivers/input/keyboard/max7359_keypad.c keypad->client = client; keypad 196 drivers/input/keyboard/max7359_keypad.c keypad->input_dev = input_dev; keypad 205 drivers/input/keyboard/max7359_keypad.c input_dev->keycodesize = sizeof(keypad->keycodes[0]); keypad 206 drivers/input/keyboard/max7359_keypad.c input_dev->keycodemax = ARRAY_SIZE(keypad->keycodes); keypad 207 drivers/input/keyboard/max7359_keypad.c input_dev->keycode = keypad->keycodes; keypad 210 drivers/input/keyboard/max7359_keypad.c input_set_drvdata(input_dev, keypad); keypad 215 drivers/input/keyboard/max7359_keypad.c keypad->keycodes, keypad 225 drivers/input/keyboard/max7359_keypad.c client->name, keypad); keypad 73 drivers/input/keyboard/nomadik-ske-keypad.c static void ske_keypad_set_bits(struct ske_keypad *keypad, u16 addr, keypad 78 drivers/input/keyboard/nomadik-ske-keypad.c spin_lock(&keypad->ske_keypad_lock); keypad 80 drivers/input/keyboard/nomadik-ske-keypad.c ret = readl(keypad->reg_base + addr); keypad 83 drivers/input/keyboard/nomadik-ske-keypad.c writel(ret, keypad->reg_base + addr); keypad 85 drivers/input/keyboard/nomadik-ske-keypad.c spin_unlock(&keypad->ske_keypad_lock); keypad 93 drivers/input/keyboard/nomadik-ske-keypad.c static int __init ske_keypad_chip_init(struct ske_keypad *keypad) keypad 96 drivers/input/keyboard/nomadik-ske-keypad.c int timeout = keypad->board->debounce_ms; keypad 99 drivers/input/keyboard/nomadik-ske-keypad.c while ((readl(keypad->reg_base + SKE_RIS) != 0x00000000) && timeout--) keypad 110 drivers/input/keyboard/nomadik-ske-keypad.c spin_lock(&keypad->ske_keypad_lock); keypad 111 drivers/input/keyboard/nomadik-ske-keypad.c value = readl(keypad->reg_base + SKE_DBCR); keypad 113 drivers/input/keyboard/nomadik-ske-keypad.c value |= ((keypad->board->debounce_ms * 32000)/32768) << 8; keypad 114 drivers/input/keyboard/nomadik-ske-keypad.c writel(value, keypad->reg_base + SKE_DBCR); keypad 115 drivers/input/keyboard/nomadik-ske-keypad.c spin_unlock(&keypad->ske_keypad_lock); keypad 118 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_CR, 0x0, SKE_KPMLT); keypad 124 drivers/input/keyboard/nomadik-ske-keypad.c value = (keypad->board->kcol - 1) << 3; keypad 125 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_CR, SKE_KPCN, value); keypad 128 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_ICR, 0x0, SKE_KPICA | SKE_KPICS); keypad 131 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_IMSC, 0x0, SKE_KPIMA); keypad 134 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_CR, 0x0, SKE_KPASEN); keypad 139 drivers/input/keyboard/nomadik-ske-keypad.c static void ske_keypad_report(struct ske_keypad *keypad, u8 status, int col) keypad 142 drivers/input/keyboard/nomadik-ske-keypad.c struct input_dev *input = keypad->input; keypad 155 drivers/input/keyboard/nomadik-ske-keypad.c ske_ris = readl(keypad->reg_base + SKE_RIS); keypad 159 drivers/input/keyboard/nomadik-ske-keypad.c input_report_key(input, keypad->keymap[code], key_pressed); keypad 165 drivers/input/keyboard/nomadik-ske-keypad.c static void ske_keypad_read_data(struct ske_keypad *keypad) keypad 179 drivers/input/keyboard/nomadik-ske-keypad.c ske_asr = readl(keypad->reg_base + SKE_ASR0 + (4 * i)); keypad 187 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_report(keypad, status, col); keypad 192 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_report(keypad, status, col); keypad 199 drivers/input/keyboard/nomadik-ske-keypad.c struct ske_keypad *keypad = dev_id; keypad 200 drivers/input/keyboard/nomadik-ske-keypad.c int timeout = keypad->board->debounce_ms; keypad 203 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_IMSC, ~SKE_KPIMA, 0x0); keypad 204 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_ICR, 0x0, SKE_KPICA); keypad 206 drivers/input/keyboard/nomadik-ske-keypad.c while ((readl(keypad->reg_base + SKE_CR) & SKE_KPASON) && --timeout) keypad 210 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_read_data(keypad); keypad 213 drivers/input/keyboard/nomadik-ske-keypad.c while ((readl(keypad->reg_base + SKE_RIS)) && --timeout) keypad 217 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_IMSC, 0x0, SKE_KPIMA); keypad 226 drivers/input/keyboard/nomadik-ske-keypad.c struct ske_keypad *keypad; keypad 247 drivers/input/keyboard/nomadik-ske-keypad.c keypad = kzalloc(sizeof(struct ske_keypad), GFP_KERNEL); keypad 249 drivers/input/keyboard/nomadik-ske-keypad.c if (!keypad || !input) { keypad 255 drivers/input/keyboard/nomadik-ske-keypad.c keypad->irq = irq; keypad 256 drivers/input/keyboard/nomadik-ske-keypad.c keypad->board = plat; keypad 257 drivers/input/keyboard/nomadik-ske-keypad.c keypad->input = input; keypad 258 drivers/input/keyboard/nomadik-ske-keypad.c spin_lock_init(&keypad->ske_keypad_lock); keypad 266 drivers/input/keyboard/nomadik-ske-keypad.c keypad->reg_base = ioremap(res->start, resource_size(res)); keypad 267 drivers/input/keyboard/nomadik-ske-keypad.c if (!keypad->reg_base) { keypad 273 drivers/input/keyboard/nomadik-ske-keypad.c keypad->pclk = clk_get(&pdev->dev, "apb_pclk"); keypad 274 drivers/input/keyboard/nomadik-ske-keypad.c if (IS_ERR(keypad->pclk)) { keypad 276 drivers/input/keyboard/nomadik-ske-keypad.c error = PTR_ERR(keypad->pclk); keypad 280 drivers/input/keyboard/nomadik-ske-keypad.c keypad->clk = clk_get(&pdev->dev, NULL); keypad 281 drivers/input/keyboard/nomadik-ske-keypad.c if (IS_ERR(keypad->clk)) { keypad 283 drivers/input/keyboard/nomadik-ske-keypad.c error = PTR_ERR(keypad->clk); keypad 293 drivers/input/keyboard/nomadik-ske-keypad.c keypad->keymap, input); keypad 303 drivers/input/keyboard/nomadik-ske-keypad.c error = clk_prepare_enable(keypad->pclk); keypad 309 drivers/input/keyboard/nomadik-ske-keypad.c error = clk_prepare_enable(keypad->clk); keypad 317 drivers/input/keyboard/nomadik-ske-keypad.c if (keypad->board->init) keypad 318 drivers/input/keyboard/nomadik-ske-keypad.c keypad->board->init(); keypad 320 drivers/input/keyboard/nomadik-ske-keypad.c error = ske_keypad_chip_init(keypad); keypad 326 drivers/input/keyboard/nomadik-ske-keypad.c error = request_threaded_irq(keypad->irq, NULL, ske_keypad_irq, keypad 327 drivers/input/keyboard/nomadik-ske-keypad.c IRQF_ONESHOT, "ske-keypad", keypad); keypad 329 drivers/input/keyboard/nomadik-ske-keypad.c dev_err(&pdev->dev, "allocate irq %d failed\n", keypad->irq); keypad 343 drivers/input/keyboard/nomadik-ske-keypad.c platform_set_drvdata(pdev, keypad); keypad 348 drivers/input/keyboard/nomadik-ske-keypad.c free_irq(keypad->irq, keypad); keypad 350 drivers/input/keyboard/nomadik-ske-keypad.c clk_disable_unprepare(keypad->clk); keypad 352 drivers/input/keyboard/nomadik-ske-keypad.c clk_disable_unprepare(keypad->pclk); keypad 354 drivers/input/keyboard/nomadik-ske-keypad.c clk_put(keypad->clk); keypad 356 drivers/input/keyboard/nomadik-ske-keypad.c clk_put(keypad->pclk); keypad 358 drivers/input/keyboard/nomadik-ske-keypad.c iounmap(keypad->reg_base); keypad 363 drivers/input/keyboard/nomadik-ske-keypad.c kfree(keypad); keypad 369 drivers/input/keyboard/nomadik-ske-keypad.c struct ske_keypad *keypad = platform_get_drvdata(pdev); keypad 372 drivers/input/keyboard/nomadik-ske-keypad.c free_irq(keypad->irq, keypad); keypad 374 drivers/input/keyboard/nomadik-ske-keypad.c input_unregister_device(keypad->input); keypad 376 drivers/input/keyboard/nomadik-ske-keypad.c clk_disable_unprepare(keypad->clk); keypad 377 drivers/input/keyboard/nomadik-ske-keypad.c clk_put(keypad->clk); keypad 379 drivers/input/keyboard/nomadik-ske-keypad.c if (keypad->board->exit) keypad 380 drivers/input/keyboard/nomadik-ske-keypad.c keypad->board->exit(); keypad 382 drivers/input/keyboard/nomadik-ske-keypad.c iounmap(keypad->reg_base); keypad 384 drivers/input/keyboard/nomadik-ske-keypad.c kfree(keypad); keypad 393 drivers/input/keyboard/nomadik-ske-keypad.c struct ske_keypad *keypad = platform_get_drvdata(pdev); keypad 399 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_IMSC, ~SKE_KPIMA, 0x0); keypad 407 drivers/input/keyboard/nomadik-ske-keypad.c struct ske_keypad *keypad = platform_get_drvdata(pdev); keypad 413 drivers/input/keyboard/nomadik-ske-keypad.c ske_keypad_set_bits(keypad, SKE_IMSC, 0x0, SKE_KPIMA); keypad 52 drivers/input/keyboard/nspire-keypad.c struct nspire_keypad *keypad = dev_id; keypad 53 drivers/input/keyboard/nspire-keypad.c struct input_dev *input = keypad->input; keypad 61 drivers/input/keyboard/nspire-keypad.c int_sts = readl(keypad->reg_base + KEYPAD_INT) & keypad->int_mask; keypad 65 drivers/input/keyboard/nspire-keypad.c memcpy_fromio(state, keypad->reg_base + KEYPAD_DATA, sizeof(state)); keypad 69 drivers/input/keyboard/nspire-keypad.c if (keypad->active_low) keypad 72 drivers/input/keyboard/nspire-keypad.c changed = bits ^ keypad->state[row]; keypad 76 drivers/input/keyboard/nspire-keypad.c keypad->state[row] = bits; keypad 82 drivers/input/keyboard/nspire-keypad.c code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); keypad 91 drivers/input/keyboard/nspire-keypad.c writel(0x3, keypad->reg_base + KEYPAD_INT); keypad 96 drivers/input/keyboard/nspire-keypad.c static int nspire_keypad_chip_init(struct nspire_keypad *keypad) keypad 100 drivers/input/keyboard/nspire-keypad.c cycles_per_us = (clk_get_rate(keypad->clk) / 1000000); keypad 104 drivers/input/keyboard/nspire-keypad.c delay_cycles = cycles_per_us * keypad->scan_interval; keypad 108 drivers/input/keyboard/nspire-keypad.c row_delay_cycles = cycles_per_us * keypad->row_delay; keypad 115 drivers/input/keyboard/nspire-keypad.c writel(val, keypad->reg_base + KEYPAD_SCAN_MODE); keypad 118 drivers/input/keyboard/nspire-keypad.c writel(val, keypad->reg_base + KEYPAD_CNTL); keypad 121 drivers/input/keyboard/nspire-keypad.c keypad->int_mask = 1 << 1; keypad 122 drivers/input/keyboard/nspire-keypad.c writel(keypad->int_mask, keypad->reg_base + KEYPAD_INTMSK); keypad 126 drivers/input/keyboard/nspire-keypad.c writel(0, keypad->reg_base + KEYPAD_UNKNOWN_INT); keypad 128 drivers/input/keyboard/nspire-keypad.c writel(~0, keypad->reg_base + KEYPAD_UNKNOWN_INT_STS); keypad 135 drivers/input/keyboard/nspire-keypad.c struct nspire_keypad *keypad = input_get_drvdata(input); keypad 138 drivers/input/keyboard/nspire-keypad.c error = clk_prepare_enable(keypad->clk); keypad 142 drivers/input/keyboard/nspire-keypad.c error = nspire_keypad_chip_init(keypad); keypad 144 drivers/input/keyboard/nspire-keypad.c clk_disable_unprepare(keypad->clk); keypad 153 drivers/input/keyboard/nspire-keypad.c struct nspire_keypad *keypad = input_get_drvdata(input); keypad 155 drivers/input/keyboard/nspire-keypad.c clk_disable_unprepare(keypad->clk); keypad 161 drivers/input/keyboard/nspire-keypad.c struct nspire_keypad *keypad; keypad 171 drivers/input/keyboard/nspire-keypad.c keypad = devm_kzalloc(&pdev->dev, sizeof(struct nspire_keypad), keypad 173 drivers/input/keyboard/nspire-keypad.c if (!keypad) { keypad 178 drivers/input/keyboard/nspire-keypad.c keypad->row_shift = get_count_order(KEYPAD_BITMASK_COLS); keypad 181 drivers/input/keyboard/nspire-keypad.c &keypad->scan_interval); keypad 188 drivers/input/keyboard/nspire-keypad.c &keypad->row_delay); keypad 194 drivers/input/keyboard/nspire-keypad.c keypad->active_low = of_property_read_bool(of_node, "active-low"); keypad 196 drivers/input/keyboard/nspire-keypad.c keypad->clk = devm_clk_get(&pdev->dev, NULL); keypad 197 drivers/input/keyboard/nspire-keypad.c if (IS_ERR(keypad->clk)) { keypad 199 drivers/input/keyboard/nspire-keypad.c return PTR_ERR(keypad->clk); keypad 203 drivers/input/keyboard/nspire-keypad.c keypad->reg_base = devm_ioremap_resource(&pdev->dev, res); keypad 204 drivers/input/keyboard/nspire-keypad.c if (IS_ERR(keypad->reg_base)) keypad 205 drivers/input/keyboard/nspire-keypad.c return PTR_ERR(keypad->reg_base); keypad 207 drivers/input/keyboard/nspire-keypad.c keypad->input = input = devm_input_allocate_device(&pdev->dev); keypad 213 drivers/input/keyboard/nspire-keypad.c input_set_drvdata(input, keypad); keypad 234 drivers/input/keyboard/nspire-keypad.c "nspire_keypad", keypad); keypad 249 drivers/input/keyboard/nspire-keypad.c res, keypad->row_delay, keypad->scan_interval, keypad 250 drivers/input/keyboard/nspire-keypad.c keypad->active_low ? ", active_low" : ""); keypad 90 drivers/input/keyboard/pxa27x_keypad.c #define keypad_readl(off) __raw_readl(keypad->mmio_base + (off)) keypad 91 drivers/input/keyboard/pxa27x_keypad.c #define keypad_writel(off, v) __raw_writel((v), keypad->mmio_base + (off)) keypad 118 drivers/input/keyboard/pxa27x_keypad.c static int pxa27x_keypad_matrix_key_parse_dt(struct pxa27x_keypad *keypad, keypad 121 drivers/input/keyboard/pxa27x_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 141 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes, input_dev); keypad 148 drivers/input/keyboard/pxa27x_keypad.c static int pxa27x_keypad_direct_key_parse_dt(struct pxa27x_keypad *keypad, keypad 151 drivers/input/keyboard/pxa27x_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 201 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes[MAX_MATRIX_KEY_NUM + i] = code; keypad 208 drivers/input/keyboard/pxa27x_keypad.c static int pxa27x_keypad_rotary_parse_dt(struct pxa27x_keypad *keypad, keypad 217 drivers/input/keyboard/pxa27x_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 257 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes[n] = keycode; keypad 261 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes[n + 1] = keycode; keypad 275 drivers/input/keyboard/pxa27x_keypad.c keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; keypad 276 drivers/input/keyboard/pxa27x_keypad.c keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; keypad 281 drivers/input/keyboard/pxa27x_keypad.c static int pxa27x_keypad_build_keycode_from_dt(struct pxa27x_keypad *keypad) keypad 283 drivers/input/keyboard/pxa27x_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 295 drivers/input/keyboard/pxa27x_keypad.c error = pxa27x_keypad_matrix_key_parse_dt(keypad, pdata); keypad 301 drivers/input/keyboard/pxa27x_keypad.c error = pxa27x_keypad_direct_key_parse_dt(keypad, pdata); keypad 307 drivers/input/keyboard/pxa27x_keypad.c error = pxa27x_keypad_rotary_parse_dt(keypad, pdata); keypad 324 drivers/input/keyboard/pxa27x_keypad.c input_dev->keycodemax = ARRAY_SIZE(keypad->keycodes); keypad 326 drivers/input/keyboard/pxa27x_keypad.c keypad->pdata = pdata; keypad 332 drivers/input/keyboard/pxa27x_keypad.c static int pxa27x_keypad_build_keycode_from_dt(struct pxa27x_keypad *keypad) keypad 334 drivers/input/keyboard/pxa27x_keypad.c dev_info(keypad->input_dev->dev.parent, "missing platform data\n"); keypad 341 drivers/input/keyboard/pxa27x_keypad.c static int pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) keypad 343 drivers/input/keyboard/pxa27x_keypad.c const struct pxa27x_keypad_platform_data *pdata = keypad->pdata; keypad 344 drivers/input/keyboard/pxa27x_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 352 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes, input_dev); keypad 360 drivers/input/keyboard/pxa27x_keypad.c input_dev->keycodemax = ARRAY_SIZE(keypad->keycodes); keypad 365 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes[MAX_MATRIX_KEY_NUM + i] = keycode; keypad 372 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes[MAX_MATRIX_KEY_NUM + 0] = keycode; keypad 376 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes[MAX_MATRIX_KEY_NUM + 1] = keycode; keypad 379 drivers/input/keyboard/pxa27x_keypad.c keypad->rotary_rel_code[0] = -1; keypad 381 drivers/input/keyboard/pxa27x_keypad.c keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; keypad 389 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes[MAX_MATRIX_KEY_NUM + 2] = keycode; keypad 393 drivers/input/keyboard/pxa27x_keypad.c keypad->keycodes[MAX_MATRIX_KEY_NUM + 3] = keycode; keypad 396 drivers/input/keyboard/pxa27x_keypad.c keypad->rotary_rel_code[1] = -1; keypad 398 drivers/input/keyboard/pxa27x_keypad.c keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; keypad 408 drivers/input/keyboard/pxa27x_keypad.c static void pxa27x_keypad_scan_matrix(struct pxa27x_keypad *keypad) keypad 410 drivers/input/keyboard/pxa27x_keypad.c const struct pxa27x_keypad_platform_data *pdata = keypad->pdata; keypad 411 drivers/input/keyboard/pxa27x_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 456 drivers/input/keyboard/pxa27x_keypad.c bits_changed = keypad->matrix_key_state[col] ^ new_state[col]; keypad 464 drivers/input/keyboard/pxa27x_keypad.c code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); keypad 467 drivers/input/keyboard/pxa27x_keypad.c input_report_key(input_dev, keypad->keycodes[code], keypad 472 drivers/input/keyboard/pxa27x_keypad.c memcpy(keypad->matrix_key_state, new_state, sizeof(new_state)); keypad 487 drivers/input/keyboard/pxa27x_keypad.c static void report_rotary_event(struct pxa27x_keypad *keypad, int r, int delta) keypad 489 drivers/input/keyboard/pxa27x_keypad.c struct input_dev *dev = keypad->input_dev; keypad 494 drivers/input/keyboard/pxa27x_keypad.c if (keypad->rotary_rel_code[r] == -1) { keypad 496 drivers/input/keyboard/pxa27x_keypad.c unsigned char keycode = keypad->keycodes[code]; keypad 506 drivers/input/keyboard/pxa27x_keypad.c input_report_rel(dev, keypad->rotary_rel_code[r], delta); keypad 511 drivers/input/keyboard/pxa27x_keypad.c static void pxa27x_keypad_scan_rotary(struct pxa27x_keypad *keypad) keypad 513 drivers/input/keyboard/pxa27x_keypad.c const struct pxa27x_keypad_platform_data *pdata = keypad->pdata; keypad 521 drivers/input/keyboard/pxa27x_keypad.c report_rotary_event(keypad, 0, rotary_delta(kprec)); keypad 524 drivers/input/keyboard/pxa27x_keypad.c report_rotary_event(keypad, 1, rotary_delta(kprec >> 16)); keypad 527 drivers/input/keyboard/pxa27x_keypad.c static void pxa27x_keypad_scan_direct(struct pxa27x_keypad *keypad) keypad 529 drivers/input/keyboard/pxa27x_keypad.c const struct pxa27x_keypad_platform_data *pdata = keypad->pdata; keypad 530 drivers/input/keyboard/pxa27x_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 538 drivers/input/keyboard/pxa27x_keypad.c pxa27x_keypad_scan_rotary(keypad); keypad 545 drivers/input/keyboard/pxa27x_keypad.c new_state = ~KPDK_DK(kpdk) & keypad->direct_key_mask; keypad 547 drivers/input/keyboard/pxa27x_keypad.c new_state = KPDK_DK(kpdk) & keypad->direct_key_mask; keypad 549 drivers/input/keyboard/pxa27x_keypad.c bits_changed = keypad->direct_key_state ^ new_state; keypad 559 drivers/input/keyboard/pxa27x_keypad.c input_report_key(input_dev, keypad->keycodes[code], keypad 564 drivers/input/keyboard/pxa27x_keypad.c keypad->direct_key_state = new_state; keypad 567 drivers/input/keyboard/pxa27x_keypad.c static void clear_wakeup_event(struct pxa27x_keypad *keypad) keypad 569 drivers/input/keyboard/pxa27x_keypad.c const struct pxa27x_keypad_platform_data *pdata = keypad->pdata; keypad 577 drivers/input/keyboard/pxa27x_keypad.c struct pxa27x_keypad *keypad = dev_id; keypad 580 drivers/input/keyboard/pxa27x_keypad.c clear_wakeup_event(keypad); keypad 583 drivers/input/keyboard/pxa27x_keypad.c pxa27x_keypad_scan_direct(keypad); keypad 586 drivers/input/keyboard/pxa27x_keypad.c pxa27x_keypad_scan_matrix(keypad); keypad 591 drivers/input/keyboard/pxa27x_keypad.c static void pxa27x_keypad_config(struct pxa27x_keypad *keypad) keypad 593 drivers/input/keyboard/pxa27x_keypad.c const struct pxa27x_keypad_platform_data *pdata = keypad->pdata; keypad 628 drivers/input/keyboard/pxa27x_keypad.c keypad->direct_key_mask = pdata->direct_key_mask; keypad 630 drivers/input/keyboard/pxa27x_keypad.c keypad->direct_key_mask = ((1 << direct_key_num) - 1) & ~mask; keypad 643 drivers/input/keyboard/pxa27x_keypad.c struct pxa27x_keypad *keypad = input_get_drvdata(dev); keypad 646 drivers/input/keyboard/pxa27x_keypad.c ret = clk_prepare_enable(keypad->clk); keypad 650 drivers/input/keyboard/pxa27x_keypad.c pxa27x_keypad_config(keypad); keypad 657 drivers/input/keyboard/pxa27x_keypad.c struct pxa27x_keypad *keypad = input_get_drvdata(dev); keypad 660 drivers/input/keyboard/pxa27x_keypad.c clk_disable_unprepare(keypad->clk); keypad 667 drivers/input/keyboard/pxa27x_keypad.c struct pxa27x_keypad *keypad = platform_get_drvdata(pdev); keypad 674 drivers/input/keyboard/pxa27x_keypad.c enable_irq_wake(keypad->irq); keypad 676 drivers/input/keyboard/pxa27x_keypad.c clk_disable_unprepare(keypad->clk); keypad 684 drivers/input/keyboard/pxa27x_keypad.c struct pxa27x_keypad *keypad = platform_get_drvdata(pdev); keypad 685 drivers/input/keyboard/pxa27x_keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 693 drivers/input/keyboard/pxa27x_keypad.c disable_irq_wake(keypad->irq); keypad 699 drivers/input/keyboard/pxa27x_keypad.c ret = clk_prepare_enable(keypad->clk); keypad 701 drivers/input/keyboard/pxa27x_keypad.c pxa27x_keypad_config(keypad); keypad 720 drivers/input/keyboard/pxa27x_keypad.c struct pxa27x_keypad *keypad; keypad 739 drivers/input/keyboard/pxa27x_keypad.c keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), keypad 741 drivers/input/keyboard/pxa27x_keypad.c if (!keypad) keypad 748 drivers/input/keyboard/pxa27x_keypad.c keypad->pdata = pdata; keypad 749 drivers/input/keyboard/pxa27x_keypad.c keypad->input_dev = input_dev; keypad 750 drivers/input/keyboard/pxa27x_keypad.c keypad->irq = irq; keypad 752 drivers/input/keyboard/pxa27x_keypad.c keypad->mmio_base = devm_ioremap_resource(&pdev->dev, res); keypad 753 drivers/input/keyboard/pxa27x_keypad.c if (IS_ERR(keypad->mmio_base)) keypad 754 drivers/input/keyboard/pxa27x_keypad.c return PTR_ERR(keypad->mmio_base); keypad 756 drivers/input/keyboard/pxa27x_keypad.c keypad->clk = devm_clk_get(&pdev->dev, NULL); keypad 757 drivers/input/keyboard/pxa27x_keypad.c if (IS_ERR(keypad->clk)) { keypad 759 drivers/input/keyboard/pxa27x_keypad.c return PTR_ERR(keypad->clk); keypad 768 drivers/input/keyboard/pxa27x_keypad.c input_dev->keycode = keypad->keycodes; keypad 769 drivers/input/keyboard/pxa27x_keypad.c input_dev->keycodesize = sizeof(keypad->keycodes[0]); keypad 770 drivers/input/keyboard/pxa27x_keypad.c input_dev->keycodemax = ARRAY_SIZE(keypad->keycodes); keypad 772 drivers/input/keyboard/pxa27x_keypad.c input_set_drvdata(input_dev, keypad); keypad 778 drivers/input/keyboard/pxa27x_keypad.c error = pxa27x_keypad_build_keycode(keypad); keypad 780 drivers/input/keyboard/pxa27x_keypad.c error = pxa27x_keypad_build_keycode_from_dt(keypad); keypad 786 drivers/input/keyboard/pxa27x_keypad.c pdata = keypad->pdata; keypad 793 drivers/input/keyboard/pxa27x_keypad.c keypad->row_shift = get_count_order(pdata->matrix_key_cols); keypad 795 drivers/input/keyboard/pxa27x_keypad.c if ((pdata->enable_rotary0 && keypad->rotary_rel_code[0] != -1) || keypad 796 drivers/input/keyboard/pxa27x_keypad.c (pdata->enable_rotary1 && keypad->rotary_rel_code[1] != -1)) { keypad 801 drivers/input/keyboard/pxa27x_keypad.c 0, pdev->name, keypad); keypad 814 drivers/input/keyboard/pxa27x_keypad.c platform_set_drvdata(pdev, keypad); keypad 79 drivers/input/keyboard/samsung-keypad.c static void samsung_keypad_scan(struct samsung_keypad *keypad, keypad 85 drivers/input/keyboard/samsung-keypad.c for (col = 0; col < keypad->cols; col++) { keypad 86 drivers/input/keyboard/samsung-keypad.c if (keypad->type == KEYPAD_TYPE_S5PV210) { keypad 94 drivers/input/keyboard/samsung-keypad.c writel(val, keypad->base + SAMSUNG_KEYIFCOL); keypad 97 drivers/input/keyboard/samsung-keypad.c val = readl(keypad->base + SAMSUNG_KEYIFROW); keypad 98 drivers/input/keyboard/samsung-keypad.c row_state[col] = ~val & ((1 << keypad->rows) - 1); keypad 102 drivers/input/keyboard/samsung-keypad.c writel(0, keypad->base + SAMSUNG_KEYIFCOL); keypad 105 drivers/input/keyboard/samsung-keypad.c static bool samsung_keypad_report(struct samsung_keypad *keypad, keypad 108 drivers/input/keyboard/samsung-keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 115 drivers/input/keyboard/samsung-keypad.c for (col = 0; col < keypad->cols; col++) { keypad 116 drivers/input/keyboard/samsung-keypad.c changed = row_state[col] ^ keypad->row_state[col]; keypad 121 drivers/input/keyboard/samsung-keypad.c for (row = 0; row < keypad->rows; row++) { keypad 127 drivers/input/keyboard/samsung-keypad.c dev_dbg(&keypad->input_dev->dev, keypad 131 drivers/input/keyboard/samsung-keypad.c val = MATRIX_SCAN_CODE(row, col, keypad->row_shift); keypad 135 drivers/input/keyboard/samsung-keypad.c keypad->keycodes[val], pressed); keypad 137 drivers/input/keyboard/samsung-keypad.c input_sync(keypad->input_dev); keypad 140 drivers/input/keyboard/samsung-keypad.c memcpy(keypad->row_state, row_state, sizeof(keypad->row_state)); keypad 147 drivers/input/keyboard/samsung-keypad.c struct samsung_keypad *keypad = dev_id; keypad 152 drivers/input/keyboard/samsung-keypad.c pm_runtime_get_sync(&keypad->pdev->dev); keypad 155 drivers/input/keyboard/samsung-keypad.c val = readl(keypad->base + SAMSUNG_KEYIFSTSCLR); keypad 157 drivers/input/keyboard/samsung-keypad.c writel(~0x0, keypad->base + SAMSUNG_KEYIFSTSCLR); keypad 159 drivers/input/keyboard/samsung-keypad.c samsung_keypad_scan(keypad, row_state); keypad 161 drivers/input/keyboard/samsung-keypad.c key_down = samsung_keypad_report(keypad, row_state); keypad 163 drivers/input/keyboard/samsung-keypad.c wait_event_timeout(keypad->wait, keypad->stopped, keypad 166 drivers/input/keyboard/samsung-keypad.c } while (key_down && !keypad->stopped); keypad 168 drivers/input/keyboard/samsung-keypad.c pm_runtime_put(&keypad->pdev->dev); keypad 173 drivers/input/keyboard/samsung-keypad.c static void samsung_keypad_start(struct samsung_keypad *keypad) keypad 177 drivers/input/keyboard/samsung-keypad.c pm_runtime_get_sync(&keypad->pdev->dev); keypad 180 drivers/input/keyboard/samsung-keypad.c keypad->stopped = false; keypad 182 drivers/input/keyboard/samsung-keypad.c clk_enable(keypad->clk); keypad 185 drivers/input/keyboard/samsung-keypad.c val = readl(keypad->base + SAMSUNG_KEYIFCON); keypad 187 drivers/input/keyboard/samsung-keypad.c writel(val, keypad->base + SAMSUNG_KEYIFCON); keypad 190 drivers/input/keyboard/samsung-keypad.c writel(0, keypad->base + SAMSUNG_KEYIFCOL); keypad 192 drivers/input/keyboard/samsung-keypad.c pm_runtime_put(&keypad->pdev->dev); keypad 195 drivers/input/keyboard/samsung-keypad.c static void samsung_keypad_stop(struct samsung_keypad *keypad) keypad 199 drivers/input/keyboard/samsung-keypad.c pm_runtime_get_sync(&keypad->pdev->dev); keypad 202 drivers/input/keyboard/samsung-keypad.c keypad->stopped = true; keypad 203 drivers/input/keyboard/samsung-keypad.c wake_up(&keypad->wait); keypad 204 drivers/input/keyboard/samsung-keypad.c disable_irq(keypad->irq); keypad 207 drivers/input/keyboard/samsung-keypad.c writel(~0x0, keypad->base + SAMSUNG_KEYIFSTSCLR); keypad 210 drivers/input/keyboard/samsung-keypad.c val = readl(keypad->base + SAMSUNG_KEYIFCON); keypad 212 drivers/input/keyboard/samsung-keypad.c writel(val, keypad->base + SAMSUNG_KEYIFCON); keypad 214 drivers/input/keyboard/samsung-keypad.c clk_disable(keypad->clk); keypad 220 drivers/input/keyboard/samsung-keypad.c enable_irq(keypad->irq); keypad 222 drivers/input/keyboard/samsung-keypad.c pm_runtime_put(&keypad->pdev->dev); keypad 227 drivers/input/keyboard/samsung-keypad.c struct samsung_keypad *keypad = input_get_drvdata(input_dev); keypad 229 drivers/input/keyboard/samsung-keypad.c samsung_keypad_start(keypad); keypad 236 drivers/input/keyboard/samsung-keypad.c struct samsung_keypad *keypad = input_get_drvdata(input_dev); keypad 238 drivers/input/keyboard/samsung-keypad.c samsung_keypad_stop(keypad); keypad 319 drivers/input/keyboard/samsung-keypad.c struct samsung_keypad *keypad; keypad 350 drivers/input/keyboard/samsung-keypad.c keymap_size = (pdata->rows << row_shift) * sizeof(keypad->keycodes[0]); keypad 352 drivers/input/keyboard/samsung-keypad.c keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad) + keymap_size, keypad 355 drivers/input/keyboard/samsung-keypad.c if (!keypad || !input_dev) keypad 362 drivers/input/keyboard/samsung-keypad.c keypad->base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); keypad 363 drivers/input/keyboard/samsung-keypad.c if (!keypad->base) keypad 366 drivers/input/keyboard/samsung-keypad.c keypad->clk = devm_clk_get(&pdev->dev, "keypad"); keypad 367 drivers/input/keyboard/samsung-keypad.c if (IS_ERR(keypad->clk)) { keypad 369 drivers/input/keyboard/samsung-keypad.c return PTR_ERR(keypad->clk); keypad 372 drivers/input/keyboard/samsung-keypad.c error = clk_prepare(keypad->clk); keypad 378 drivers/input/keyboard/samsung-keypad.c keypad->input_dev = input_dev; keypad 379 drivers/input/keyboard/samsung-keypad.c keypad->pdev = pdev; keypad 380 drivers/input/keyboard/samsung-keypad.c keypad->row_shift = row_shift; keypad 381 drivers/input/keyboard/samsung-keypad.c keypad->rows = pdata->rows; keypad 382 drivers/input/keyboard/samsung-keypad.c keypad->cols = pdata->cols; keypad 383 drivers/input/keyboard/samsung-keypad.c keypad->stopped = true; keypad 384 drivers/input/keyboard/samsung-keypad.c init_waitqueue_head(&keypad->wait); keypad 387 drivers/input/keyboard/samsung-keypad.c keypad->type = of_device_is_compatible(pdev->dev.of_node, keypad 390 drivers/input/keyboard/samsung-keypad.c keypad->type = platform_get_device_id(pdev)->driver_data; keypad 401 drivers/input/keyboard/samsung-keypad.c keypad->keycodes, input_dev); keypad 411 drivers/input/keyboard/samsung-keypad.c input_set_drvdata(input_dev, keypad); keypad 413 drivers/input/keyboard/samsung-keypad.c keypad->irq = platform_get_irq(pdev, 0); keypad 414 drivers/input/keyboard/samsung-keypad.c if (keypad->irq < 0) { keypad 415 drivers/input/keyboard/samsung-keypad.c error = keypad->irq; keypad 419 drivers/input/keyboard/samsung-keypad.c error = devm_request_threaded_irq(&pdev->dev, keypad->irq, NULL, keypad 421 drivers/input/keyboard/samsung-keypad.c dev_name(&pdev->dev), keypad); keypad 428 drivers/input/keyboard/samsung-keypad.c platform_set_drvdata(pdev, keypad); keypad 431 drivers/input/keyboard/samsung-keypad.c error = input_register_device(keypad->input_dev); keypad 445 drivers/input/keyboard/samsung-keypad.c clk_unprepare(keypad->clk); keypad 451 drivers/input/keyboard/samsung-keypad.c struct samsung_keypad *keypad = platform_get_drvdata(pdev); keypad 455 drivers/input/keyboard/samsung-keypad.c input_unregister_device(keypad->input_dev); keypad 457 drivers/input/keyboard/samsung-keypad.c clk_unprepare(keypad->clk); keypad 466 drivers/input/keyboard/samsung-keypad.c struct samsung_keypad *keypad = platform_get_drvdata(pdev); keypad 470 drivers/input/keyboard/samsung-keypad.c if (keypad->stopped) keypad 474 drivers/input/keyboard/samsung-keypad.c error = enable_irq_wake(keypad->irq); keypad 476 drivers/input/keyboard/samsung-keypad.c keypad->wake_enabled = true; keypad 478 drivers/input/keyboard/samsung-keypad.c val = readl(keypad->base + SAMSUNG_KEYIFCON); keypad 480 drivers/input/keyboard/samsung-keypad.c writel(val, keypad->base + SAMSUNG_KEYIFCON); keypad 482 drivers/input/keyboard/samsung-keypad.c clk_disable(keypad->clk); keypad 490 drivers/input/keyboard/samsung-keypad.c struct samsung_keypad *keypad = platform_get_drvdata(pdev); keypad 493 drivers/input/keyboard/samsung-keypad.c if (keypad->stopped) keypad 496 drivers/input/keyboard/samsung-keypad.c clk_enable(keypad->clk); keypad 498 drivers/input/keyboard/samsung-keypad.c val = readl(keypad->base + SAMSUNG_KEYIFCON); keypad 500 drivers/input/keyboard/samsung-keypad.c writel(val, keypad->base + SAMSUNG_KEYIFCON); keypad 502 drivers/input/keyboard/samsung-keypad.c if (keypad->wake_enabled) keypad 503 drivers/input/keyboard/samsung-keypad.c disable_irq_wake(keypad->irq); keypad 510 drivers/input/keyboard/samsung-keypad.c static void samsung_keypad_toggle_wakeup(struct samsung_keypad *keypad, keypad 515 drivers/input/keyboard/samsung-keypad.c clk_enable(keypad->clk); keypad 517 drivers/input/keyboard/samsung-keypad.c val = readl(keypad->base + SAMSUNG_KEYIFCON); keypad 520 drivers/input/keyboard/samsung-keypad.c if (device_may_wakeup(&keypad->pdev->dev)) keypad 521 drivers/input/keyboard/samsung-keypad.c enable_irq_wake(keypad->irq); keypad 524 drivers/input/keyboard/samsung-keypad.c if (device_may_wakeup(&keypad->pdev->dev)) keypad 525 drivers/input/keyboard/samsung-keypad.c disable_irq_wake(keypad->irq); keypad 527 drivers/input/keyboard/samsung-keypad.c writel(val, keypad->base + SAMSUNG_KEYIFCON); keypad 529 drivers/input/keyboard/samsung-keypad.c clk_disable(keypad->clk); keypad 535 drivers/input/keyboard/samsung-keypad.c struct samsung_keypad *keypad = platform_get_drvdata(pdev); keypad 536 drivers/input/keyboard/samsung-keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 541 drivers/input/keyboard/samsung-keypad.c samsung_keypad_stop(keypad); keypad 543 drivers/input/keyboard/samsung-keypad.c samsung_keypad_toggle_wakeup(keypad, true); keypad 553 drivers/input/keyboard/samsung-keypad.c struct samsung_keypad *keypad = platform_get_drvdata(pdev); keypad 554 drivers/input/keyboard/samsung-keypad.c struct input_dev *input_dev = keypad->input_dev; keypad 558 drivers/input/keyboard/samsung-keypad.c samsung_keypad_toggle_wakeup(keypad, false); keypad 561 drivers/input/keyboard/samsung-keypad.c samsung_keypad_start(keypad); keypad 41 drivers/input/keyboard/st-keyscan.c struct st_keyscan *keypad = dev_id; keypad 42 drivers/input/keyboard/st-keyscan.c unsigned short *keycode = keypad->input_dev->keycode; keypad 46 drivers/input/keyboard/st-keyscan.c state = readl(keypad->base + KEYSCAN_MATRIX_STATE_OFF) & 0xffff; keypad 47 drivers/input/keyboard/st-keyscan.c change = keypad->last_state ^ state; keypad 48 drivers/input/keyboard/st-keyscan.c keypad->last_state = state; keypad 51 drivers/input/keyboard/st-keyscan.c input_report_key(keypad->input_dev, keypad 54 drivers/input/keyboard/st-keyscan.c input_sync(keypad->input_dev); keypad 59 drivers/input/keyboard/st-keyscan.c static int keyscan_start(struct st_keyscan *keypad) keypad 63 drivers/input/keyboard/st-keyscan.c error = clk_enable(keypad->clk); keypad 67 drivers/input/keyboard/st-keyscan.c writel(keypad->debounce_us * (clk_get_rate(keypad->clk) / 1000000), keypad 68 drivers/input/keyboard/st-keyscan.c keypad->base + KEYSCAN_DEBOUNCE_TIME_OFF); keypad 70 drivers/input/keyboard/st-keyscan.c writel(((keypad->n_cols - 1) << KEYSCAN_MATRIX_DIM_X_SHIFT) | keypad 71 drivers/input/keyboard/st-keyscan.c ((keypad->n_rows - 1) << KEYSCAN_MATRIX_DIM_Y_SHIFT), keypad 72 drivers/input/keyboard/st-keyscan.c keypad->base + KEYSCAN_MATRIX_DIM_OFF); keypad 74 drivers/input/keyboard/st-keyscan.c writel(KEYSCAN_CONFIG_ENABLE, keypad->base + KEYSCAN_CONFIG_OFF); keypad 79 drivers/input/keyboard/st-keyscan.c static void keyscan_stop(struct st_keyscan *keypad) keypad 81 drivers/input/keyboard/st-keyscan.c writel(0, keypad->base + KEYSCAN_CONFIG_OFF); keypad 83 drivers/input/keyboard/st-keyscan.c clk_disable(keypad->clk); keypad 88 drivers/input/keyboard/st-keyscan.c struct st_keyscan *keypad = input_get_drvdata(dev); keypad 90 drivers/input/keyboard/st-keyscan.c return keyscan_start(keypad); keypad 95 drivers/input/keyboard/st-keyscan.c struct st_keyscan *keypad = input_get_drvdata(dev); keypad 97 drivers/input/keyboard/st-keyscan.c keyscan_stop(keypad); keypad 217 drivers/input/keyboard/st-keyscan.c struct st_keyscan *keypad = platform_get_drvdata(pdev); keypad 218 drivers/input/keyboard/st-keyscan.c struct input_dev *input = keypad->input_dev; keypad 223 drivers/input/keyboard/st-keyscan.c enable_irq_wake(keypad->irq); keypad 225 drivers/input/keyboard/st-keyscan.c keyscan_stop(keypad); keypad 234 drivers/input/keyboard/st-keyscan.c struct st_keyscan *keypad = platform_get_drvdata(pdev); keypad 235 drivers/input/keyboard/st-keyscan.c struct input_dev *input = keypad->input_dev; keypad 241 drivers/input/keyboard/st-keyscan.c disable_irq_wake(keypad->irq); keypad 243 drivers/input/keyboard/st-keyscan.c retval = keyscan_start(keypad); keypad 140 drivers/input/keyboard/stmpe-keypad.c static int stmpe_keypad_read_data(struct stmpe_keypad *keypad, u8 *data) keypad 142 drivers/input/keyboard/stmpe-keypad.c const struct stmpe_keypad_variant *variant = keypad->variant; keypad 143 drivers/input/keyboard/stmpe-keypad.c struct stmpe *stmpe = keypad->stmpe; keypad 164 drivers/input/keyboard/stmpe-keypad.c struct stmpe_keypad *keypad = dev; keypad 165 drivers/input/keyboard/stmpe-keypad.c struct input_dev *input = keypad->input; keypad 166 drivers/input/keyboard/stmpe-keypad.c const struct stmpe_keypad_variant *variant = keypad->variant; keypad 171 drivers/input/keyboard/stmpe-keypad.c ret = stmpe_keypad_read_data(keypad, fifo); keypad 187 drivers/input/keyboard/stmpe-keypad.c input_report_key(input, keypad->keymap[code], !up); keypad 194 drivers/input/keyboard/stmpe-keypad.c static int stmpe_keypad_altfunc_init(struct stmpe_keypad *keypad) keypad 196 drivers/input/keyboard/stmpe-keypad.c const struct stmpe_keypad_variant *variant = keypad->variant; keypad 199 drivers/input/keyboard/stmpe-keypad.c struct stmpe *stmpe = keypad->stmpe; keypad 220 drivers/input/keyboard/stmpe-keypad.c if (keypad->cols & (1 << i)) { keypad 231 drivers/input/keyboard/stmpe-keypad.c if (keypad->rows & (1 << i)) keypad 264 drivers/input/keyboard/stmpe-keypad.c static int stmpe_keypad_chip_init(struct stmpe_keypad *keypad) keypad 266 drivers/input/keyboard/stmpe-keypad.c const struct stmpe_keypad_variant *variant = keypad->variant; keypad 267 drivers/input/keyboard/stmpe-keypad.c struct stmpe *stmpe = keypad->stmpe; keypad 270 drivers/input/keyboard/stmpe-keypad.c if (keypad->debounce_ms > STMPE_KEYPAD_MAX_DEBOUNCE) keypad 273 drivers/input/keyboard/stmpe-keypad.c if (keypad->scan_count > STMPE_KEYPAD_MAX_SCAN_COUNT) keypad 280 drivers/input/keyboard/stmpe-keypad.c ret = stmpe_keypad_altfunc_init(keypad); keypad 284 drivers/input/keyboard/stmpe-keypad.c ret = stmpe_reg_write(stmpe, STMPE_KPC_COL, keypad->cols); keypad 288 drivers/input/keyboard/stmpe-keypad.c ret = stmpe_reg_write(stmpe, STMPE_KPC_ROW_LSB, keypad->rows); keypad 295 drivers/input/keyboard/stmpe-keypad.c keypad->rows >> 8); keypad 302 drivers/input/keyboard/stmpe-keypad.c keypad->scan_count << 4); keypad 310 drivers/input/keyboard/stmpe-keypad.c (keypad->debounce_ms << 1)); keypad 313 drivers/input/keyboard/stmpe-keypad.c static void stmpe_keypad_fill_used_pins(struct stmpe_keypad *keypad, keypad 322 drivers/input/keyboard/stmpe-keypad.c if (keypad->keymap[code] != KEY_RESERVED) { keypad 323 drivers/input/keyboard/stmpe-keypad.c keypad->rows |= 1 << row; keypad 324 drivers/input/keyboard/stmpe-keypad.c keypad->cols |= 1 << col; keypad 334 drivers/input/keyboard/stmpe-keypad.c struct stmpe_keypad *keypad; keypad 345 drivers/input/keyboard/stmpe-keypad.c keypad = devm_kzalloc(&pdev->dev, sizeof(struct stmpe_keypad), keypad 347 drivers/input/keyboard/stmpe-keypad.c if (!keypad) keypad 350 drivers/input/keyboard/stmpe-keypad.c keypad->stmpe = stmpe; keypad 351 drivers/input/keyboard/stmpe-keypad.c keypad->variant = &stmpe_keypad_variants[stmpe->partnum]; keypad 353 drivers/input/keyboard/stmpe-keypad.c of_property_read_u32(np, "debounce-interval", &keypad->debounce_ms); keypad 354 drivers/input/keyboard/stmpe-keypad.c of_property_read_u32(np, "st,scan-count", &keypad->scan_count); keypad 355 drivers/input/keyboard/stmpe-keypad.c keypad->no_autorepeat = of_property_read_bool(np, "st,no-autorepeat"); keypad 370 drivers/input/keyboard/stmpe-keypad.c keypad->keymap, input); keypad 375 drivers/input/keyboard/stmpe-keypad.c if (!keypad->no_autorepeat) keypad 378 drivers/input/keyboard/stmpe-keypad.c stmpe_keypad_fill_used_pins(keypad, rows, cols); keypad 380 drivers/input/keyboard/stmpe-keypad.c keypad->input = input; keypad 382 drivers/input/keyboard/stmpe-keypad.c error = stmpe_keypad_chip_init(keypad); keypad 388 drivers/input/keyboard/stmpe-keypad.c IRQF_ONESHOT, "stmpe-keypad", keypad); keypad 401 drivers/input/keyboard/stmpe-keypad.c platform_set_drvdata(pdev, keypad); keypad 408 drivers/input/keyboard/stmpe-keypad.c struct stmpe_keypad *keypad = platform_get_drvdata(pdev); keypad 410 drivers/input/keyboard/stmpe-keypad.c stmpe_disable(keypad->stmpe, STMPE_BLOCK_KEYPAD); keypad 114 drivers/input/keyboard/tc3589x-keypad.c static int tc3589x_keypad_init_key_hardware(struct tc_keypad *keypad) keypad 117 drivers/input/keyboard/tc3589x-keypad.c struct tc3589x *tc3589x = keypad->tc3589x; keypad 118 drivers/input/keyboard/tc3589x-keypad.c const struct tc3589x_keypad_platform_data *board = keypad->board; keypad 191 drivers/input/keyboard/tc3589x-keypad.c struct tc_keypad *keypad = dev; keypad 192 drivers/input/keyboard/tc3589x-keypad.c struct tc3589x *tc3589x = keypad->tc3589x; keypad 211 drivers/input/keyboard/tc3589x-keypad.c input_event(keypad->input, EV_MSC, MSC_SCAN, code); keypad 212 drivers/input/keyboard/tc3589x-keypad.c input_report_key(keypad->input, keypad->keymap[code], !up); keypad 213 drivers/input/keyboard/tc3589x-keypad.c input_sync(keypad->input); keypad 226 drivers/input/keyboard/tc3589x-keypad.c static int tc3589x_keypad_enable(struct tc_keypad *keypad) keypad 228 drivers/input/keyboard/tc3589x-keypad.c struct tc3589x *tc3589x = keypad->tc3589x; keypad 257 drivers/input/keyboard/tc3589x-keypad.c keypad->keypad_stopped = false; keypad 262 drivers/input/keyboard/tc3589x-keypad.c static int tc3589x_keypad_disable(struct tc_keypad *keypad) keypad 264 drivers/input/keyboard/tc3589x-keypad.c struct tc3589x *tc3589x = keypad->tc3589x; keypad 287 drivers/input/keyboard/tc3589x-keypad.c keypad->keypad_stopped = true; keypad 295 drivers/input/keyboard/tc3589x-keypad.c struct tc_keypad *keypad = input_get_drvdata(input); keypad 298 drivers/input/keyboard/tc3589x-keypad.c error = tc3589x_keypad_enable(keypad); keypad 304 drivers/input/keyboard/tc3589x-keypad.c error = tc3589x_keypad_init_key_hardware(keypad); keypad 315 drivers/input/keyboard/tc3589x-keypad.c struct tc_keypad *keypad = input_get_drvdata(input); keypad 318 drivers/input/keyboard/tc3589x-keypad.c tc3589x_keypad_disable(keypad); keypad 377 drivers/input/keyboard/tc3589x-keypad.c struct tc_keypad *keypad; keypad 392 drivers/input/keyboard/tc3589x-keypad.c keypad = devm_kzalloc(&pdev->dev, sizeof(struct tc_keypad), keypad 394 drivers/input/keyboard/tc3589x-keypad.c if (!keypad) keypad 403 drivers/input/keyboard/tc3589x-keypad.c keypad->board = plat; keypad 404 drivers/input/keyboard/tc3589x-keypad.c keypad->input = input; keypad 405 drivers/input/keyboard/tc3589x-keypad.c keypad->tc3589x = tc3589x; keypad 422 drivers/input/keyboard/tc3589x-keypad.c keypad->keymap = input->keycode; keypad 428 drivers/input/keyboard/tc3589x-keypad.c input_set_drvdata(input, keypad); keypad 430 drivers/input/keyboard/tc3589x-keypad.c tc3589x_keypad_disable(keypad); keypad 435 drivers/input/keyboard/tc3589x-keypad.c "tc3589x-keypad", keypad); keypad 453 drivers/input/keyboard/tc3589x-keypad.c platform_set_drvdata(pdev, keypad); keypad 462 drivers/input/keyboard/tc3589x-keypad.c struct tc_keypad *keypad = platform_get_drvdata(pdev); keypad 466 drivers/input/keyboard/tc3589x-keypad.c if (keypad->keypad_stopped) keypad 471 drivers/input/keyboard/tc3589x-keypad.c tc3589x_keypad_disable(keypad); keypad 481 drivers/input/keyboard/tc3589x-keypad.c struct tc_keypad *keypad = platform_get_drvdata(pdev); keypad 484 drivers/input/keyboard/tc3589x-keypad.c if (!keypad->keypad_stopped) keypad 489 drivers/input/keyboard/tc3589x-keypad.c tc3589x_keypad_enable(keypad); keypad 721 drivers/mfd/twl-core.c if (IS_ENABLED(CONFIG_KEYBOARD_TWL4030) && pdata->keypad) { keypad 723 drivers/mfd/twl-core.c pdata->keypad, sizeof(*pdata->keypad), keypad 698 include/linux/mfd/twl.h struct twl4030_keypad_data *keypad; keypad 136 scripts/kconfig/lxdialog/checklist.c keypad(dialog, TRUE); keypad 160 scripts/kconfig/lxdialog/checklist.c keypad(list, TRUE); keypad 58 scripts/kconfig/lxdialog/inputbox.c keypad(dialog, TRUE); keypad 199 scripts/kconfig/lxdialog/menubox.c keypad(dialog, TRUE); keypad 223 scripts/kconfig/lxdialog/menubox.c keypad(menu, TRUE); keypad 94 scripts/kconfig/lxdialog/textbox.c keypad(dialog, TRUE); keypad 103 scripts/kconfig/lxdialog/textbox.c keypad(box, TRUE); keypad 320 scripts/kconfig/lxdialog/util.c keypad(stdscr, TRUE); keypad 554 scripts/kconfig/lxdialog/util.c keypad(win, FALSE); keypad 561 scripts/kconfig/lxdialog/util.c keypad(win, TRUE); keypad 47 scripts/kconfig/lxdialog/yesno.c keypad(dialog, TRUE); keypad 981 scripts/kconfig/nconf.c keypad(menu_window, TRUE); keypad 1092 scripts/kconfig/nconf.c keypad((menu_win(curses_menu)), TRUE); keypad 1466 scripts/kconfig/nconf.c keypad(main_window, TRUE); keypad 1500 scripts/kconfig/nconf.c keypad(stdscr, TRUE); keypad 290 scripts/kconfig/nconf.gui.c keypad(win, TRUE); keypad 406 scripts/kconfig/nconf.gui.c keypad(form_win, TRUE); keypad 592 scripts/kconfig/nconf.gui.c keypad(win, TRUE); keypad 89 tools/thermal/tmon/tmon.c keypad(stdscr, FALSE); keypad 358 tools/thermal/tmon/tui.c keypad(stdscr, TRUE); /* enable keyboard mapping */ keypad 414 tools/thermal/tmon/tui.c keypad(w, TRUE); keypad 470 tools/thermal/tmon/tui.c keypad(cooling_device_window, TRUE);