Lines Matching refs:ddata

154 static ssize_t gpio_keys_attr_show_helper(struct gpio_keys_drvdata *ddata,  in gpio_keys_attr_show_helper()  argument
167 for (i = 0; i < ddata->n_buttons; i++) { in gpio_keys_attr_show_helper()
168 struct gpio_button_data *bdata = &ddata->data[i]; in gpio_keys_attr_show_helper()
198 static ssize_t gpio_keys_attr_store_helper(struct gpio_keys_drvdata *ddata, in gpio_keys_attr_store_helper() argument
215 for (i = 0; i < ddata->n_buttons; i++) { in gpio_keys_attr_store_helper()
216 struct gpio_button_data *bdata = &ddata->data[i]; in gpio_keys_attr_store_helper()
228 mutex_lock(&ddata->disable_lock); in gpio_keys_attr_store_helper()
230 for (i = 0; i < ddata->n_buttons; i++) { in gpio_keys_attr_store_helper()
231 struct gpio_button_data *bdata = &ddata->data[i]; in gpio_keys_attr_store_helper()
242 mutex_unlock(&ddata->disable_lock); in gpio_keys_attr_store_helper()
255 struct gpio_keys_drvdata *ddata = platform_get_drvdata(pdev); \
257 return gpio_keys_attr_show_helper(ddata, buf, \
282 struct gpio_keys_drvdata *ddata = platform_get_drvdata(pdev); \
285 error = gpio_keys_attr_store_helper(ddata, buf, type); \
430 struct gpio_keys_drvdata *ddata = input_get_drvdata(input); in gpio_keys_open() local
432 return ddata->enable ? ddata->enable(input->dev.parent) : 0; in gpio_keys_open()
437 struct gpio_keys_drvdata *ddata = input_get_drvdata(input); in gpio_keys_close() local
439 if (ddata->disable) in gpio_keys_close()
440 ddata->disable(input->dev.parent); in gpio_keys_close()
446 struct gpio_keys_drvdata *ddata; in gpio_keys_probe() local
452 ddata = kzalloc(sizeof(struct gpio_keys_drvdata) + in gpio_keys_probe()
456 if (!ddata || !input) { in gpio_keys_probe()
462 ddata->input = input; in gpio_keys_probe()
463 ddata->n_buttons = pdata->nbuttons; in gpio_keys_probe()
464 ddata->enable = pdata->enable; in gpio_keys_probe()
465 ddata->disable = pdata->disable; in gpio_keys_probe()
466 mutex_init(&ddata->disable_lock); in gpio_keys_probe()
468 platform_set_drvdata(pdev, ddata); in gpio_keys_probe()
469 input_set_drvdata(input, ddata); in gpio_keys_probe()
488 struct gpio_button_data *bdata = &ddata->data[i]; in gpio_keys_probe()
520 gpio_keys_report_event(&ddata->data[i]); in gpio_keys_probe()
531 free_irq(gpio_to_irq(pdata->buttons[i].gpio), &ddata->data[i]); in gpio_keys_probe()
532 if (ddata->data[i].timer_debounce) in gpio_keys_probe()
533 del_timer_sync(&ddata->data[i].timer); in gpio_keys_probe()
534 cancel_work_sync(&ddata->data[i].work); in gpio_keys_probe()
541 kfree(ddata); in gpio_keys_probe()
549 struct gpio_keys_drvdata *ddata = platform_get_drvdata(pdev); in gpio_keys_remove() local
550 struct input_dev *input = ddata->input; in gpio_keys_remove()
559 free_irq(irq, &ddata->data[i]); in gpio_keys_remove()
560 if (ddata->data[i].timer_debounce) in gpio_keys_remove()
561 del_timer_sync(&ddata->data[i].timer); in gpio_keys_remove()
562 cancel_work_sync(&ddata->data[i].work); in gpio_keys_remove()
595 struct gpio_keys_drvdata *ddata = platform_get_drvdata(pdev); in gpio_keys_resume() local
607 gpio_keys_report_event(&ddata->data[i]); in gpio_keys_resume()
609 input_sync(ddata->input); in gpio_keys_resume()