資料介紹
Table of Contents
ADP5588 GPIO Linux Driver
Supported Devices
Evaluation Boards
Description
Configuration
Software configurable features
Source Code
Status
Files
Function | File |
---|---|
driver | drivers/gpio/gpio-adp5588.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_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) { I2C_BOARD_INFO("adp5588-gpio", 0x34), .irq = IRQ_PG0, .platform_data = (void *)&adp5588_gpio_data, }, #endif }
Adding Linux driver support
Configure kernel with “make menuconfig” (alternatively use “make xconfig” or “make qconfig”)
The ADP5588 Driver depends on CONFIG_I2C
IRQ-Chip interrupt controller support is not available in case this driver is build as Module
Device Drivers —>
[*] GPIO Support —>
- -- GPIO Support
[ ] Debug GPIO calls
[*] /sys/class/gpio/... (sysfs interface) *** Memory mapped GPIO expanders: *** < > IT8761E GPIO support *** I2C GPIO expanders: *** < > Maxim MAX7300 GPIO expander < > MAX7319, MAX7320-7327 I2C Port Expanders < > PCA953x, PCA955x, TCA64xx, and MAX7310 I/O ports < > PCF857x, PCA{85,96}7x, and MAX732[89] I2C GPIO expanders [ ] Semtech SX150x I2C GPIO expander < > GPIO Support for ADP5520 PMIC <*> ADP5588 I2C GPIO expander [*] Interrupt controller support for ADP5588
< /code>
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 GPIO device.
root:/> modprobe adp5588-gpio adp5588-gpio 0-0034: gpios 50..67 on a adp5588-gpio Rev. 4
For more information see also here: linux-kernel:drivers:gpio-sysfs
root:/> echo 67 > /sys/class/gpio/export root:/> echo low > /sys/class/gpio/gpio67/direction root:/> echo high > /sys/class/gpio/gpio67/direction root:/> echo in > /sys/class/gpio/gpio67/direction root:/> cat /sys/class/gpio/gpio67/value 1 root:/> cat /sys/class/gpio/gpio67/value 0 root:/
More Information
- EVAL-ADP5588:ADP5588鍵盤I/O擴展器評估板
- ADP150穩壓器固定電壓Linux驅動程序
- ADP5589輸入鍵盤和GPIO Linux驅動程序
- ADP5520/01 MFD Linux驅動程序
- ADP5588輸入鍵盤和GPIO Linux驅動程序
- Linux的LEDS GPIO驅動程序免費下載 3次下載
- 嵌入式Linux設備驅動程序開發基礎知識總結免費下載 13次下載
- AM3553X的GPIO驅動的設計和硬件的控制驅動程序 20次下載
- Linux驅動程序缺陷檢測研究 9次下載
- Linux系統網絡驅動程序的編寫 0次下載
- 基于Linux下的LCD驅動程序實現 12次下載
- ADP5588原文資料數據手冊PDF免費下載(移動I/O擴展器和QWERTY鍵盤控制器) 10次下載
- 第9章 Linux驅動程序設計 3次下載
- Windows CE下GPIO驅動程序的設計與應用
- 步進電機的Linux驅動程序
- 怎么編寫Framebuffer驅動程序 403次閱讀
- 基于OpenHarmony編寫GPIO平臺驅動和應用程序 737次閱讀
- 自動刪除SDK/Vitis下驅動程序的舊版本的Linux腳本 558次閱讀
- 如何寫一個Linux設備驅動程序 4314次閱讀
- 米爾科技LINUX設備驅動程序教程 1967次閱讀
- 嵌入式Linux內核的驅動程序開發是怎樣的 1415次閱讀
- 淺談電腦驅動程序的工作原理 詳解電腦驅動程序意義 2.9w次閱讀
- 基于嵌入式Linux內核的系統設備驅動程序開發設計 1113次閱讀
- 基于Linux2.6.30開發DS18B20的驅動程序的類型和文件操作接口函數詳解 1377次閱讀
- 可動態安裝的Linux設備驅動程序 957次閱讀
- 8255A驅動程序 3193次閱讀
- 8155驅動程序 3057次閱讀
- 樹莓派上MAX7219的字符驅動程序編寫 6901次閱讀
- Xilinx設備的驅動程序 7967次閱讀
- PCI驅動程序開發實例 6702次閱讀
下載排行
本周
- 1電子電路原理第七版PDF電子教材免費下載
- 0.00 MB | 1491次下載 | 免費
- 2單片機典型實例介紹
- 18.19 MB | 95次下載 | 1 積分
- 3S7-200PLC編程實例詳細資料
- 1.17 MB | 27次下載 | 1 積分
- 4筆記本電腦主板的元件識別和講解說明
- 4.28 MB | 18次下載 | 4 積分
- 5開關電源原理及各功能電路詳解
- 0.38 MB | 11次下載 | 免費
- 6100W短波放大電路圖
- 0.05 MB | 4次下載 | 3 積分
- 7基于單片機和 SG3525的程控開關電源設計
- 0.23 MB | 4次下載 | 免費
- 8基于AT89C2051/4051單片機編程器的實驗
- 0.11 MB | 4次下載 | 免費
本月
- 1OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234313次下載 | 免費
- 2PADS 9.0 2009最新版 -下載
- 0.00 MB | 66304次下載 | 免費
- 3protel99下載protel99軟件下載(中文版)
- 0.00 MB | 51209次下載 | 免費
- 4LabView 8.0 專業版下載 (3CD完整版)
- 0.00 MB | 51043次下載 | 免費
- 5555集成電路應用800例(新編版)
- 0.00 MB | 33562次下載 | 免費
- 6接口電路圖大全
- 未知 | 30320次下載 | 免費
- 7Multisim 10下載Multisim 10 中文版
- 0.00 MB | 28588次下載 | 免費
- 8開關電源設計實例指南
- 未知 | 21539次下載 | 免費
總榜
- 1matlab軟件下載入口
- 未知 | 935053次下載 | 免費
- 2protel99se軟件下載(可英文版轉中文版)
- 78.1 MB | 537793次下載 | 免費
- 3MATLAB 7.1 下載 (含軟件介紹)
- 未知 | 420026次下載 | 免費
- 4OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234313次下載 | 免費
- 5Altium DXP2002下載入口
- 未知 | 233046次下載 | 免費
- 6電路仿真軟件multisim 10.0免費下載
- 340992 | 191183次下載 | 免費
- 7十天學會AVR單片機與C語言視頻教程 下載
- 158M | 183277次下載 | 免費
- 8proe5.0野火版下載(中文版免費下載)
- 未知 | 138039次下載 | 免費
評論
查看更多