Linux 输入子系统笔记

vmlinz posted @ Mon, 04 Jul 2011 14:47:27 +0800 in Linux with tags linux driver input , 5848 readers

Linux Input System

内核的输入子系统将内核中各种零散的输入驱动整合起来,并给它们提供统一的用户层接口和驱动接口。输入子系统主要由Input Device Driver 和Input Event Driver 以及Input Core三个部分组成。

Input system summary

  • Input Device Driver 负责和具体的输入硬件驱动交互,根据硬件信号生成硬件事件
  • Input Event Driver 负责将硬件事件转换为用户空间可以识别的事件信号,和用户空间交互
  • Input Core 和其他子系统一样,核心模块负责提供公共算法

Input Device driver

Device Driver 和硬件交流,生成硬件事件给Input Core。主要的底层驱动有Serio, USB Hid, Bluetooth Hidp, SPI, ISA/LPC, GPIO等。涵盖了几乎所有的输入硬件。

  • struct input_dev; 输入设备结构体
  • int __must_check input_register_device(struct input_dev *); 注册输入设备
  • void input_unregister_device(struct input_dev *); 注销输入设备
  • void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); 向input core 发送硬件事件

Input Event driver

Event Driver 给用户空间提供了一种与硬件无关的抽象方式来实现和输入硬件的交互。主要的Event Driver 有Evdev 接口,它是一个通用的输入事件驱动。内核中还有其他种类的统一事件驱动。

  • struct input_handler; 输入事件驱动结构体,实现输入事件的处理函数
  • struct input_handle; 将输入事件驱动和输入设备驱动结合起来
  • struct input_event; 输入事件结构体
  • int __must_check input_register_handler(struct input_handler *); 输入事件驱动注册
  • void input_unregister_handler(struct input_handler *); 输入事件驱动注销

Resources and referrences

Avatar_small
AAA said:
Wed, 09 Feb 2022 00:14:10 +0800

Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. Crypto Payment Gateway

Avatar_small
AAA said:
Fri, 11 Feb 2022 20:41:34 +0800

Best wishes for publishing this kind of beneficial web site. Your web log isn't only useful but it's additionally really creative too. Robinhood alternatives

 

 

==================================================

 

 

Excellent blog! I found it while surfing around on Google. Content of this page is unique as well as well researched. Appreciate it. best time to buy cryptocurrency

Avatar_small
AAA said:
Sun, 13 Feb 2022 04:49:44 +0800

Exceptional entry! I found it very interesting. I'll check back later to see if more posts are added. Merchant Services Partner Program

 

================================================

 

 

I have been reading out many of your articles and i can claim pretty nice stuff. I will make sure to bookmark your blog. Merchant Service Agent Program

 

 

=======================================

 

 

I went over this web site and I think you have a lot of great information, saved to web. become a credit card processor

Avatar_small
AAA said:
Tue, 15 Feb 2022 15:35:33 +0800

I thought it was going to be some boring old publish, but it really compensated for my time. I will publish a link to this page on my blog. I am confident my visitors will discover that quite useful how to be a payment processor

Avatar_small
meidir said:
Sat, 09 Jul 2022 13:09:03 +0800

Nice read, I just passed this onto a colleague who was doing a little research on that. And he just bought me lunch since I found it for him smile So let me rephrase that: Thank you for lunch! 攝影器材

 

===============

 

Oh my goodness! a wonderful write-up dude. Thanks a lot Nonetheless We are experiencing trouble with ur rss . Do not know why Not able to sign up to it. Perhaps there is anybody getting identical rss problem? Anyone who knows kindly respond. Thnkx iphone回收價

 

================

 

What’s Going down i’m new to this, I stumbled upon this I have discovered It positively useful and it has aided me out loads. I’m hoping to give a contribution & help different users like its aided me. Good job. ipad回收價

Avatar_small
meidir said:
Wed, 20 Jul 2022 04:47:05 +0800

This really is this type of great resource that you are providing and you give it away for free. I enjoy seeing blog that understand the worth of providing an excellent resource for free. Woking to Heathrow Taxi

Avatar_small
seo said:
Sat, 05 Nov 2022 18:08:22 +0800

I got what you intend, thanks for putting up. Woh I am glad to find this website through google. Contextual backlinks

Avatar_small
seo said:
Sat, 05 Nov 2022 21:01:09 +0800

I likewise believe thus, perfectly pent post! . chipmunk website

Avatar_small
seo said:
Sun, 06 Nov 2022 13:59:19 +0800

Considerably, the article is in reality the greatest on this noteworthy topic. I agree with your conclusions and also definitely will eagerly look forward to your next updates. Saying thanks will not simply just be enough, for the wonderful clarity in you Michael Irvin

Avatar_small
seo said:
Sun, 06 Nov 2022 13:59:42 +0800

 I’d opt to apply certain while using the content in my small blog no matter whether you don’t mind. Natually I’ll offer you a link for your internet weblog. Appreciate your sharing. Megan Anderson

Avatar_small
seo said:
Sun, 06 Nov 2022 13:59:57 +0800

 I assure you’d start seeing some wonderful targeted site visitors within the close to future. Just a thought, good luck in no matter you do! Protect Your Home From Storm Damage

Avatar_small
seo said:
Sun, 06 Nov 2022 14:00:08 +0800

The cast is pretty impressive, the rest of the film not so much. Choosing Pet Food for New Owners

Avatar_small
seo said:
Sun, 06 Nov 2022 14:00:18 +0800

hey all, I used to be just checking out this blog and I actually admire the premise of the article, and don’t have anything to do, so if anybody wish to to have an engrossing convo about it, please contact me on AIM, my name is heather smith A Pet-Friendly Trip

Avatar_small
seo said:
Sun, 06 Nov 2022 14:00:28 +0800

I am a good darling of your web site. Remain within in the angelic perform. Warwick Davis

Avatar_small
seo said:
Sun, 06 Nov 2022 14:00:42 +0800

I know this isn’t exactly on subject, but i’ve a site using the identical program as properly and i am getting troubles with my comments displaying. is there a setting i am missing? it’s potential it’s possible you’ll assist me out? thanx. George Lucas Net Worth

Avatar_small
seo said:
Sun, 06 Nov 2022 14:00:57 +0800

Now you’ve got your new website and you’re eager to begin making some gross sales! But, how are you going to make sales if you happen to do not have excessive volumes of tourists to your website? Buying A New Smartwatch

Avatar_small
seo said:
Sun, 06 Nov 2022 14:01:07 +0800

Hey there, May I grab the picture and usage that on my own weblog? Brazilian Blowout Kit and Treatment

Avatar_small
seo said:
Sun, 06 Nov 2022 14:01:21 +0800

Greetings, have you by chance pondered to publish about Nintendo DSi? How to Prevent Mold After Water Damage

Avatar_small
seo said:
Sun, 06 Nov 2022 14:01:31 +0800

you can always tell the quality of USB cables by looking at the thickness of the cable. thicker usb cables have higher quality., financial tips for newlyweds

Avatar_small
seo said:
Sun, 06 Nov 2022 14:01:46 +0800

Thanks a lot for this particular material I had been browsing all Search engines to find it! Eric Dane

Avatar_small
seo said:
Sun, 06 Nov 2022 14:01:55 +0800

Hi there, Might I export your own photograph and use it on my own webpage? Seminole Hard Rock Casino in Tampa

Avatar_small
seo said:
Sun, 06 Nov 2022 14:02:08 +0800

I’d have to seek advice from you here. Which is not some thing Which i do! I like reading a post that can make people feel. Also, thanks for allowing me to comment! Best Casinos in Macau

Avatar_small
seo said:
Sun, 06 Nov 2022 14:02:18 +0800

I’d have to seek advice from you here. Which is not some thing Which i do! I like reading a post that can make people feel. Also, thanks for allowing me to comment! Best Casinos in Macau

Avatar_small
seo said:
Sun, 06 Nov 2022 14:02:27 +0800

puppies and dogs are very cute, i always love to play with them during my spare time;; Tom McCall Waterfront Park Travel

Avatar_small
seo said:
Sun, 06 Nov 2022 14:02:37 +0800

 This valuable tips and hints entails a lot to me and far more to my office colleagues. Many thanks; from everyone of us. Where To Stay In Paris

Avatar_small
seo said:
Sun, 06 Nov 2022 14:02:48 +0800

Hola i would really love to subscribe and read your blog posts .! Infant CPR

Avatar_small
seo said:
Sun, 06 Nov 2022 14:02:58 +0800

I’m really enjoying the theme/design of your blog. Do you ever run into any web browser compatibility issues? A number of my blog audience have complained about my website not operating correctly in Explorer but looks great in Firefox. Do you have any advice to help fix this issue? Managing Neck Pain

Avatar_small
seo said:
Sun, 06 Nov 2022 14:03:10 +0800

what you had planned and can usually spoil a normally good picture, especially if you thinking about enlarging the item. Bump On Roof Of Mouth

Avatar_small
seo said:
Sun, 06 Nov 2022 14:03:22 +0800

Appreciate it for this post, I am a big fan of this website would like to keep updated. SEO is Important for Your Online Success

Avatar_small
seo said:
Sun, 06 Nov 2022 14:03:36 +0800

Hmm is anyone else having problems with the pictures on this blog loading? I’m trying to determine if its a problem on my end or if it’s the blog. Any responses would be greatly appreciated. PayPal Working Capital

Avatar_small
seo said:
Sun, 06 Nov 2022 14:03:46 +0800

I don’t usually comment but I gotta tell thanks for the post on this perfect one . Protect Yourself in a Motor Vehicle Accident

Avatar_small
seo said:
Sun, 06 Nov 2022 14:03:58 +0800

I was just imagine about it and you provided me the correct information I really bookmark it Kodi Latest Version

Avatar_small
seo said:
Sun, 06 Nov 2022 14:04:08 +0800

You really should take part in a contest personally of the best blogs on the internet. I most certainly will recommend this page! Monster Hunter World Switch

Avatar_small
seo said:
Sun, 06 Nov 2022 14:04:20 +0800

Hi there! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My weblog looks weird when browsing from my iphone. I’m trying to find a template or plugin that might be able to resolve this issue. If you have any suggestions, please share. Thanks! How to Fix Spotify Web Player

Avatar_small
seo said:
Sun, 06 Nov 2022 14:04:33 +0800

Search engines Adsense not just provides key phrase precise classified ads nevertheless web site precise adverts at the same time, maximizing your own probable to get sales revenue. MyFlixer

Avatar_small
seo said:
Sun, 06 Nov 2022 14:04:44 +0800

Greetings! This is my first visit to your blog! We are a team of volunteers and starting a new project in a community in the same niche. Your blog provided us beneficial information to work on. You have done a marvellous job! Best JIRA Alternatives

Avatar_small
seo said:
Sun, 06 Nov 2022 14:04:56 +0800

 

Hey there! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no data backup. Do you have any methods to stop hackers? Divertirse Divertir Conjugation In SpanishHey there! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no data backup. Do you have any methods to stop hackers? Divertirse Divertir Conjugation In Spanish

Hey there! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no data backup. Do you have any methods to stop hackers? Divertirse Divertir Conjugation In Spanish

Avatar_small
seo said:
Sun, 06 Nov 2022 14:05:07 +0800

Very great post. I simply stumbled upon your weblog and wanted to say that I’ve truly enjoyed surfing around your weblog posts. In any case I will be subscribing for your rss feed and I hope you write once more very soon! Angular velocity formula

Avatar_small
seo said:
Sun, 06 Nov 2022 14:05:16 +0800

Hi there! This is kind of off topic but I need some advice from an established blog. Is it tough to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about setting up my own but I’m not sure where to begin. Do you have any points or suggestions? With thanks Llegar Conjugation In Spanish

Avatar_small
umaqir said:
Sun, 06 Nov 2022 17:16:33 +0800

I impressed, I must say. Really rarely do I encounter a blog that both educative and entertaining, and let me inform you, you’ve got hit the nail on the head. Your thought is outstanding; the issue is something that not sufficient people are speaking intelligently about. I’m very pleased that I stumbled throughout this in my seek for one thing regarding this. <a href="https://www.thebigpicturemovie.com/how-to-connect-alexa-to-wifi/">wifi connection</a>

Avatar_small
umaqir said:
Sun, 06 Nov 2022 18:11:29 +0800

Some really marvellous work on behalf of the owner of this internet site , perfectly great content . <a href="https://technologyrest.com/halo-infinite-walkthrough/">master chief</a>

Avatar_small
seo said:
Wed, 09 Nov 2022 18:58:59 +0800

I think this is among the most vital info for me. And i am glad reading your article. But want to remark on some general things, The site style is great, the articles is really great : D. Good job, cheers write for us

Avatar_small
seo said:
Wed, 09 Nov 2022 19:03:37 +0800

Do you wear boxers or biefs? I wana bui em. write for us

Avatar_small
seo said:
Sat, 12 Nov 2022 17:21:06 +0800

Hmm is anyone else experiencing problems with the images on this blog loading? I’m trying to find out if its a problem on my end or if it’s the blog. Any feed-back would be greatly appreciated. anonymous

Avatar_small
seo said:
Sat, 12 Nov 2022 17:55:21 +0800

Hey there! Nice stuff, please keep us posted when you post again something like that! Recommended Reading

Avatar_small
seo said:
Sun, 13 Nov 2022 15:43:54 +0800

Was koche ich heute - diese Frage stellen sich tag fuer tag viele Menschen. Und wir haben tag fuer tag die perfeckte Antwort darauf! Besuchen Sie uns auf unserer Webseite und lassen Sie sich von uns beraten . Wir freuen uns auf Sie! 바카라사이트

Avatar_small
seo said:
Mon, 14 Nov 2022 19:36:35 +0800

This is a correct weblog for anyone who wishes to be familiar with this topic. You are aware of a lot its almost tricky to argue together with you (not too I really would want…HaHa). You definitely put a brand new spin over a topic thats been written about for many years. Great stuff, just great! how to delete cookies on iphone

Avatar_small
seo said:
Thu, 15 Dec 2022 17:27:43 +0800

Really clean internet site , appreciate it for this post. dig this

Avatar_small
seo said:
Sun, 25 Dec 2022 18:42:04 +0800 I am typically to blogging we really appreciate your content. The content has truly peaks my interest. I’m going to bookmark your web blog and keep checking for brand spanking new details. see here
Avatar_small
seo said:
Sun, 01 Jan 2023 19:26:37 +0800

Basically to follow up on the up-date of this topic on your web site and wish to let you know simply how much I loved the time you took to generate this valuable post. Within the post, you really spoke of how to actually handle this matter with all ease. It would be my pleasure to collect some more ideas from your web page and come as much as offer other people what I learned from you. Many thanks for your usual terrific effort. how to plan a trip out of the country

Avatar_small
seo said:
Sun, 01 Jan 2023 19:34:36 +0800

I consider something really special in this website . how to travel for a living

Avatar_small
seo said:
Sun, 01 Jan 2023 19:46:24 +0800

Hey There. I found your blog using msn. This is a very well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I will definitely return. how to save money on hotels

Avatar_small
seo said:
Mon, 02 Jan 2023 19:51:00 +0800

you have a excellent weblog here! do you want to earn some invite posts in this little weblog? Rejuvenate CBD Gummies

Avatar_small
seo said:
Sun, 08 Jan 2023 21:17:05 +0800

Great goods from you, man. I have understand your stuff previous to and you are just too great. I really like what you have acquired here, certainly like what you’re saying and the way in which you say it. You make it enjoyable and you still take care of to keep it sensible. I can’t wait to read far more from you. This is actually a terrific website. Keto Gummies

Avatar_small
seo said:
Wed, 11 Jan 2023 22:10:10 +0800

Your blog never ceases to amaze me, it is very well written and organized.”\"*”- MPO SLOT

Avatar_small
seo said:
Thu, 12 Jan 2023 17:37:04 +0800

I wish to convey my passion for your generosity in support of men who really need guidance on this subject matter. Your personal dedication to passing the solution along had become exceptionally good and have really empowered employees like me to achieve their objectives. The useful tutorial indicates so much to me and even further to my peers. Best wishes; from all of us. Proper CBD Gummies

Avatar_small
seo said:
Wed, 18 Jan 2023 13:55:38 +0800

Wonderful line up. We will be linking to this wonderful article on our website. Maintain up the very good writing. เว็บสล็อต ที่มีคนเล่นมากที่สุด

Avatar_small
sepo said:
Fri, 20 Jan 2023 02:22:48 +0800

Once I originally commented I clicked the -Notify me when new feedback are added- checkbox and now every time a remark is added I get four emails with the same comment. Is there any means you possibly can remove me from that service? Thanks! Lowongan Kerja Langsung Diterima

Avatar_small
james said:
Mon, 30 Jan 2023 18:37:10 +0800

As I website possessor I believe the content material here is rattling wonderful , appreciate it for your efforts. You should keep it up forever! Best of luck. 9ja New

Avatar_small
seo said:
Sun, 05 Feb 2023 22:35:41 +0800

Thanks for the great post on your blog, it really gives me an insight on this topic..;:’; planet beauty


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter