kpad 76 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad = gpiochip_get_data(chip); kpad 77 drivers/input/keyboard/adp5588-keys.c unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]); kpad 78 drivers/input/keyboard/adp5588-keys.c unsigned int bit = ADP5588_BIT(kpad->gpiomap[off]); kpad 81 drivers/input/keyboard/adp5588-keys.c mutex_lock(&kpad->gpio_lock); kpad 83 drivers/input/keyboard/adp5588-keys.c if (kpad->dir[bank] & bit) kpad 84 drivers/input/keyboard/adp5588-keys.c val = kpad->dat_out[bank]; kpad 86 drivers/input/keyboard/adp5588-keys.c val = adp5588_read(kpad->client, GPIO_DAT_STAT1 + bank); kpad 88 drivers/input/keyboard/adp5588-keys.c mutex_unlock(&kpad->gpio_lock); kpad 96 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad = gpiochip_get_data(chip); kpad 97 drivers/input/keyboard/adp5588-keys.c unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]); kpad 98 drivers/input/keyboard/adp5588-keys.c unsigned int bit = ADP5588_BIT(kpad->gpiomap[off]); kpad 100 drivers/input/keyboard/adp5588-keys.c mutex_lock(&kpad->gpio_lock); kpad 103 drivers/input/keyboard/adp5588-keys.c kpad->dat_out[bank] |= bit; kpad 105 drivers/input/keyboard/adp5588-keys.c kpad->dat_out[bank] &= ~bit; kpad 107 drivers/input/keyboard/adp5588-keys.c adp5588_write(kpad->client, GPIO_DAT_OUT1 + bank, kpad 108 drivers/input/keyboard/adp5588-keys.c kpad->dat_out[bank]); kpad 110 drivers/input/keyboard/adp5588-keys.c mutex_unlock(&kpad->gpio_lock); kpad 115 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad = gpiochip_get_data(chip); kpad 116 drivers/input/keyboard/adp5588-keys.c unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]); kpad 117 drivers/input/keyboard/adp5588-keys.c unsigned int bit = ADP5588_BIT(kpad->gpiomap[off]); kpad 120 drivers/input/keyboard/adp5588-keys.c mutex_lock(&kpad->gpio_lock); kpad 122 drivers/input/keyboard/adp5588-keys.c kpad->dir[bank] &= ~bit; kpad 123 drivers/input/keyboard/adp5588-keys.c ret = adp5588_write(kpad->client, GPIO_DIR1 + bank, kpad->dir[bank]); kpad 125 drivers/input/keyboard/adp5588-keys.c mutex_unlock(&kpad->gpio_lock); kpad 133 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad = gpiochip_get_data(chip); kpad 134 drivers/input/keyboard/adp5588-keys.c unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]); kpad 135 drivers/input/keyboard/adp5588-keys.c unsigned int bit = ADP5588_BIT(kpad->gpiomap[off]); kpad 138 drivers/input/keyboard/adp5588-keys.c mutex_lock(&kpad->gpio_lock); kpad 140 drivers/input/keyboard/adp5588-keys.c kpad->dir[bank] |= bit; kpad 143 drivers/input/keyboard/adp5588-keys.c kpad->dat_out[bank] |= bit; kpad 145 drivers/input/keyboard/adp5588-keys.c kpad->dat_out[bank] &= ~bit; kpad 147 drivers/input/keyboard/adp5588-keys.c ret = adp5588_write(kpad->client, GPIO_DAT_OUT1 + bank, kpad 148 drivers/input/keyboard/adp5588-keys.c kpad->dat_out[bank]); kpad 149 drivers/input/keyboard/adp5588-keys.c ret |= adp5588_write(kpad->client, GPIO_DIR1 + bank, kpad 150 drivers/input/keyboard/adp5588-keys.c kpad->dir[bank]); kpad 152 drivers/input/keyboard/adp5588-keys.c mutex_unlock(&kpad->gpio_lock); kpad 157 drivers/input/keyboard/adp5588-keys.c static int adp5588_build_gpiomap(struct adp5588_kpad *kpad, kpad 172 drivers/input/keyboard/adp5588-keys.c for (i = 0; i < kpad->gpimapsize; i++) kpad 173 drivers/input/keyboard/adp5588-keys.c pin_used[kpad->gpimap[i].pin - GPI_PIN_BASE] = true; kpad 177 drivers/input/keyboard/adp5588-keys.c kpad->gpiomap[n_unused++] = i; kpad 182 drivers/input/keyboard/adp5588-keys.c static int adp5588_gpio_add(struct adp5588_kpad *kpad) kpad 184 drivers/input/keyboard/adp5588-keys.c struct device *dev = &kpad->client->dev; kpad 192 drivers/input/keyboard/adp5588-keys.c kpad->gc.ngpio = adp5588_build_gpiomap(kpad, pdata); kpad 193 drivers/input/keyboard/adp5588-keys.c if (kpad->gc.ngpio == 0) { kpad 198 drivers/input/keyboard/adp5588-keys.c kpad->export_gpio = true; kpad 200 drivers/input/keyboard/adp5588-keys.c kpad->gc.direction_input = adp5588_gpio_direction_input; kpad 201 drivers/input/keyboard/adp5588-keys.c kpad->gc.direction_output = adp5588_gpio_direction_output; kpad 202 drivers/input/keyboard/adp5588-keys.c kpad->gc.get = adp5588_gpio_get_value; kpad 203 drivers/input/keyboard/adp5588-keys.c kpad->gc.set = adp5588_gpio_set_value; kpad 204 drivers/input/keyboard/adp5588-keys.c kpad->gc.can_sleep = 1; kpad 206 drivers/input/keyboard/adp5588-keys.c kpad->gc.base = gpio_data->gpio_start; kpad 207 drivers/input/keyboard/adp5588-keys.c kpad->gc.label = kpad->client->name; kpad 208 drivers/input/keyboard/adp5588-keys.c kpad->gc.owner = THIS_MODULE; kpad 209 drivers/input/keyboard/adp5588-keys.c kpad->gc.names = gpio_data->names; kpad 211 drivers/input/keyboard/adp5588-keys.c mutex_init(&kpad->gpio_lock); kpad 213 drivers/input/keyboard/adp5588-keys.c error = gpiochip_add_data(&kpad->gc, kpad); kpad 220 drivers/input/keyboard/adp5588-keys.c kpad->dat_out[i] = adp5588_read(kpad->client, kpad 222 drivers/input/keyboard/adp5588-keys.c kpad->dir[i] = adp5588_read(kpad->client, GPIO_DIR1 + i); kpad 226 drivers/input/keyboard/adp5588-keys.c error = gpio_data->setup(kpad->client, kpad 227 drivers/input/keyboard/adp5588-keys.c kpad->gc.base, kpad->gc.ngpio, kpad 236 drivers/input/keyboard/adp5588-keys.c static void adp5588_gpio_remove(struct adp5588_kpad *kpad) kpad 238 drivers/input/keyboard/adp5588-keys.c struct device *dev = &kpad->client->dev; kpad 243 drivers/input/keyboard/adp5588-keys.c if (!kpad->export_gpio) kpad 247 drivers/input/keyboard/adp5588-keys.c error = gpio_data->teardown(kpad->client, kpad 248 drivers/input/keyboard/adp5588-keys.c kpad->gc.base, kpad->gc.ngpio, kpad 254 drivers/input/keyboard/adp5588-keys.c gpiochip_remove(&kpad->gc); kpad 257 drivers/input/keyboard/adp5588-keys.c static inline int adp5588_gpio_add(struct adp5588_kpad *kpad) kpad 262 drivers/input/keyboard/adp5588-keys.c static inline void adp5588_gpio_remove(struct adp5588_kpad *kpad) kpad 267 drivers/input/keyboard/adp5588-keys.c static void adp5588_report_events(struct adp5588_kpad *kpad, int ev_cnt) kpad 272 drivers/input/keyboard/adp5588-keys.c int key = adp5588_read(kpad->client, Key_EVENTA + i); kpad 276 drivers/input/keyboard/adp5588-keys.c for (j = 0; j < kpad->gpimapsize; j++) { kpad 277 drivers/input/keyboard/adp5588-keys.c if (key_val == kpad->gpimap[j].pin) { kpad 278 drivers/input/keyboard/adp5588-keys.c input_report_switch(kpad->input, kpad 279 drivers/input/keyboard/adp5588-keys.c kpad->gpimap[j].sw_evt, kpad 285 drivers/input/keyboard/adp5588-keys.c input_report_key(kpad->input, kpad 286 drivers/input/keyboard/adp5588-keys.c kpad->keycode[key_val - 1], kpad 294 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad = container_of(work, kpad 296 drivers/input/keyboard/adp5588-keys.c struct i2c_client *client = kpad->client; kpad 307 drivers/input/keyboard/adp5588-keys.c adp5588_report_events(kpad, ev_cnt); kpad 308 drivers/input/keyboard/adp5588-keys.c input_sync(kpad->input); kpad 316 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad = handle; kpad 324 drivers/input/keyboard/adp5588-keys.c schedule_delayed_work(&kpad->work, kpad->delay); kpad 393 drivers/input/keyboard/adp5588-keys.c static void adp5588_report_switch_state(struct adp5588_kpad *kpad) kpad 395 drivers/input/keyboard/adp5588-keys.c int gpi_stat1 = adp5588_read(kpad->client, GPIO_DAT_STAT1); kpad 396 drivers/input/keyboard/adp5588-keys.c int gpi_stat2 = adp5588_read(kpad->client, GPIO_DAT_STAT2); kpad 397 drivers/input/keyboard/adp5588-keys.c int gpi_stat3 = adp5588_read(kpad->client, GPIO_DAT_STAT3); kpad 401 drivers/input/keyboard/adp5588-keys.c for (i = 0; i < kpad->gpimapsize; i++) { kpad 402 drivers/input/keyboard/adp5588-keys.c unsigned short pin = kpad->gpimap[i].pin; kpad 416 drivers/input/keyboard/adp5588-keys.c dev_err(&kpad->client->dev, kpad 422 drivers/input/keyboard/adp5588-keys.c input_report_switch(kpad->input, kpad 423 drivers/input/keyboard/adp5588-keys.c kpad->gpimap[i].sw_evt, kpad 427 drivers/input/keyboard/adp5588-keys.c input_sync(kpad->input); kpad 434 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad; kpad 499 drivers/input/keyboard/adp5588-keys.c kpad = kzalloc(sizeof(*kpad), GFP_KERNEL); kpad 501 drivers/input/keyboard/adp5588-keys.c if (!kpad || !input) { kpad 506 drivers/input/keyboard/adp5588-keys.c kpad->client = client; kpad 507 drivers/input/keyboard/adp5588-keys.c kpad->input = input; kpad 508 drivers/input/keyboard/adp5588-keys.c INIT_DELAYED_WORK(&kpad->work, adp5588_work); kpad 518 drivers/input/keyboard/adp5588-keys.c kpad->delay = msecs_to_jiffies(30); kpad 524 drivers/input/keyboard/adp5588-keys.c input_set_drvdata(input, kpad); kpad 531 drivers/input/keyboard/adp5588-keys.c input->keycodesize = sizeof(kpad->keycode[0]); kpad 533 drivers/input/keyboard/adp5588-keys.c input->keycode = kpad->keycode; kpad 535 drivers/input/keyboard/adp5588-keys.c memcpy(kpad->keycode, pdata->keymap, kpad 538 drivers/input/keyboard/adp5588-keys.c kpad->gpimap = pdata->gpimap; kpad 539 drivers/input/keyboard/adp5588-keys.c kpad->gpimapsize = pdata->gpimapsize; kpad 548 drivers/input/keyboard/adp5588-keys.c if (kpad->keycode[i] <= KEY_MAX) kpad 549 drivers/input/keyboard/adp5588-keys.c __set_bit(kpad->keycode[i], input->keybit); kpad 552 drivers/input/keyboard/adp5588-keys.c if (kpad->gpimapsize) kpad 554 drivers/input/keyboard/adp5588-keys.c for (i = 0; i < kpad->gpimapsize; i++) kpad 555 drivers/input/keyboard/adp5588-keys.c __set_bit(kpad->gpimap[i].sw_evt, input->swbit); kpad 565 drivers/input/keyboard/adp5588-keys.c client->dev.driver->name, kpad); kpad 575 drivers/input/keyboard/adp5588-keys.c if (kpad->gpimapsize) kpad 576 drivers/input/keyboard/adp5588-keys.c adp5588_report_switch_state(kpad); kpad 578 drivers/input/keyboard/adp5588-keys.c error = adp5588_gpio_add(kpad); kpad 583 drivers/input/keyboard/adp5588-keys.c i2c_set_clientdata(client, kpad); kpad 589 drivers/input/keyboard/adp5588-keys.c free_irq(client->irq, kpad); kpad 590 drivers/input/keyboard/adp5588-keys.c cancel_delayed_work_sync(&kpad->work); kpad 596 drivers/input/keyboard/adp5588-keys.c kfree(kpad); kpad 603 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad = i2c_get_clientdata(client); kpad 606 drivers/input/keyboard/adp5588-keys.c free_irq(client->irq, kpad); kpad 607 drivers/input/keyboard/adp5588-keys.c cancel_delayed_work_sync(&kpad->work); kpad 608 drivers/input/keyboard/adp5588-keys.c input_unregister_device(kpad->input); kpad 609 drivers/input/keyboard/adp5588-keys.c adp5588_gpio_remove(kpad); kpad 610 drivers/input/keyboard/adp5588-keys.c kfree(kpad); kpad 618 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad = dev_get_drvdata(dev); kpad 619 drivers/input/keyboard/adp5588-keys.c struct i2c_client *client = kpad->client; kpad 622 drivers/input/keyboard/adp5588-keys.c cancel_delayed_work_sync(&kpad->work); kpad 632 drivers/input/keyboard/adp5588-keys.c struct adp5588_kpad *kpad = dev_get_drvdata(dev); kpad 633 drivers/input/keyboard/adp5588-keys.c struct i2c_client *client = kpad->client; kpad 390 drivers/input/keyboard/adp5589-keys.c struct adp5589_kpad *kpad = gpiochip_get_data(chip); kpad 391 drivers/input/keyboard/adp5589-keys.c unsigned int bank = kpad->var->bank(kpad->gpiomap[off]); kpad 392 drivers/input/keyboard/adp5589-keys.c unsigned int bit = kpad->var->bit(kpad->gpiomap[off]); kpad 394 drivers/input/keyboard/adp5589-keys.c return !!(adp5589_read(kpad->client, kpad 395 drivers/input/keyboard/adp5589-keys.c kpad->var->reg(ADP5589_GPI_STATUS_A) + bank) & kpad 402 drivers/input/keyboard/adp5589-keys.c struct adp5589_kpad *kpad = gpiochip_get_data(chip); kpad 403 drivers/input/keyboard/adp5589-keys.c unsigned int bank = kpad->var->bank(kpad->gpiomap[off]); kpad 404 drivers/input/keyboard/adp5589-keys.c unsigned int bit = kpad->var->bit(kpad->gpiomap[off]); kpad 406 drivers/input/keyboard/adp5589-keys.c mutex_lock(&kpad->gpio_lock); kpad 409 drivers/input/keyboard/adp5589-keys.c kpad->dat_out[bank] |= bit; kpad 411 drivers/input/keyboard/adp5589-keys.c kpad->dat_out[bank] &= ~bit; kpad 413 drivers/input/keyboard/adp5589-keys.c adp5589_write(kpad->client, kpad->var->reg(ADP5589_GPO_DATA_OUT_A) + kpad 414 drivers/input/keyboard/adp5589-keys.c bank, kpad->dat_out[bank]); kpad 416 drivers/input/keyboard/adp5589-keys.c mutex_unlock(&kpad->gpio_lock); kpad 421 drivers/input/keyboard/adp5589-keys.c struct adp5589_kpad *kpad = gpiochip_get_data(chip); kpad 422 drivers/input/keyboard/adp5589-keys.c unsigned int bank = kpad->var->bank(kpad->gpiomap[off]); kpad 423 drivers/input/keyboard/adp5589-keys.c unsigned int bit = kpad->var->bit(kpad->gpiomap[off]); kpad 426 drivers/input/keyboard/adp5589-keys.c mutex_lock(&kpad->gpio_lock); kpad 428 drivers/input/keyboard/adp5589-keys.c kpad->dir[bank] &= ~bit; kpad 429 drivers/input/keyboard/adp5589-keys.c ret = adp5589_write(kpad->client, kpad 430 drivers/input/keyboard/adp5589-keys.c kpad->var->reg(ADP5589_GPIO_DIRECTION_A) + bank, kpad 431 drivers/input/keyboard/adp5589-keys.c kpad->dir[bank]); kpad 433 drivers/input/keyboard/adp5589-keys.c mutex_unlock(&kpad->gpio_lock); kpad 441 drivers/input/keyboard/adp5589-keys.c struct adp5589_kpad *kpad = gpiochip_get_data(chip); kpad 442 drivers/input/keyboard/adp5589-keys.c unsigned int bank = kpad->var->bank(kpad->gpiomap[off]); kpad 443 drivers/input/keyboard/adp5589-keys.c unsigned int bit = kpad->var->bit(kpad->gpiomap[off]); kpad 446 drivers/input/keyboard/adp5589-keys.c mutex_lock(&kpad->gpio_lock); kpad 448 drivers/input/keyboard/adp5589-keys.c kpad->dir[bank] |= bit; kpad 451 drivers/input/keyboard/adp5589-keys.c kpad->dat_out[bank] |= bit; kpad 453 drivers/input/keyboard/adp5589-keys.c kpad->dat_out[bank] &= ~bit; kpad 455 drivers/input/keyboard/adp5589-keys.c ret = adp5589_write(kpad->client, kpad->var->reg(ADP5589_GPO_DATA_OUT_A) kpad 456 drivers/input/keyboard/adp5589-keys.c + bank, kpad->dat_out[bank]); kpad 457 drivers/input/keyboard/adp5589-keys.c ret |= adp5589_write(kpad->client, kpad 458 drivers/input/keyboard/adp5589-keys.c kpad->var->reg(ADP5589_GPIO_DIRECTION_A) + bank, kpad 459 drivers/input/keyboard/adp5589-keys.c kpad->dir[bank]); kpad 461 drivers/input/keyboard/adp5589-keys.c mutex_unlock(&kpad->gpio_lock); kpad 466 drivers/input/keyboard/adp5589-keys.c static int adp5589_build_gpiomap(struct adp5589_kpad *kpad, kpad 475 drivers/input/keyboard/adp5589-keys.c for (i = 0; i < kpad->var->maxgpio; i++) kpad 479 drivers/input/keyboard/adp5589-keys.c for (i = 0; i < kpad->gpimapsize; i++) kpad 480 drivers/input/keyboard/adp5589-keys.c pin_used[kpad->gpimap[i].pin - kpad->var->gpi_pin_base] = true; kpad 482 drivers/input/keyboard/adp5589-keys.c if (kpad->extend_cfg & R4_EXTEND_CFG) kpad 485 drivers/input/keyboard/adp5589-keys.c if (kpad->extend_cfg & C4_EXTEND_CFG) kpad 486 drivers/input/keyboard/adp5589-keys.c pin_used[kpad->var->c4_extend_cfg] = true; kpad 488 drivers/input/keyboard/adp5589-keys.c if (!kpad->support_row5) kpad 491 drivers/input/keyboard/adp5589-keys.c for (i = 0; i < kpad->var->maxgpio; i++) kpad 493 drivers/input/keyboard/adp5589-keys.c kpad->gpiomap[n_unused++] = i; kpad 498 drivers/input/keyboard/adp5589-keys.c static int adp5589_gpio_add(struct adp5589_kpad *kpad) kpad 500 drivers/input/keyboard/adp5589-keys.c struct device *dev = &kpad->client->dev; kpad 508 drivers/input/keyboard/adp5589-keys.c kpad->gc.parent = dev; kpad 509 drivers/input/keyboard/adp5589-keys.c kpad->gc.ngpio = adp5589_build_gpiomap(kpad, pdata); kpad 510 drivers/input/keyboard/adp5589-keys.c if (kpad->gc.ngpio == 0) { kpad 515 drivers/input/keyboard/adp5589-keys.c kpad->export_gpio = true; kpad 517 drivers/input/keyboard/adp5589-keys.c kpad->gc.direction_input = adp5589_gpio_direction_input; kpad 518 drivers/input/keyboard/adp5589-keys.c kpad->gc.direction_output = adp5589_gpio_direction_output; kpad 519 drivers/input/keyboard/adp5589-keys.c kpad->gc.get = adp5589_gpio_get_value; kpad 520 drivers/input/keyboard/adp5589-keys.c kpad->gc.set = adp5589_gpio_set_value; kpad 521 drivers/input/keyboard/adp5589-keys.c kpad->gc.can_sleep = 1; kpad 523 drivers/input/keyboard/adp5589-keys.c kpad->gc.base = gpio_data->gpio_start; kpad 524 drivers/input/keyboard/adp5589-keys.c kpad->gc.label = kpad->client->name; kpad 525 drivers/input/keyboard/adp5589-keys.c kpad->gc.owner = THIS_MODULE; kpad 527 drivers/input/keyboard/adp5589-keys.c mutex_init(&kpad->gpio_lock); kpad 529 drivers/input/keyboard/adp5589-keys.c error = gpiochip_add_data(&kpad->gc, kpad); kpad 535 drivers/input/keyboard/adp5589-keys.c for (i = 0; i <= kpad->var->bank(kpad->var->maxgpio); i++) { kpad 536 drivers/input/keyboard/adp5589-keys.c kpad->dat_out[i] = adp5589_read(kpad->client, kpad->var->reg( kpad 538 drivers/input/keyboard/adp5589-keys.c kpad->dir[i] = adp5589_read(kpad->client, kpad->var->reg( kpad 543 drivers/input/keyboard/adp5589-keys.c error = gpio_data->setup(kpad->client, kpad 544 drivers/input/keyboard/adp5589-keys.c kpad->gc.base, kpad->gc.ngpio, kpad 553 drivers/input/keyboard/adp5589-keys.c static void adp5589_gpio_remove(struct adp5589_kpad *kpad) kpad 555 drivers/input/keyboard/adp5589-keys.c struct device *dev = &kpad->client->dev; kpad 560 drivers/input/keyboard/adp5589-keys.c if (!kpad->export_gpio) kpad 564 drivers/input/keyboard/adp5589-keys.c error = gpio_data->teardown(kpad->client, kpad 565 drivers/input/keyboard/adp5589-keys.c kpad->gc.base, kpad->gc.ngpio, kpad 571 drivers/input/keyboard/adp5589-keys.c gpiochip_remove(&kpad->gc); kpad 574 drivers/input/keyboard/adp5589-keys.c static inline int adp5589_gpio_add(struct adp5589_kpad *kpad) kpad 579 drivers/input/keyboard/adp5589-keys.c static inline void adp5589_gpio_remove(struct adp5589_kpad *kpad) kpad 584 drivers/input/keyboard/adp5589-keys.c static void adp5589_report_switches(struct adp5589_kpad *kpad, kpad 589 drivers/input/keyboard/adp5589-keys.c for (i = 0; i < kpad->gpimapsize; i++) { kpad 590 drivers/input/keyboard/adp5589-keys.c if (key_val == kpad->gpimap[i].pin) { kpad 591 drivers/input/keyboard/adp5589-keys.c input_report_switch(kpad->input, kpad 592 drivers/input/keyboard/adp5589-keys.c kpad->gpimap[i].sw_evt, kpad 599 drivers/input/keyboard/adp5589-keys.c static void adp5589_report_events(struct adp5589_kpad *kpad, int ev_cnt) kpad 604 drivers/input/keyboard/adp5589-keys.c int key = adp5589_read(kpad->client, ADP5589_5_FIFO_1 + i); kpad 607 drivers/input/keyboard/adp5589-keys.c if (key_val >= kpad->var->gpi_pin_base && kpad 608 drivers/input/keyboard/adp5589-keys.c key_val <= kpad->var->gpi_pin_end) { kpad 609 drivers/input/keyboard/adp5589-keys.c adp5589_report_switches(kpad, key, key_val); kpad 611 drivers/input/keyboard/adp5589-keys.c input_report_key(kpad->input, kpad 612 drivers/input/keyboard/adp5589-keys.c kpad->keycode[key_val - 1], kpad 620 drivers/input/keyboard/adp5589-keys.c struct adp5589_kpad *kpad = handle; kpad 621 drivers/input/keyboard/adp5589-keys.c struct i2c_client *client = kpad->client; kpad 632 drivers/input/keyboard/adp5589-keys.c adp5589_report_events(kpad, ev_cnt); kpad 633 drivers/input/keyboard/adp5589-keys.c input_sync(kpad->input); kpad 642 drivers/input/keyboard/adp5589-keys.c static int adp5589_get_evcode(struct adp5589_kpad *kpad, unsigned short key) kpad 646 drivers/input/keyboard/adp5589-keys.c for (i = 0; i < kpad->var->keymapsize; i++) kpad 647 drivers/input/keyboard/adp5589-keys.c if (key == kpad->keycode[i]) kpad 650 drivers/input/keyboard/adp5589-keys.c dev_err(&kpad->client->dev, "RESET/UNLOCK key not in keycode map\n"); kpad 655 drivers/input/keyboard/adp5589-keys.c static int adp5589_setup(struct adp5589_kpad *kpad) kpad 657 drivers/input/keyboard/adp5589-keys.c struct i2c_client *client = kpad->client; kpad 660 drivers/input/keyboard/adp5589-keys.c u8 (*reg) (u8) = kpad->var->reg; kpad 666 drivers/input/keyboard/adp5589-keys.c pdata->keypad_en_mask & kpad->var->row_mask); kpad 668 drivers/input/keyboard/adp5589-keys.c (pdata->keypad_en_mask >> kpad->var->col_shift) & kpad 669 drivers/input/keyboard/adp5589-keys.c kpad->var->col_mask); kpad 671 drivers/input/keyboard/adp5589-keys.c if (!kpad->is_adp5585) kpad 675 drivers/input/keyboard/adp5589-keys.c if (!kpad->is_adp5585 && pdata->en_keylock) { kpad 691 drivers/input/keyboard/adp5589-keys.c if (pin <= kpad->var->gpi_pin_row_end) { kpad 692 drivers/input/keyboard/adp5589-keys.c evt_mode1 |= (1 << (pin - kpad->var->gpi_pin_row_base)); kpad 695 drivers/input/keyboard/adp5589-keys.c ((1 << (pin - kpad->var->gpi_pin_col_base)) & 0xFF); kpad 696 drivers/input/keyboard/adp5589-keys.c if (!kpad->is_adp5585) kpad 698 drivers/input/keyboard/adp5589-keys.c kpad->var->gpi_pin_col_base)) >> 8); kpad 707 drivers/input/keyboard/adp5589-keys.c if (!kpad->is_adp5585) kpad 717 drivers/input/keyboard/adp5589-keys.c for (i = 0; i <= kpad->var->max_row_num; i++) { kpad 730 drivers/input/keyboard/adp5589-keys.c if (i % 4 == 3 || i == kpad->var->max_row_num) { kpad 737 drivers/input/keyboard/adp5589-keys.c for (i = 0; i <= kpad->var->max_col_num; i++) { kpad 738 drivers/input/keyboard/adp5589-keys.c unsigned val = 0, bit = 1 << (i + kpad->var->col_shift); kpad 750 drivers/input/keyboard/adp5589-keys.c if (i % 4 == 3 || i == kpad->var->max_col_num) { kpad 760 drivers/input/keyboard/adp5589-keys.c adp5589_get_evcode(kpad, kpad 763 drivers/input/keyboard/adp5589-keys.c adp5589_get_evcode(kpad, kpad 766 drivers/input/keyboard/adp5589-keys.c adp5589_get_evcode(kpad, kpad 768 drivers/input/keyboard/adp5589-keys.c kpad->extend_cfg |= R4_EXTEND_CFG; kpad 773 drivers/input/keyboard/adp5589-keys.c adp5589_get_evcode(kpad, kpad 776 drivers/input/keyboard/adp5589-keys.c adp5589_get_evcode(kpad, kpad 778 drivers/input/keyboard/adp5589-keys.c kpad->extend_cfg |= C4_EXTEND_CFG; kpad 781 drivers/input/keyboard/adp5589-keys.c if (kpad->extend_cfg) { kpad 785 drivers/input/keyboard/adp5589-keys.c kpad->extend_cfg); kpad 789 drivers/input/keyboard/adp5589-keys.c pdata->debounce_dis_mask & kpad->var->row_mask); kpad 792 drivers/input/keyboard/adp5589-keys.c (pdata->debounce_dis_mask >> kpad->var->col_shift) kpad 793 drivers/input/keyboard/adp5589-keys.c & kpad->var->col_mask); kpad 795 drivers/input/keyboard/adp5589-keys.c if (!kpad->is_adp5585) kpad 802 drivers/input/keyboard/adp5589-keys.c (kpad->is_adp5585 ? 0 : LOGIC2_INT) | kpad 804 drivers/input/keyboard/adp5589-keys.c (kpad->is_adp5585 ? 0 : LOCK_INT) | kpad 820 drivers/input/keyboard/adp5589-keys.c static void adp5589_report_switch_state(struct adp5589_kpad *kpad) kpad 824 drivers/input/keyboard/adp5589-keys.c int gpi_stat1 = adp5589_read(kpad->client, kpad 825 drivers/input/keyboard/adp5589-keys.c kpad->var->reg(ADP5589_GPI_STATUS_A)); kpad 826 drivers/input/keyboard/adp5589-keys.c int gpi_stat2 = adp5589_read(kpad->client, kpad 827 drivers/input/keyboard/adp5589-keys.c kpad->var->reg(ADP5589_GPI_STATUS_B)); kpad 828 drivers/input/keyboard/adp5589-keys.c int gpi_stat3 = !kpad->is_adp5585 ? kpad 829 drivers/input/keyboard/adp5589-keys.c adp5589_read(kpad->client, ADP5589_GPI_STATUS_C) : 0; kpad 831 drivers/input/keyboard/adp5589-keys.c for (i = 0; i < kpad->gpimapsize; i++) { kpad 832 drivers/input/keyboard/adp5589-keys.c unsigned short pin = kpad->gpimap[i].pin; kpad 834 drivers/input/keyboard/adp5589-keys.c if (pin <= kpad->var->gpi_pin_row_end) { kpad 836 drivers/input/keyboard/adp5589-keys.c pin_loc = pin - kpad->var->gpi_pin_row_base; kpad 837 drivers/input/keyboard/adp5589-keys.c } else if ((pin - kpad->var->gpi_pin_col_base) < 8) { kpad 839 drivers/input/keyboard/adp5589-keys.c pin_loc = pin - kpad->var->gpi_pin_col_base; kpad 842 drivers/input/keyboard/adp5589-keys.c pin_loc = pin - kpad->var->gpi_pin_col_base - 8; kpad 846 drivers/input/keyboard/adp5589-keys.c dev_err(&kpad->client->dev, kpad 852 drivers/input/keyboard/adp5589-keys.c input_report_switch(kpad->input, kpad 853 drivers/input/keyboard/adp5589-keys.c kpad->gpimap[i].sw_evt, kpad 857 drivers/input/keyboard/adp5589-keys.c input_sync(kpad->input); kpad 863 drivers/input/keyboard/adp5589-keys.c struct adp5589_kpad *kpad; kpad 882 drivers/input/keyboard/adp5589-keys.c kpad = kzalloc(sizeof(*kpad), GFP_KERNEL); kpad 883 drivers/input/keyboard/adp5589-keys.c if (!kpad) kpad 888 drivers/input/keyboard/adp5589-keys.c kpad->support_row5 = true; kpad 891 drivers/input/keyboard/adp5589-keys.c kpad->is_adp5585 = true; kpad 892 drivers/input/keyboard/adp5589-keys.c kpad->var = &const_adp5585; kpad 895 drivers/input/keyboard/adp5589-keys.c kpad->support_row5 = true; kpad 896 drivers/input/keyboard/adp5589-keys.c kpad->var = &const_adp5589; kpad 900 drivers/input/keyboard/adp5589-keys.c if (!((pdata->keypad_en_mask & kpad->var->row_mask) && kpad 901 drivers/input/keyboard/adp5589-keys.c (pdata->keypad_en_mask >> kpad->var->col_shift)) || kpad 908 drivers/input/keyboard/adp5589-keys.c if (pdata->keymapsize != kpad->var->keymapsize) { kpad 920 drivers/input/keyboard/adp5589-keys.c if (pdata->gpimapsize > kpad->var->gpimapsize_max) { kpad 929 drivers/input/keyboard/adp5589-keys.c if (pin < kpad->var->gpi_pin_base || kpad 930 drivers/input/keyboard/adp5589-keys.c pin > kpad->var->gpi_pin_end) { kpad 936 drivers/input/keyboard/adp5589-keys.c if ((1 << (pin - kpad->var->gpi_pin_row_base)) & kpad 956 drivers/input/keyboard/adp5589-keys.c kpad->client = client; kpad 957 drivers/input/keyboard/adp5589-keys.c kpad->input = input; kpad 971 drivers/input/keyboard/adp5589-keys.c input_set_drvdata(input, kpad); kpad 978 drivers/input/keyboard/adp5589-keys.c input->keycodesize = sizeof(kpad->keycode[0]); kpad 980 drivers/input/keyboard/adp5589-keys.c input->keycode = kpad->keycode; kpad 982 drivers/input/keyboard/adp5589-keys.c memcpy(kpad->keycode, pdata->keymap, kpad 985 drivers/input/keyboard/adp5589-keys.c kpad->gpimap = pdata->gpimap; kpad 986 drivers/input/keyboard/adp5589-keys.c kpad->gpimapsize = pdata->gpimapsize; kpad 995 drivers/input/keyboard/adp5589-keys.c if (kpad->keycode[i] <= KEY_MAX) kpad 996 drivers/input/keyboard/adp5589-keys.c __set_bit(kpad->keycode[i], input->keybit); kpad 999 drivers/input/keyboard/adp5589-keys.c if (kpad->gpimapsize) kpad 1001 drivers/input/keyboard/adp5589-keys.c for (i = 0; i < kpad->gpimapsize; i++) kpad 1002 drivers/input/keyboard/adp5589-keys.c __set_bit(kpad->gpimap[i].sw_evt, input->swbit); kpad 1012 drivers/input/keyboard/adp5589-keys.c client->dev.driver->name, kpad); kpad 1018 drivers/input/keyboard/adp5589-keys.c error = adp5589_setup(kpad); kpad 1022 drivers/input/keyboard/adp5589-keys.c if (kpad->gpimapsize) kpad 1023 drivers/input/keyboard/adp5589-keys.c adp5589_report_switch_state(kpad); kpad 1025 drivers/input/keyboard/adp5589-keys.c error = adp5589_gpio_add(kpad); kpad 1030 drivers/input/keyboard/adp5589-keys.c i2c_set_clientdata(client, kpad); kpad 1036 drivers/input/keyboard/adp5589-keys.c free_irq(client->irq, kpad); kpad 1043 drivers/input/keyboard/adp5589-keys.c kfree(kpad); kpad 1050 drivers/input/keyboard/adp5589-keys.c struct adp5589_kpad *kpad = i2c_get_clientdata(client); kpad 1052 drivers/input/keyboard/adp5589-keys.c adp5589_write(client, kpad->var->reg(ADP5589_GENERAL_CFG), 0); kpad 1053 drivers/input/keyboard/adp5589-keys.c free_irq(client->irq, kpad); kpad 1054 drivers/input/keyboard/adp5589-keys.c input_unregister_device(kpad->input); kpad 1055 drivers/input/keyboard/adp5589-keys.c adp5589_gpio_remove(kpad); kpad 1056 drivers/input/keyboard/adp5589-keys.c kfree(kpad); kpad 1064 drivers/input/keyboard/adp5589-keys.c struct adp5589_kpad *kpad = dev_get_drvdata(dev); kpad 1065 drivers/input/keyboard/adp5589-keys.c struct i2c_client *client = kpad->client; kpad 1077 drivers/input/keyboard/adp5589-keys.c struct adp5589_kpad *kpad = dev_get_drvdata(dev); kpad 1078 drivers/input/keyboard/adp5589-keys.c struct i2c_client *client = kpad->client; kpad 143 drivers/media/mc/mc-device.c static void media_device_kpad_to_upad(const struct media_pad *kpad, kpad 146 drivers/media/mc/mc-device.c upad->entity = media_entity_id(kpad->entity); kpad 147 drivers/media/mc/mc-device.c upad->index = kpad->index; kpad 148 drivers/media/mc/mc-device.c upad->flags = kpad->flags; kpad 239 drivers/media/mc/mc-device.c struct media_v2_pad kpad, __user *upad; kpad 323 drivers/media/mc/mc-device.c memset(&kpad, 0, sizeof(kpad)); kpad 326 drivers/media/mc/mc-device.c kpad.id = pad->graph_obj.id; kpad 327 drivers/media/mc/mc-device.c kpad.entity_id = pad->entity->graph_obj.id; kpad 328 drivers/media/mc/mc-device.c kpad.flags = pad->flags; kpad 329 drivers/media/mc/mc-device.c kpad.index = pad->index; kpad 331 drivers/media/mc/mc-device.c if (copy_to_user(upad, &kpad, sizeof(kpad)))