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

ARM: davinci: da830-evm: remove legacy usb helpers

The logic implemented by these routines now lives in the da8xx-ohci
driver. Remove dead code.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>

authored by

Bartosz Golaszewski and committed by
Sekhar Nori
339850f2 2435854e

-67
-67
arch/arm/mach-davinci/board-da830-evm.c
··· 52 52 -1 53 53 }; 54 54 55 - static da8xx_ocic_handler_t da830_evm_usb_ocic_handler; 56 - 57 55 static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = { 58 56 .dev_id = "ohci-da8xx", 59 57 .table = { ··· 60 62 }, 61 63 }; 62 64 63 - static int da830_evm_usb_set_power(unsigned port, int on) 64 - { 65 - gpio_set_value(ON_BD_USB_DRV, on); 66 - return 0; 67 - } 68 - 69 - static int da830_evm_usb_get_power(unsigned port) 70 - { 71 - return gpio_get_value(ON_BD_USB_DRV); 72 - } 73 - 74 - static int da830_evm_usb_get_oci(unsigned port) 75 - { 76 - return !gpio_get_value(ON_BD_USB_OVC); 77 - } 78 - 79 - static irqreturn_t da830_evm_usb_ocic_irq(int, void *); 80 - 81 - static int da830_evm_usb_ocic_notify(da8xx_ocic_handler_t handler) 82 - { 83 - int irq = gpio_to_irq(ON_BD_USB_OVC); 84 - int error = 0; 85 - 86 - if (handler != NULL) { 87 - da830_evm_usb_ocic_handler = handler; 88 - 89 - error = request_irq(irq, da830_evm_usb_ocic_irq, 90 - IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, 91 - "OHCI over-current indicator", NULL); 92 - if (error) 93 - pr_err("%s: could not request IRQ to watch over-current indicator changes\n", 94 - __func__); 95 - } else 96 - free_irq(irq, NULL); 97 - 98 - return error; 99 - } 100 - 101 65 static struct da8xx_ohci_root_hub da830_evm_usb11_pdata = { 102 - .set_power = da830_evm_usb_set_power, 103 - .get_power = da830_evm_usb_get_power, 104 - .get_oci = da830_evm_usb_get_oci, 105 - .ocic_notify = da830_evm_usb_ocic_notify, 106 - 107 66 /* TPS2065 switch @ 5V */ 108 67 .potpgt = (3 + 1) / 2, /* 3 ms max */ 109 68 }; 110 - 111 - static irqreturn_t da830_evm_usb_ocic_irq(int irq, void *dev_id) 112 - { 113 - da830_evm_usb_ocic_handler(&da830_evm_usb11_pdata, 1); 114 - return IRQ_HANDLED; 115 - } 116 69 117 70 static __init void da830_evm_usb_init(void) 118 71 { ··· 98 149 pr_warn("%s: USB 1.1 PinMux setup failed: %d\n", __func__, ret); 99 150 return; 100 151 } 101 - 102 - ret = gpio_request(ON_BD_USB_DRV, "ON_BD_USB_DRV"); 103 - if (ret) { 104 - pr_err("%s: failed to request GPIO for USB 1.1 port power control: %d\n", 105 - __func__, ret); 106 - return; 107 - } 108 - gpio_direction_output(ON_BD_USB_DRV, 0); 109 - 110 - ret = gpio_request(ON_BD_USB_OVC, "ON_BD_USB_OVC"); 111 - if (ret) { 112 - pr_err("%s: failed to request GPIO for USB 1.1 port over-current indicator: %d\n", 113 - __func__, ret); 114 - return; 115 - } 116 - gpio_direction_input(ON_BD_USB_OVC); 117 152 118 153 gpiod_add_lookup_table(&da830_evm_usb_gpio_lookup); 119 154