Skip to content

Commit

Permalink
Input: max77650-onkey - add of_match table
Browse files Browse the repository at this point in the history
We need the of_match table if we want to use the compatible string in
the pmic's child node and get the onkey driver loaded automatically.

Signed-off-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
brgl authored and dtor committed Jan 17, 2020
1 parent c15f8ba commit ce535a2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/input/misc/max77650-onkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,16 @@ static int max77650_onkey_probe(struct platform_device *pdev)
return input_register_device(onkey->input);
}

static const struct of_device_id max77650_onkey_of_match[] = {
{ .compatible = "maxim,max77650-onkey" },
{ }
};
MODULE_DEVICE_TABLE(of, max77650_onkey_of_match);

static struct platform_driver max77650_onkey_driver = {
.driver = {
.name = "max77650-onkey",
.of_match_table = max77650_onkey_of_match,
},
.probe = max77650_onkey_probe,
};
Expand Down

0 comments on commit ce535a2

Please sign in to comment.