在线观看www成人影院-在线观看www日本免费网站-在线观看www视频-在线观看操-欧美18在线-欧美1级

電子發燒友App

硬聲App

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示
電子發燒友網>電子資料下載>類型>參考設計>ADP5588 GPIO Linux驅動程序

ADP5588 GPIO Linux驅動程序

2021-04-21 | pdf | 213.37KB | 次下載 | 3積分

資料介紹

This version is outdated by a newer approved version.DiffThis version (05 Sep 2012 11:25) was approved by Michael Hennerich.The Previously approved version (09 Nov 2011 11:54) is available.Diff

ADP5588 GPIO Linux Driver

Supported Devices

Evaluation Boards

Description

Configuration

Software configurable features

Source Code

Status

Source Mainlined?
git Yes

Files

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.

21 Oct 2010 16:10

EOF c linux-kernel>

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

21 Oct 2010 16:10
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 —>

  1. -- 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

下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1電子電路原理第七版PDF電子教材免費下載
  2. 0.00 MB  |  1491次下載  |  免費
  3. 2單片機典型實例介紹
  4. 18.19 MB  |  95次下載  |  1 積分
  5. 3S7-200PLC編程實例詳細資料
  6. 1.17 MB  |  27次下載  |  1 積分
  7. 4筆記本電腦主板的元件識別和講解說明
  8. 4.28 MB  |  18次下載  |  4 積分
  9. 5開關電源原理及各功能電路詳解
  10. 0.38 MB  |  11次下載  |  免費
  11. 6100W短波放大電路圖
  12. 0.05 MB  |  4次下載  |  3 積分
  13. 7基于單片機和 SG3525的程控開關電源設計
  14. 0.23 MB  |  4次下載  |  免費
  15. 8基于AT89C2051/4051單片機編程器的實驗
  16. 0.11 MB  |  4次下載  |  免費

本月

  1. 1OrCAD10.5下載OrCAD10.5中文版軟件
  2. 0.00 MB  |  234313次下載  |  免費
  3. 2PADS 9.0 2009最新版 -下載
  4. 0.00 MB  |  66304次下載  |  免費
  5. 3protel99下載protel99軟件下載(中文版)
  6. 0.00 MB  |  51209次下載  |  免費
  7. 4LabView 8.0 專業版下載 (3CD完整版)
  8. 0.00 MB  |  51043次下載  |  免費
  9. 5555集成電路應用800例(新編版)
  10. 0.00 MB  |  33562次下載  |  免費
  11. 6接口電路圖大全
  12. 未知  |  30320次下載  |  免費
  13. 7Multisim 10下載Multisim 10 中文版
  14. 0.00 MB  |  28588次下載  |  免費
  15. 8開關電源設計實例指南
  16. 未知  |  21539次下載  |  免費

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935053次下載  |  免費
  3. 2protel99se軟件下載(可英文版轉中文版)
  4. 78.1 MB  |  537793次下載  |  免費
  5. 3MATLAB 7.1 下載 (含軟件介紹)
  6. 未知  |  420026次下載  |  免費
  7. 4OrCAD10.5下載OrCAD10.5中文版軟件
  8. 0.00 MB  |  234313次下載  |  免費
  9. 5Altium DXP2002下載入口
  10. 未知  |  233046次下載  |  免費
  11. 6電路仿真軟件multisim 10.0免費下載
  12. 340992  |  191183次下載  |  免費
  13. 7十天學會AVR單片機與C語言視頻教程 下載
  14. 158M  |  183277次下載  |  免費
  15. 8proe5.0野火版下載(中文版免費下載)
  16. 未知  |  138039次下載  |  免費
主站蜘蛛池模板: 天堂视频免费在线观看 | 欧美成人免费草草影院 | 国产特黄1级毛片 | 午夜痒痒网 | 九色综合九色综合色鬼 | 国产成人综合久久 | 成人午夜大片免费7777 | 日本在线不卡一区二区 | 日本一区视频在线播放 | 国产精品高清一区二区三区 | 国产精品视频你懂的 | 狠狠色成色综合网 | freesex性欧美重口 | 手机在线免费视频 | 色婷婷激情五月综合 | 在线黄色免费观看 | 午夜影院三级 | 黄色三级录像 | 免费网站啪啪大全 | 色妞网站 | 成人啪啪免费视频 | 五月亭亭免费高清在线 | 国产精品久久久久久久久久免费 | 色在线观看视频 | 欧美一级爱操视频 | 日本黄色免费片 | 亚洲国产香蕉视频欧美 | 久久伊人男人的天堂网站 | 色吧综合| 色屁屁www影院免费观看视频 | 亚洲成年网 | 天天干天天做天天操 | 欧美性狂猛xxxxxbbbbb | 成人免费视频一区 | 狠狠色狠狠色综合日日32 | 天天爽夜夜爽人人爽免费 | 欧美呜巴又大粗又长 | 五月天婷婷丁香 | 狠狠狠色丁香婷婷综合久久五月 | 久操视频网站 | 日本黄色一区 |