Lines Matching refs:ddata
142 * @ddata: pointer to drvdata
154 static ssize_t gpio_keys_attr_show_helper(struct gpio_keys_drvdata *ddata,
167 for (i = 0; i < ddata->n_buttons; i++) {
168 struct gpio_button_data *bdata = &ddata->data[i];
190 * @ddata: pointer to drvdata
198 static ssize_t gpio_keys_attr_store_helper(struct gpio_keys_drvdata *ddata,
215 for (i = 0; i < ddata->n_buttons; i++) {
216 struct gpio_button_data *bdata = &ddata->data[i];
228 mutex_lock(&ddata->disable_lock);
230 for (i = 0; i < ddata->n_buttons; i++) {
231 struct gpio_button_data *bdata = &ddata->data[i];
242 mutex_unlock(&ddata->disable_lock);
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);
432 return ddata->enable ? ddata->enable(input->dev.parent) : 0;
437 struct gpio_keys_drvdata *ddata = input_get_drvdata(input);
439 if (ddata->disable)
440 ddata->disable(input->dev.parent);
446 struct gpio_keys_drvdata *ddata;
452 ddata = kzalloc(sizeof(struct gpio_keys_drvdata) +
456 if (!ddata || !input) {
462 ddata->input = input;
463 ddata->n_buttons = pdata->nbuttons;
464 ddata->enable = pdata->enable;
465 ddata->disable = pdata->disable;
466 mutex_init(&ddata->disable_lock);
468 platform_set_drvdata(pdev, ddata);
469 input_set_drvdata(input, ddata);
488 struct gpio_button_data *bdata = &ddata->data[i];
520 gpio_keys_report_event(&ddata->data[i]);
531 free_irq(gpio_to_irq(pdata->buttons[i].gpio), &ddata->data[i]);
532 if (ddata->data[i].timer_debounce)
533 del_timer_sync(&ddata->data[i].timer);
534 cancel_work_sync(&ddata->data[i].work);
541 kfree(ddata);
549 struct gpio_keys_drvdata *ddata = platform_get_drvdata(pdev);
550 struct input_dev *input = ddata->input;
559 free_irq(irq, &ddata->data[i]);
560 if (ddata->data[i].timer_debounce)
561 del_timer_sync(&ddata->data[i].timer);
562 cancel_work_sync(&ddata->data[i].work);
595 struct gpio_keys_drvdata *ddata = platform_get_drvdata(pdev);
607 gpio_keys_report_event(&ddata->data[i]);
609 input_sync(ddata->input);