Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: pmic8xxx-keypad - fix build by removing gpio configuration

The gpio configuration in this driver doesn't work because the
gpio.h include doesn't exist. Remove the configuration as it
isn't strictly necessary, allowing us to actually compile this
driver. If it's needed in the future, it should be done via a
pinctrl driver.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Stephen Boyd and committed by
Dmitry Torokhov
d3e6a67c e70f18e1

-58
-58
drivers/input/keyboard/pmic8xxx-keypad.c
··· 21 21 #include <linux/mutex.h> 22 22 23 23 #include <linux/mfd/pm8xxx/core.h> 24 - #include <linux/mfd/pm8xxx/gpio.h> 25 24 #include <linux/input/pmic8xxx-keypad.h> 26 25 27 26 #define PM8XXX_MAX_ROWS 18 ··· 446 447 447 448 } 448 449 449 - static int pmic8xxx_kp_config_gpio(int gpio_start, int num_gpios, 450 - struct pmic8xxx_kp *kp, struct pm_gpio *gpio_config) 451 - { 452 - int rc, i; 453 - 454 - if (gpio_start < 0 || num_gpios < 0) 455 - return -EINVAL; 456 - 457 - for (i = 0; i < num_gpios; i++) { 458 - rc = pm8xxx_gpio_config(gpio_start + i, gpio_config); 459 - if (rc) { 460 - dev_err(kp->dev, "%s: FAIL pm8xxx_gpio_config():" 461 - "for PM GPIO [%d] rc=%d.\n", 462 - __func__, gpio_start + i, rc); 463 - return rc; 464 - } 465 - } 466 - 467 - return 0; 468 - } 469 - 470 450 static int pmic8xxx_kp_enable(struct pmic8xxx_kp *kp) 471 451 { 472 452 int rc; ··· 504 526 struct pmic8xxx_kp *kp; 505 527 int rc; 506 528 u8 ctrl_val; 507 - 508 - struct pm_gpio kypd_drv = { 509 - .direction = PM_GPIO_DIR_OUT, 510 - .output_buffer = PM_GPIO_OUT_BUF_OPEN_DRAIN, 511 - .output_value = 0, 512 - .pull = PM_GPIO_PULL_NO, 513 - .vin_sel = PM_GPIO_VIN_S3, 514 - .out_strength = PM_GPIO_STRENGTH_LOW, 515 - .function = PM_GPIO_FUNC_1, 516 - .inv_int_pol = 1, 517 - }; 518 - 519 - struct pm_gpio kypd_sns = { 520 - .direction = PM_GPIO_DIR_IN, 521 - .pull = PM_GPIO_PULL_UP_31P5, 522 - .vin_sel = PM_GPIO_VIN_S3, 523 - .out_strength = PM_GPIO_STRENGTH_NO, 524 - .function = PM_GPIO_FUNC_NORMAL, 525 - .inv_int_pol = 1, 526 - }; 527 - 528 529 529 530 if (!pdata || !pdata->num_cols || !pdata->num_rows || 530 531 pdata->num_cols > PM8XXX_MAX_COLS || ··· 610 653 goto err_get_irq; 611 654 } 612 655 613 - rc = pmic8xxx_kp_config_gpio(pdata->cols_gpio_start, 614 - pdata->num_cols, kp, &kypd_sns); 615 - if (rc < 0) { 616 - dev_err(&pdev->dev, "unable to configure keypad sense lines\n"); 617 - goto err_gpio_config; 618 - } 619 - 620 - rc = pmic8xxx_kp_config_gpio(pdata->rows_gpio_start, 621 - pdata->num_rows, kp, &kypd_drv); 622 - if (rc < 0) { 623 - dev_err(&pdev->dev, "unable to configure keypad drive lines\n"); 624 - goto err_gpio_config; 625 - } 626 - 627 656 rc = request_any_context_irq(kp->key_sense_irq, pmic8xxx_kp_irq, 628 657 IRQF_TRIGGER_RISING, "pmic-keypad", kp); 629 658 if (rc < 0) { ··· 646 703 free_irq(kp->key_stuck_irq, kp); 647 704 err_req_stuck_irq: 648 705 free_irq(kp->key_sense_irq, kp); 649 - err_gpio_config: 650 706 err_get_irq: 651 707 input_free_device(kp->input); 652 708 err_alloc_device: