{"action":"created","comment":{"url":"https://api.github.com/repos/endlessm/linux-meson/pulls/comments/37766011","id":37766011,"diff_hunk":"@@ -0,0 +1,288 @@\n+/*\n+ * Driver for Endless EC-100 GPIO power button\n+ * We get a single interrupt pulse on a rising edge (button press)\n+ *\n+ * Based on gpio_keys:\n+ *\n+ * Copyright 2005 Phil Blundell\n+ * Copyright 2010, 2011 David Jander <david@protonic.nl>\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 2 as\n+ * published by the Free Software Foundation.\n+ */\n+\n+#include <linux/module.h>\n+\n+#include <linux/init.h>\n+#include <linux/fs.h>\n+#include <linux/interrupt.h>\n+#include <linux/irq.h>\n+#include <linux/sched.h>\n+#include <linux/pm.h>\n+#include <linux/slab.h>\n+#include <linux/sysctl.h>\n+#include <linux/delay.h>\n+#include <linux/platform_device.h>\n+#include <linux/input.h>\n+#include <linux/gpio_keys.h>\n+#include <linux/gpio.h>\n+#include <linux/of_platform.h>\n+#include <linux/amlogic/aml_gpio_consumer.h>\n+\n+struct gpio_button_data {\n+\tconst struct gpio_keys_button *button;\n+\tstruct input_dev *input;\n+};\n+\n+struct gpio_keys_drvdata {\n+\tconst struct gpio_keys_platform_data *pdata;\n+\tstruct input_dev *input;\n+\tstruct gpio_button_data data[0];\n+};\n+\n+static irqreturn_t gpio_keys_irq_isr(int irq, void *dev_id)\n+{\n+\tstruct gpio_button_data *bdata = dev_id;\n+\tconst struct gpio_keys_button *button = bdata->button;\n+\tstruct input_dev *input = bdata->input;\n+\n+\tinput_event(input, EV_KEY, button->code, 1);\n+\tinput_sync(input);\n+\n+\tinput_event(input, EV_KEY, button->code, 0);\n+\tinput_sync(input);\n+","path":"drivers/input/keyboard/gpio_keys_ec100.c","position":55,"original_position":55,"commit_id":"9fd0ac5b52915d0c1dafc68a40761d358e0e9101","original_commit_id":"9fd0ac5b52915d0c1dafc68a40761d358e0e9101","user":{"login":"magcius","id":40890,"avatar_url":"https://avatars.githubusercontent.com/u/40890?v=3","gravatar_id":"","url":"https://api.github.com/users/magcius","html_url":"https://github.com/magcius","followers_url":"https://api.github.com/users/magcius/followers","following_url":"https://api.github.com/users/magcius/following{/other_user}","gists_url":"https://api.github.com/users/magcius/gists{/gist_id}","starred_url":"https://api.github.com/users/magcius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magcius/subscriptions","organizations_url":"https://api.github.com/users/magcius/orgs","repos_url":"https://api.github.com/users/magcius/repos","events_url":"https://api.github.com/users/magcius/events{/privacy}","received_events_url":"https://api.github.com/users/magcius/received_events","type":"User","site_admin":false},"body":"Press and then release.","created_at":"2015-08-24T15:46:52Z","updated_at":"2015-08-24T15:46:52Z","html_url":"https://github.com/endlessm/linux-meson/pull/58#discussion_r37766011","pull_request_url":"https://api.github.com/repos/endlessm/linux-meson/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/endlessm/linux-meson/pulls/comments/37766011"},"html":{"href":"https://github.com/endlessm/linux-meson/pull/58#discussion_r37766011"},"pull_request":{"href":"https://api.github.com/repos/endlessm/linux-meson/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/endlessm/linux-meson/pulls/58","id":43083054,"html_url":"https://github.com/endlessm/linux-meson/pull/58","diff_url":"https://github.com/endlessm/linux-meson/pull/58.diff","patch_url":"https://github.com/endlessm/linux-meson/pull/58.patch","issue_url":"https://api.github.com/repos/endlessm/linux-meson/issues/58","number":58,"state":"open","locked":false,"title":"Shell/5560","user":{"login":"dsd","id":81864,"avatar_url":"https://avatars.githubusercontent.com/u/81864?v=3","gravatar_id":"","url":"https://api.github.com/users/dsd","html_url":"https://github.com/dsd","followers_url":"https://api.github.com/users/dsd/followers","following_url":"https://api.github.com/users/dsd/following{/other_user}","gists_url":"https://api.github.com/users/dsd/gists{/gist_id}","starred_url":"https://api.github.com/users/dsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsd/subscriptions","organizations_url":"https://api.github.com/users/dsd/orgs","repos_url":"https://api.github.com/users/dsd/repos","events_url":"https://api.github.com/users/dsd/events{/privacy}","received_events_url":"https://api.github.com/users/dsd/received_events","type":"User","site_admin":false},"body":"https://github.com/endlessm/eos-shell/issues/5560","created_at":"2015-08-21T21:29:22Z","updated_at":"2015-08-24T15:46:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7965e64e24702dfb22b0d30d6bbc00fdacbf5d98","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/endlessm/linux-meson/pulls/58/commits","review_comments_url":"https://api.github.com/repos/endlessm/linux-meson/pulls/58/comments","review_comment_url":"https://api.github.com/repos/endlessm/linux-meson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endlessm/linux-meson/issues/58/comments","statuses_url":"https://api.github.com/repos/endlessm/linux-meson/statuses/9fd0ac5b52915d0c1dafc68a40761d358e0e9101","head":{"label":"endlessm:shell/5560","ref":"shell/5560","sha":"9fd0ac5b52915d0c1dafc68a40761d358e0e9101","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":30656817,"name":"linux-meson","full_name":"endlessm/linux-meson","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/linux-meson","description":"","fork":false,"url":"https://api.github.com/repos/endlessm/linux-meson","forks_url":"https://api.github.com/repos/endlessm/linux-meson/forks","keys_url":"https://api.github.com/repos/endlessm/linux-meson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/linux-meson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/linux-meson/teams","hooks_url":"https://api.github.com/repos/endlessm/linux-meson/hooks","issue_events_url":"https://api.github.com/repos/endlessm/linux-meson/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/linux-meson/events","assignees_url":"https://api.github.com/repos/endlessm/linux-meson/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/linux-meson/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/linux-meson/tags","blobs_url":"https://api.github.com/repos/endlessm/linux-meson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/linux-meson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/linux-meson/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/linux-meson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/linux-meson/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/linux-meson/languages","stargazers_url":"https://api.github.com/repos/endlessm/linux-meson/stargazers","contributors_url":"https://api.github.com/repos/endlessm/linux-meson/contributors","subscribers_url":"https://api.github.com/repos/endlessm/linux-meson/subscribers","subscription_url":"https://api.github.com/repos/endlessm/linux-meson/subscription","commits_url":"https://api.github.com/repos/endlessm/linux-meson/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/linux-meson/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/linux-meson/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/linux-meson/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/linux-meson/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/linux-meson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/linux-meson/merges","archive_url":"https://api.github.com/repos/endlessm/linux-meson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/linux-meson/downloads","issues_url":"https://api.github.com/repos/endlessm/linux-meson/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/linux-meson/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/linux-meson/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/linux-meson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/linux-meson/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/linux-meson/releases{/id}","created_at":"2015-02-11T16:18:45Z","updated_at":"2015-08-24T00:25:35Z","pushed_at":"2015-08-21T21:29:22Z","git_url":"git://github.com/endlessm/linux-meson.git","ssh_url":"git@github.com:endlessm/linux-meson.git","clone_url":"https://github.com/endlessm/linux-meson.git","svn_url":"https://github.com/endlessm/linux-meson","homepage":null,"size":1035409,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":3,"default_branch":"master"}},"base":{"label":"endlessm:master","ref":"master","sha":"09660e40a910ddff71f594cba2b056b6b4a13113","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":30656817,"name":"linux-meson","full_name":"endlessm/linux-meson","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/linux-meson","description":"","fork":false,"url":"https://api.github.com/repos/endlessm/linux-meson","forks_url":"https://api.github.com/repos/endlessm/linux-meson/forks","keys_url":"https://api.github.com/repos/endlessm/linux-meson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/linux-meson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/linux-meson/teams","hooks_url":"https://api.github.com/repos/endlessm/linux-meson/hooks","issue_events_url":"https://api.github.com/repos/endlessm/linux-meson/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/linux-meson/events","assignees_url":"https://api.github.com/repos/endlessm/linux-meson/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/linux-meson/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/linux-meson/tags","blobs_url":"https://api.github.com/repos/endlessm/linux-meson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/linux-meson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/linux-meson/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/linux-meson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/linux-meson/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/linux-meson/languages","stargazers_url":"https://api.github.com/repos/endlessm/linux-meson/stargazers","contributors_url":"https://api.github.com/repos/endlessm/linux-meson/contributors","subscribers_url":"https://api.github.com/repos/endlessm/linux-meson/subscribers","subscription_url":"https://api.github.com/repos/endlessm/linux-meson/subscription","commits_url":"https://api.github.com/repos/endlessm/linux-meson/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/linux-meson/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/linux-meson/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/linux-meson/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/linux-meson/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/linux-meson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/linux-meson/merges","archive_url":"https://api.github.com/repos/endlessm/linux-meson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/linux-meson/downloads","issues_url":"https://api.github.com/repos/endlessm/linux-meson/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/linux-meson/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/linux-meson/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/linux-meson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/linux-meson/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/linux-meson/releases{/id}","created_at":"2015-02-11T16:18:45Z","updated_at":"2015-08-24T00:25:35Z","pushed_at":"2015-08-21T21:29:22Z","git_url":"git://github.com/endlessm/linux-meson.git","ssh_url":"git@github.com:endlessm/linux-meson.git","clone_url":"https://github.com/endlessm/linux-meson.git","svn_url":"https://github.com/endlessm/linux-meson","homepage":null,"size":1035409,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endlessm/linux-meson/pulls/58"},"html":{"href":"https://github.com/endlessm/linux-meson/pull/58"},"issue":{"href":"https://api.github.com/repos/endlessm/linux-meson/issues/58"},"comments":{"href":"https://api.github.com/repos/endlessm/linux-meson/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/endlessm/linux-meson/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/endlessm/linux-meson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endlessm/linux-meson/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/endlessm/linux-meson/statuses/9fd0ac5b52915d0c1dafc68a40761d358e0e9101"}}}}