{"action":"created","issue":{"url":"https://api.github.com/repos/OpenNuvoton/NUC970_Linux_Kernel/issues/9","repository_url":"https://api.github.com/repos/OpenNuvoton/NUC970_Linux_Kernel","labels_url":"https://api.github.com/repos/OpenNuvoton/NUC970_Linux_Kernel/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/OpenNuvoton/NUC970_Linux_Kernel/issues/9/comments","events_url":"https://api.github.com/repos/OpenNuvoton/NUC970_Linux_Kernel/issues/9/events","html_url":"https://github.com/OpenNuvoton/NUC970_Linux_Kernel/issues/9","id":241606562,"number":9,"title":"can add feature for gpio-poweroff if kernal without device tree option","user":{"login":"junwushi","id":1411047,"avatar_url":"https://avatars1.githubusercontent.com/u/1411047?v=3","gravatar_id":"","url":"https://api.github.com/users/junwushi","html_url":"https://github.com/junwushi","followers_url":"https://api.github.com/users/junwushi/followers","following_url":"https://api.github.com/users/junwushi/following{/other_user}","gists_url":"https://api.github.com/users/junwushi/gists{/gist_id}","starred_url":"https://api.github.com/users/junwushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junwushi/subscriptions","organizations_url":"https://api.github.com/users/junwushi/orgs","repos_url":"https://api.github.com/users/junwushi/repos","events_url":"https://api.github.com/users/junwushi/events{/privacy}","received_events_url":"https://api.github.com/users/junwushi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-10T05:52:57Z","updated_at":"2017-07-11T01:33:10Z","closed_at":null,"body":"the file ./drivers/power/reset/gpio-poweroff.c i check that is only support device tree kennel for define power off GPIO pin,but i am not use device tree to build kernel, i want define it in dev.c. can add this feature?\r\n"},"comment":{"url":"https://api.github.com/repos/OpenNuvoton/NUC970_Linux_Kernel/issues/comments/314297006","html_url":"https://github.com/OpenNuvoton/NUC970_Linux_Kernel/issues/9#issuecomment-314297006","issue_url":"https://api.github.com/repos/OpenNuvoton/NUC970_Linux_Kernel/issues/9","id":314297006,"user":{"login":"junwushi","id":1411047,"avatar_url":"https://avatars1.githubusercontent.com/u/1411047?v=3","gravatar_id":"","url":"https://api.github.com/users/junwushi","html_url":"https://github.com/junwushi","followers_url":"https://api.github.com/users/junwushi/followers","following_url":"https://api.github.com/users/junwushi/following{/other_user}","gists_url":"https://api.github.com/users/junwushi/gists{/gist_id}","starred_url":"https://api.github.com/users/junwushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junwushi/subscriptions","organizations_url":"https://api.github.com/users/junwushi/orgs","repos_url":"https://api.github.com/users/junwushi/repos","events_url":"https://api.github.com/users/junwushi/events{/privacy}","received_events_url":"https://api.github.com/users/junwushi/received_events","type":"User","site_admin":false},"created_at":"2017-07-11T01:33:10Z","updated_at":"2017-07-11T01:33:10Z","body":"other question,please help me check.i want read wake source register value in user application. but always read value is zero. why?\r\n\r\n#define SYS_BA 0xb0000000\r\n#define REG_WKUPSSR 0x5c\r\nunsigned int getwakupsource(void) {\r\n\tunsigned int value;\r\n\tint mem_fd = open(\"/dev/mem\", O_RDWR | O_SYNC);\r\n\tif (mem_fd == -1) {\r\n\t\tprintf(\"open /dev/mem fail\\n\");\r\n\t\treturn 0;\r\n\t}\r\n\tunsigned char *virt_regaddr = (unsigned char*) mmap(0, 0x1000,\r\n\t\t\tPROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, SYS_BA);\r\n\tif (virt_regaddr == NULL) {\r\n\t\tclose(mem_fd);\r\n\t\tprintf(\"mmap mem fail\\n\");\r\n\t\treturn 0;\r\n\t}\r\n\tvalue = *((unsigned int*) (virt_regaddr));\r\n\tprintf(\"PID:0x%x\\n\", value);\r\n\tvalue = *((unsigned int *) (virt_regaddr + REG_WKUPSSR));\r\n\tmunmap(virt_regaddr, 0x1000);\r\n\tclose(mem_fd);\r\n\treturn value;\r\n}"}}
{"actor":{"display_login":"junwushi"}}