资料介绍
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
- 嵌入式Linux驱动程序开发 6次下载
- EVAL-ADP5588:ADP5588键盘I/O扩展器评估板 2次下载
- ADP150稳压器固定电压Linux驱动程序 0次下载
- ADP5589输入键盘和GPIO Linux驱动程序 5次下载
- ADP5520/01 MFD Linux驱动程序 0次下载
- ADP5588输入键盘和GPIO Linux驱动程序 0次下载
- Linux的LEDS GPIO驱动程序免费下载 3次下载
- AM3553X的GPIO驱动的设计和硬件的控制驱动程序 20次下载
- Linux驱动程序缺陷检测研究 9次下载
- Linux系统网络驱动程序的编写 0次下载
- 基于Linux下的LCD驱动程序实现 12次下载
- ADP5588原文资料数据手册PDF免费下载(移动I/O扩展器和QWERTY键盘控制器) 10次下载
- 第9章 Linux驱动程序设计 3次下载
- Windows CE下GPIO驱动程序的设计与应用 48次下载
- 步进电机的Linux驱动程序 45次下载
- 怎么编写Framebuffer驱动程序 66次阅读
- 基于OpenHarmony编写GPIO平台驱动和应用程序 406次阅读
- 基于V4L技术和摄像头的Linux驱动程序的设计与实现 2621次阅读
- 如何写一个Linux设备驱动程序 4018次阅读
- 米尔科技LINUX设备驱动程序教程 1781次阅读
- 嵌入式Linux内核的驱动程序开发是怎样的 1284次阅读
- 浅谈电脑驱动程序的工作原理 详解电脑驱动程序意义 2.8w次阅读
- 基于嵌入式Linux内核的系统设备驱动程序开发设计 1031次阅读
- 基于Linux2.6.30开发DS18B20的驱动程序的类型和文件操作接口函数详解 1262次阅读
- 可动态安装的Linux设备驱动程序 882次阅读
- 如何用嵌入式Linux系统编写键盘驱动 1222次阅读
- 8255A驱动程序 2868次阅读
- 树莓派上MAX7219的字符驱动程序编写 6699次阅读
- Xilinx设备的驱动程序 7711次阅读
- PCI驱动程序开发实例 6506次阅读
下载排行
本周
- 1UHD智能显示SoC VS680产品简介
- 0.46 MB | 7次下载 | 免费
- 2深蕾半导体智能显示SoC芯片 VS680产品简介
- 0.33 MB | 3次下载 | 免费
- 3JW7707F杰华特3.4A50V,7mΩ同步整流器-jw7707f参数规格书
- 268.87 KB | 2次下载 | 免费
- 4电池管理系统(BMS)软硬件介绍
- 0.23 MB | 2次下载 | 2 积分
- 5分析电源电感发热解决方法
- 0.26 MB | 2次下载 | 免费
- 6大功率LED驱动器DW8501数据手册
- 0.37 MB | 1次下载 | 2 积分
- 74.5V 至 52V 输入、电流模式升压控制器TPS4021x-Q1数据表
- 2.03MB | 1次下载 | 免费
- 8电压检测芯片TPS3803和TPS3805数据表
- 1.06MB | 1次下载 | 免费
本月
- 1DCDC原理详解
- 0.98 MB | 85次下载 | 免费
- 2FU-7(807)胆机原理图
- 11.93 MB | 26次下载 | 1 积分
- 3电子元件基础知识介绍
- 8.76 MB | 26次下载 | 2 积分
- 4用于汽车应用的高压电源管理IC TPS65311-Q1数据表
- 1.05MB | 22次下载 | 免费
- 5DC-DC电路(Buck)的设计与仿真
- 0.60 MB | 12次下载 | 2 积分
- 6GD32F10x系列MCU用户手册
- 11.5MB | 9次下载 | 免费
- 7多功能电源管理 SOC IP5306数据手册
- 0.20 MB | 7次下载 | 免费
- 8UHD智能显示SoC VS680产品简介
- 0.46 MB | 7次下载 | 免费
总榜
- 1matlab软件下载入口
- 未知 | 935083次下载 | 免费
- 2开源硬件-PMP21529.1-4 开关降压/升压双向直流/直流转换器 PCB layout 设计
- 1.48MB | 420046次下载 | 免费
- 3Altium DXP2002下载入口
- 未知 | 233067次下载 | 免费
- 4电路仿真软件multisim 10.0免费下载
- 340992 | 191314次下载 | 免费
- 5十天学会AVR单片机与C语言视频教程 下载
- 158M | 183311次下载 | 免费
- 6labview8.5下载
- 未知 | 81567次下载 | 免费
- 7Keil工具MDK-Arm免费下载
- 0.02 MB | 73786次下载 | 免费
- 8NI LabVIEW中实现3D视觉的工具和技术
- 未知 | 70088次下载 | 免费
评论
查看更多