資料介紹

Table of Contents
ADP5588 Input Keyboard and GPIO Linux Driver
Supported Devices
Evaluation Boards
Description
The driver supports multiple key press detection and resolution.
It independently delivers key press and key release events in
chronological order to the Linux input device system.
This allows SHIFT + ANYKEY, ALT + F1 or CTRL + ALT + DEL sequences.
Since the ADP5588 buffers events in its internal FIFO,
it’s unlikely that events are lost due to heavy system
load and interrupt latencies.
Configuration
Software configurable features
Source Code
Status
Files
Function | File |
---|---|
driver | drivers/input/keyboard/adp5588-keys.c |
include | include/linux/i2c/adp5588.h |
Example platform device initialization
For compile time configuration, it’s common Linux practice to keep board- and application-specific configuration out of the main driver file, instead putting it into the board support file.
For devices on custom boards, as typical of embedded and SoC-(system-on-chip) based hardware, Linux uses platform_data to point to board-specific structures describing devices and how they are connected to the SoC. This can include available ports, chip variants, preferred modes, default initialization, additional pin roles, and so on. This shrinks the board-support packages (BSPs) and minimizes board and application specific #ifdefs in drivers.
Declaring I2C devices
Unlike PCI or USB devices, I2C devices are not enumerated at the hardware level. Instead, the software must know which devices are connected on each I2C bus segment, and what address these devices are using. For this reason, the kernel code must instantiate I2C devices explicitly. There are different ways to achieve this, depending on the context and requirements. However the most common method is to declare the I2C devices by bus number.
This method is appropriate when the I2C bus is a system bus, as in many embedded systems, wherein each I2C bus has a number which is known in advance. It is thus possible to pre-declare the I2C devices that inhabit this bus. This is done with an array of struct i2c_board_info, which is registered by calling i2c_register_board_info().
So, to enable such a driver one need only edit the board support file by adding an appropriate entry to i2c_board_info.
For more information see: Documentation/i2c/instantiating-devices
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { #if defined(CONFIG_KEYBOARD_ADP5585) || defined(CONFIG_KEYBOARD_ADP5585_MODULE) { I2C_BOARD_INFO("adp5585-keys", 0x34), .irq = IRQ_PG0, .platform_data = (void *)&adp5585_kpad_data, }, #endif }
Adding Linux driver support
Configure kernel with “make menuconfig” (alternatively use “make xconfig” or “make qconfig”)
--- Input Device Support <*> Generic input layer (needed for keyboard, mouse, ...) < > Support for memoryless force-feedback devices --- Userland interfaces < > Mouse interface < > Joystick interface < > Touchscreen interfaceEvent interface < > Event debugging --- Input Device Drivers [*] Keyboards —> --- Keyboards < > AT keyboard < > Sun Type 4 and Type 5 keyboard < > DECstation/VAXstation LK201/LK401 keyboard < > XT keyboard < > Newton keyboard < > Stowaway keyboard < > GPIO Buttons < > OpenCores Keyboard Controller <M> ADP5588 I2C QWERTY Keypad and IO Expander [ ] Mouse ---> [ ] Joysticks ---> [ ] Touchscreens ---> [ ] Miscellaneous devices ---> Hardware I/O ports --->
Make sure the I2C SCL Clock is in the range of 60-400 kHz!
Hardware configuration
There is no dedicated Blackfin STAMP evaluation board for the ADP5588. During test and driver development we used the ADP5588 Demo Mother/Daughter Board.
It can be easily wired to the Blackfin STAMP TWI/I2C header.
BF537-STAMP (P10) TWI/I2C header | ADP5588 Daughter Board | |
---|---|---|
PIN | Function | PIN/Function |
2 | (+3.3V) | VCC |
5 | SCL | SCL |
6 | SDA | SDA |
10 | PORTG0 | INTB |
20 | GND | GND |
On the ADP5588 Demo Mother Board replace R30 (10kOhm PULL-UP resistor on /INTB strobe) with a 1-3kOhm resistor. The 10kOhm resistor is too weak - Blackfin might see an additional falling edge interrupt on the rising edge of /INTB.
Driver testing
When the driver is loaded, you should see positive output that it found the ADP5588 device.
root:/> modprobe adp5588_keys input: adp5588-keys as /class/input/input0 adp5588-keys 0-0034: Rev.2 keypad, irq 66
root:/> modprobe evdev
root:/> event_test /dev/input/event0 Input driver version is 1.0.0 Input device ID: bus 0x18 vendor 0x1 product 0x1 version 0x2 Input device name: "adp5588-keys" Supported events: Event type 0 (Reset) Event code 0 (Reset) Event code 1 (Key) Event type 1 (Key) Event code 1 (Esc) Event code 2 (1) Event code 3 (2) Event code 4 (3) Event code 5 (4) Event code 6 (5) Event code 7 (6) Event code 8 (7) Event code 9 (8) Event code 10 (9) Event code 11 (0) Event code 12 (Minus) Event code 13 (Equal) Event code 14 (Backspace) Event code 15 (Tab) Event code 16 (Q) Event code 17 (W) Event code 18 (E) Event code 19 (R) Event code 20 (T) Event code 21 (Y) Event code 22 (U) Event code 23 (I) Event code 24 (O) Event code 25 (P) Event code 26 (LeftBrace) Event code 27 (RightBrace) Event code 28 (Enter) Event code 30 (A) Event code 31 (S) Event code 32 (D) Event code 33 (F) Event code 34 (G) Event code 35 (H) Event code 36 (J) Event code 37 (K) Event code 38 (L) Event code 39 (Semicolon) Event code 40 (Apostrophe) Event code 41 (Grave) Event code 43 (BackSlash) Event code 44 (Z) Event code 45 (X) Event code 46 (C) Event code 47 (V) Event code 48 (B) Event code 49 (N) Event code 50 (M) Event code 51 (Comma) Event code 52 (Dot) Event code 53 (Slash) Event code 57 (Space) Event code 71 (KP7) Event code 72 (KP8) Event code 73 (KP9) Event code 74 (KPMinus) Event code 75 (KP4) Event code 76 (KP5) Event code 77 (KP6) Event code 79 (KP1) Event code 80 (KP2) Event code 81 (KP3) Event code 82 (KP0) Event code 83 (KPDot) Event code 86 (102nd) Event code 96 (KPEnter) Event code 103 (Up) Event code 105 (Left) Event code 106 (Right) Event code 108 (Down) Event code 111 (Delete) Testing ... (interrupt to exit) Event: time 219561.256000, type 1 (Key), code 41 (Grave), value 1 Event: time 219561.256000, type 0 (Reset), code 0 (Reset), value 0 Event: time 219561.464000, type 1 (Key), code 41 (Grave), value 0 Event: time 219561.464000, type 0 (Reset), code 0 (Reset), value 0 Event: time 219561.968000, type 1 (Key), code 2 (1), value 1 Event: time 219561.968000, type 0 (Reset), code 0 (Reset), value 0 Event: time 219562.176000, type 1 (Key), code 2 (1), value 0 Event: time 219562.176000, type 0 (Reset), code 0 (Reset), value 0 Event: time 219562.608000, type 1 (Key), code 3 (2), value 1 Event: time 219562.608000, type 0 (Reset), code 0 (Reset), value 0 Event: time 219562.868000, type 1 (Key), code 3 (2), value 0 Event: time 219562.868000, type 0 (Reset), code 0 (Reset), value 0 Event: time 219563.628000, type 1 (Key), code 4 (3), value 1 Event: time 219563.628000, type 0 (Reset), code 0 (Reset), value 0 Event: time 219563.888000, type 1 (Key), code 4 (3), value 0 Event: time 219563.888000, type 0 (Reset), code 0 (Reset), value 0
More Information
- 4*4矩陣鍵盤驅(qū)動(dòng)程序
- EVAL-ADP5588:ADP5588鍵盤I/O擴(kuò)展器評(píng)估板
- ADP150穩(wěn)壓器固定電壓Linux驅(qū)動(dòng)程序
- ADP5589輸入鍵盤和GPIO Linux驅(qū)動(dòng)程序
- ADP5588 GPIO Linux驅(qū)動(dòng)程序
- ADP5520/01 MFD Linux驅(qū)動(dòng)程序
- Linux的LEDS GPIO驅(qū)動(dòng)程序免費(fèi)下載 3次下載
- 嵌入式Linux設(shè)備驅(qū)動(dòng)程序開(kāi)發(fā)基礎(chǔ)知識(shí)總結(jié)免費(fèi)下載 13次下載
- AM3553X的GPIO驅(qū)動(dòng)的設(shè)計(jì)和硬件的控制驅(qū)動(dòng)程序 20次下載
- Linux驅(qū)動(dòng)程序缺陷檢測(cè)研究 9次下載
- Linux系統(tǒng)網(wǎng)絡(luò)驅(qū)動(dòng)程序的編寫(xiě) 0次下載
- 基于Linux下的LCD驅(qū)動(dòng)程序實(shí)現(xiàn) 12次下載
- ADP5588原文資料數(shù)據(jù)手冊(cè)PDF免費(fèi)下載(移動(dòng)I/O擴(kuò)展器和QWERTY鍵盤控制器) 10次下載
- 第9章 Linux驅(qū)動(dòng)程序設(shè)計(jì) 3次下載
- Windows CE下GPIO驅(qū)動(dòng)程序的設(shè)計(jì)與應(yīng)用
- 怎么編寫(xiě)Framebuffer驅(qū)動(dòng)程序 590次閱讀
- 自動(dòng)刪除SDK/Vitis下驅(qū)動(dòng)程序的舊版本的Linux腳本 620次閱讀
- ProfiNet輸入/輸出端的驅(qū)動(dòng)程序解析 3579次閱讀
- 如何寫(xiě)一個(gè)Linux設(shè)備驅(qū)動(dòng)程序 4535次閱讀
- 米爾科技LINUX設(shè)備驅(qū)動(dòng)程序教程 2105次閱讀
- 嵌入式Linux內(nèi)核的驅(qū)動(dòng)程序開(kāi)發(fā)是怎樣的 1524次閱讀
- 淺談電腦驅(qū)動(dòng)程序的工作原理 詳解電腦驅(qū)動(dòng)程序意義 3w次閱讀
- 基于嵌入式Linux內(nèi)核的系統(tǒng)設(shè)備驅(qū)動(dòng)程序開(kāi)發(fā)設(shè)計(jì) 1209次閱讀
- 基于Linux2.6.30開(kāi)發(fā)DS18B20的驅(qū)動(dòng)程序的類型和文件操作接口函數(shù)詳解 1500次閱讀
- 可動(dòng)態(tài)安裝的Linux設(shè)備驅(qū)動(dòng)程序 1013次閱讀
- 如何用嵌入式Linux系統(tǒng)編寫(xiě)鍵盤驅(qū)動(dòng) 1365次閱讀
- 8255A驅(qū)動(dòng)程序 3434次閱讀
- 樹(shù)莓派上MAX7219的字符驅(qū)動(dòng)程序編寫(xiě) 7102次閱讀
- Xilinx設(shè)備的驅(qū)動(dòng)程序 8200次閱讀
- PCI驅(qū)動(dòng)程序開(kāi)發(fā)實(shí)例 6831次閱讀
下載排行
本周
- 1AN-1267: 使用ADSP-CM408F ADC控制器的電機(jī)控制反饋采樣時(shí)序
- 1.41MB | 3次下載 | 免費(fèi)
- 2AN158 GD32VW553 Wi-Fi開(kāi)發(fā)指南
- 1.51MB | 2次下載 | 免費(fèi)
- 3AN148 GD32VW553射頻硬件開(kāi)發(fā)指南
- 2.07MB | 1次下載 | 免費(fèi)
- 4AN-1154: 采用恒定負(fù)滲漏電流優(yōu)化ADF4157和ADF4158 PLL的相位噪聲和雜散性能
- 199.28KB | 次下載 | 免費(fèi)
- 5AN-960: RS-485/RS-422電路實(shí)施指南
- 380.8KB | 次下載 | 免費(fèi)
- 6EE-249:使用VisualDSP在ADSP-218x DSP上實(shí)現(xiàn)軟件疊加
- 60.02KB | 次下載 | 免費(fèi)
- 7AN-1111: 使用ADuCM360/ADuCM361時(shí)的降低功耗選項(xiàng)
- 306.09KB | 次下載 | 免費(fèi)
- 8AN-904: ADuC7028評(píng)估板參考指南
- 815.82KB | 次下載 | 免費(fèi)
本月
- 1ADI高性能電源管理解決方案
- 2.43 MB | 450次下載 | 免費(fèi)
- 2免費(fèi)開(kāi)源CC3D飛控資料(電路圖&PCB源文件、BOM、
- 5.67 MB | 138次下載 | 1 積分
- 3基于STM32單片機(jī)智能手環(huán)心率計(jì)步器體溫顯示設(shè)計(jì)
- 0.10 MB | 130次下載 | 免費(fèi)
- 4使用單片機(jī)實(shí)現(xiàn)七人表決器的程序和仿真資料免費(fèi)下載
- 2.96 MB | 44次下載 | 免費(fèi)
- 5美的電磁爐維修手冊(cè)大全
- 1.56 MB | 24次下載 | 5 積分
- 6如何正確測(cè)試電源的紋波
- 0.36 MB | 18次下載 | 免費(fèi)
- 7感應(yīng)筆電路圖
- 0.06 MB | 10次下載 | 免費(fèi)
- 8萬(wàn)用表UT58A原理圖
- 0.09 MB | 9次下載 | 5 積分
總榜
- 1matlab軟件下載入口
- 未知 | 935121次下載 | 10 積分
- 2開(kāi)源硬件-PMP21529.1-4 開(kāi)關(guān)降壓/升壓雙向直流/直流轉(zhuǎn)換器 PCB layout 設(shè)計(jì)
- 1.48MB | 420062次下載 | 10 積分
- 3Altium DXP2002下載入口
- 未知 | 233088次下載 | 10 積分
- 4電路仿真軟件multisim 10.0免費(fèi)下載
- 340992 | 191367次下載 | 10 積分
- 5十天學(xué)會(huì)AVR單片機(jī)與C語(yǔ)言視頻教程 下載
- 158M | 183335次下載 | 10 積分
- 6labview8.5下載
- 未知 | 81581次下載 | 10 積分
- 7Keil工具M(jìn)DK-Arm免費(fèi)下載
- 0.02 MB | 73810次下載 | 10 積分
- 8LabVIEW 8.6下載
- 未知 | 65988次下載 | 10 積分
評(píng)論