Lines Matching refs:plat
325 struct tc3589x_keypad_platform_data *plat; in tc3589x_keypad_of_probe() local
333 plat = devm_kzalloc(dev, sizeof(*plat), GFP_KERNEL); in tc3589x_keypad_of_probe()
334 if (!plat) in tc3589x_keypad_of_probe()
339 plat->kcol = (u8) cols; in tc3589x_keypad_of_probe()
340 plat->krow = (u8) rows; in tc3589x_keypad_of_probe()
341 if (!plat->krow || !plat->kcol || in tc3589x_keypad_of_probe()
342 plat->krow > TC_KPD_ROWS || plat->kcol > TC_KPD_COLUMNS) { in tc3589x_keypad_of_probe()
345 plat->kcol, plat->krow); in tc3589x_keypad_of_probe()
354 plat->no_autorepeat = of_property_read_bool(np, "linux,no-autorepeat"); in tc3589x_keypad_of_probe()
355 plat->enable_wakeup = of_property_read_bool(np, "linux,wakeup"); in tc3589x_keypad_of_probe()
360 plat->debounce_period = debounce_ms * 16; in tc3589x_keypad_of_probe()
362 plat->debounce_period = TC_KPD_DEBOUNCE_PERIOD; in tc3589x_keypad_of_probe()
364 plat->settle_time = TC_KPD_SETTLE_TIME; in tc3589x_keypad_of_probe()
366 plat->irqtype = IRQF_TRIGGER_FALLING; in tc3589x_keypad_of_probe()
368 return plat; in tc3589x_keypad_of_probe()
376 const struct tc3589x_keypad_platform_data *plat; in tc3589x_keypad_probe() local
379 plat = tc3589x_keypad_of_probe(&pdev->dev); in tc3589x_keypad_probe()
380 if (IS_ERR(plat)) { in tc3589x_keypad_probe()
382 return PTR_ERR(plat); in tc3589x_keypad_probe()
397 keypad->board = plat; in tc3589x_keypad_probe()
408 error = matrix_keypad_build_keymap(plat->keymap_data, NULL, in tc3589x_keypad_probe()
419 if (!plat->no_autorepeat) in tc3589x_keypad_probe()
425 plat->irqtype | IRQF_ONESHOT, in tc3589x_keypad_probe()
441 device_init_wakeup(&pdev->dev, plat->enable_wakeup); in tc3589x_keypad_probe()
442 device_set_wakeup_capable(&pdev->dev, plat->enable_wakeup); in tc3589x_keypad_probe()