• Home
  • Raw
  • Download

Lines Matching refs:keypad

57 static void w90p910_keypad_scan_matrix(struct w90p910_keypad *keypad,  in w90p910_keypad_scan_matrix()  argument
60 struct input_dev *input_dev = keypad->input_dev; in w90p910_keypad_scan_matrix()
64 unsigned int key = keypad->keymap[code]; in w90p910_keypad_scan_matrix()
77 struct w90p910_keypad *keypad = dev_id; in w90p910_keypad_irq_handler() local
80 kstatus = __raw_readl(keypad->mmio_base + KPI_STATUS); in w90p910_keypad_irq_handler()
85 w90p910_keypad_scan_matrix(keypad, kstatus); in w90p910_keypad_irq_handler()
92 struct w90p910_keypad *keypad = input_get_drvdata(dev); in w90p910_keypad_open() local
93 const struct w90p910_keypad_platform_data *pdata = keypad->pdata; in w90p910_keypad_open()
97 clk_enable(keypad->clk); in w90p910_keypad_open()
99 val = __raw_readl(keypad->mmio_base + KPI_CONF); in w90p910_keypad_open()
107 __raw_writel(val, keypad->mmio_base + KPI_CONF); in w90p910_keypad_open()
114 struct w90p910_keypad *keypad = input_get_drvdata(dev); in w90p910_keypad_close() local
117 clk_disable(keypad->clk); in w90p910_keypad_close()
125 struct w90p910_keypad *keypad; in w90p910_keypad_probe() local
144 keypad = kzalloc(sizeof(struct w90p910_keypad), GFP_KERNEL); in w90p910_keypad_probe()
146 if (!keypad || !input_dev) { in w90p910_keypad_probe()
152 keypad->pdata = pdata; in w90p910_keypad_probe()
153 keypad->input_dev = input_dev; in w90p910_keypad_probe()
154 keypad->irq = irq; in w90p910_keypad_probe()
170 keypad->mmio_base = ioremap(res->start, resource_size(res)); in w90p910_keypad_probe()
171 if (keypad->mmio_base == NULL) { in w90p910_keypad_probe()
177 keypad->clk = clk_get(&pdev->dev, NULL); in w90p910_keypad_probe()
178 if (IS_ERR(keypad->clk)) { in w90p910_keypad_probe()
180 error = PTR_ERR(keypad->clk); in w90p910_keypad_probe()
193 input_dev->keycode = keypad->keymap; in w90p910_keypad_probe()
194 input_dev->keycodesize = sizeof(keypad->keymap[0]); in w90p910_keypad_probe()
195 input_dev->keycodemax = ARRAY_SIZE(keypad->keymap); in w90p910_keypad_probe()
197 input_set_drvdata(input_dev, keypad); in w90p910_keypad_probe()
205 error = request_irq(keypad->irq, w90p910_keypad_irq_handler, in w90p910_keypad_probe()
206 0, pdev->name, keypad); in w90p910_keypad_probe()
219 platform_set_drvdata(pdev, keypad); in w90p910_keypad_probe()
225 clk_put(keypad->clk); in w90p910_keypad_probe()
227 iounmap(keypad->mmio_base); in w90p910_keypad_probe()
232 kfree(keypad); in w90p910_keypad_probe()
238 struct w90p910_keypad *keypad = platform_get_drvdata(pdev); in w90p910_keypad_remove() local
241 free_irq(keypad->irq, pdev); in w90p910_keypad_remove()
243 clk_put(keypad->clk); in w90p910_keypad_remove()
245 input_unregister_device(keypad->input_dev); in w90p910_keypad_remove()
247 iounmap(keypad->mmio_base); in w90p910_keypad_remove()
252 kfree(keypad); in w90p910_keypad_remove()