Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amlogic: remote: Do not restrict the mouse mode to "khadas-ir" #4

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 20 additions & 50 deletions drivers/amlogic/input/remote/remote_meson.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,56 +458,26 @@ static int get_custom_tables(struct device_node *node,
memset(&ptable->tab.cursor_code, 0xff,
sizeof(struct cursor_codemap));

if (strcmp(ptable->tab.custom_name, "khadas-ir") == 0) {
ret = of_property_read_u32(map, "fn_key_scancode", &value);
if (ret) {
dev_err(chip->dev, "please config fn_key_scancode item\n");
goto err;
}
ptable->tab.cursor_code.fn_key_scancode = value;

ret = of_property_read_u32(map, "fn_key_scancode_other", &value);
if (ret) {
dev_err(chip->dev, "please config fn_key_scancode_other item\n");
goto err;
}
ptable->tab.cursor_code.fn_key_scancode_other = value;

ret = of_property_read_u32(map, "cursor_left_scancode", &value);
if (ret) {
dev_err(chip->dev, "please config cursor_left_scancode item\n");
goto err;
}
ptable->tab.cursor_code.cursor_left_scancode = value;

ret = of_property_read_u32(map, "cursor_right_scancode", &value);
if (ret) {
dev_err(chip->dev, "please config cursor_right_scancode item\n");
goto err;
}
ptable->tab.cursor_code.cursor_right_scancode = value;

ret = of_property_read_u32(map, "cursor_up_scancode", &value);
if (ret) {
dev_err(chip->dev, "please config cursor_up_scancode item\n");
goto err;
}
ptable->tab.cursor_code.cursor_up_scancode = value;

ret = of_property_read_u32(map, "cursor_down_scancode", &value);
if (ret) {
dev_err(chip->dev, "please config cursor_down_scancode item\n");
goto err;
}
ptable->tab.cursor_code.cursor_down_scancode = value;

ret = of_property_read_u32(map, "cursor_ok_scancode", &value);
if (ret) {
dev_err(chip->dev, "please config cursor_ok_scancode item\n");
goto err;
}
ptable->tab.cursor_code.cursor_ok_scancode= value;
}
ret = of_property_read_u32(map, "fn_key_scancode", &value);
ptable->tab.cursor_code.fn_key_scancode = ret ? -1 : value;

ret = of_property_read_u32(map, "fn_key_scancode_other", &value);
ptable->tab.cursor_code.fn_key_scancode_other = ret ? -1 : value;

ret = of_property_read_u32(map, "cursor_left_scancode", &value);
ptable->tab.cursor_code.cursor_left_scancode = ret ? -1 : value;

ret = of_property_read_u32(map, "cursor_right_scancode", &value);
ptable->tab.cursor_code.cursor_right_scancode = ret ? -1 : value;

ret = of_property_read_u32(map, "cursor_up_scancode", &value);
ptable->tab.cursor_code.cursor_up_scancode = ret ? -1 : value;

ret = of_property_read_u32(map, "cursor_down_scancode", &value);
ptable->tab.cursor_code.cursor_down_scancode = ret ? -1 : value;

ret = of_property_read_u32(map, "cursor_ok_scancode", &value);
ptable->tab.cursor_code.cursor_ok_scancode= ret ? -1 : value;

ir_scancode_sort(&ptable->tab);
/*insert list*/
Expand Down