資料介紹

Table of Contents
AD5398 Regulator Current Sink DAC Linux Driver
Supported Devices
Evaluation Boards
Description
AD5398 and AD5821 is a single 10-bit DAC with 120mA output current sink capability. I2C bus is connected to enable/disable output and set the proper output current value. This driver adapts to voltage and current regulator framework in Linux kernel.
Source Code
Status
Files
Function | File |
---|---|
driver | drivers/regulator/ad5398.c |
Adding Linux driver support
Configure kernel with “make menuconfig” (alternatively use “make xconfig” or “make qconfig”)
The AD5398/AD5821 Driver depends on CONFIG_I2C
Select voltage and current regulator framework support and enable AD5398/AD5821 driver. Don't forget to select virtual regulator consumer and userspace regulator consumer as module. Because AD5398 driver is loaded after I2C bus finish initialization at kernel booting, built-in consumers may be loaded earlier and find supply in AD5398 driver is not available.
Linux Kernel Configuration Device Drivers ---> [*] Voltage and Current Regulator Support --->Virtual regulator consumer support Userspace regulator consumer support <*> Analog Devices AD5398/AD5821 regulators
Customize Device Parameters
The platform info defined in bf537-stamp board file is for ad5398 and ad5821 only. If you want to customize this driver for other compatible current regulator DAC, you should revise the platform information accordingly.
- Define device supply name exported by the driver.
- Define supply value range.
- Define supply name in platform_data for the virtual consumer to match and use.
- Define supply name for the user space consumer to match and use.
Driver Testing
Check regulator driver initialization information at kernel booting.
This specifies any shell prompt running on the target
regulator: core version 0.5 i2c /dev entries driver regulator: isink: 0 <--> 120 mA ad5398 0-000c: ad5398 regulator driver loaded i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400
Check if AD5398 is probed properly.
This specifies any shell prompt running on the target
root:/> ls -l sys/class/regulator/regulator.0/ lrwxrwxrwx 1 root root 0 Jan 1 19:47 device -> ../../../0-000c -r--r--r-- 1 root root 4096 Jan 1 19:47 max_microamps -r--r--r-- 1 root root 4096 Jan 1 19:47 microamps -r--r--r-- 1 root root 4096 Jan 1 19:47 min_microamps -r--r--r-- 1 root root 4096 Jan 1 19:47 name -r--r--r-- 1 root root 4096 Jan 1 19:47 num_users drwxr-xr-x 2 root root 0 Jan 1 19:47 power -r--r--r-- 1 root root 4096 Jan 1 19:47 requested_microamps -r--r--r-- 1 root root 4096 Jan 1 19:47 state lrwxrwxrwx 1 root root 0 Jan 1 19:47 subsystem -> ../../../../../../../class/regulator -r--r--r-- 1 root root 4096 Jan 1 19:47 suspend_disk_state -r--r--r-- 1 root root 4096 Jan 1 19:47 suspend_mem_state -r--r--r-- 1 root root 4096 Jan 1 19:47 suspend_standby_state -r--r--r-- 1 root root 4096 Jan 1 19:47 type -rw-r--r-- 1 root root 4096 Jan 1 19:47 uevent root:/> cat sys/class/regulator/regulator.0/max_microamps 120000 root:/> cat sys/class/regulator/regulator.0/min_microamps 0 root:/> cat sys/class/regulator/regulator.0/name current range root:/> cat sys/class/regulator/regulator.0/type current root:/> cat sys/class/regulator/regulator.0/state disabled
Insert virtual consumer driver module and check usability.
This specifies any shell prompt running on the target
root:/> modprobe virtual root:/> ls -l sys/devices/platform/reg-virt-consumer.0/ lrwxrwxrwx 1 root root 0 Jan 1 21:23 driver -> ../../../bus/platform/drivers/reg-virt-consumer -rw-rw-rw- 1 root root 4096 Jan 1 21:23 max_microamps -rw-rw-rw- 1 root root 4096 Jan 1 21:23 max_microvolts -r--r--r-- 1 root root 4096 Jan 1 21:23 microamps_requested_current -rw-rw-rw- 1 root root 4096 Jan 1 21:23 min_microamps -rw-rw-rw- 1 root root 4096 Jan 1 21:23 min_microvolts -r--r--r-- 1 root root 4096 Jan 1 21:23 modalias -rw-rw-rw- 1 root root 4096 Jan 1 21:23 mode drwxr-xr-x 2 root root 0 Jan 1 21:23 power lrwxrwxrwx 1 root root 0 Jan 1 21:23 subsystem -> ../../../bus/platform -rw-r--r-- 1 root root 4096 Jan 1 21:23 uevent root:/> cat sys/devices/platform/reg-virt-consumer.0/max_microamps 120000 root:/> cat sys/devices/platform/reg-virt-consumer.0/min_microamps 0 root:/> echo 50000 > sys/devices/platform/reg-virt-consumer.0/min_microamps root:/> cat sys/devices/platform/reg-virt-consumer.0/min_microamps 50000 root:/> cat sys/devices/platform/reg-virt-consumer.0/max_microamps 120000
Insert user space consumer driver module and check usability.
This specifies any shell prompt running on the target
root:/> modprobe userspace-consumer root:/> ls -l sys/devices/platform/reg-userspace-consumer.0/ lrwxrwxrwx 1 root root 0 Jan 1 21:26 driver -> ../../../bus/platform/drivers/reg-userspace-consumer -r--r--r-- 1 root root 4096 Jan 1 21:26 microamps_requested_current -r--r--r-- 1 root root 4096 Jan 1 21:26 modalias -r--r--r-- 1 root root 4096 Jan 1 21:26 name drwxr-xr-x 2 root root 0 Jan 1 21:26 power -rw-r--r-- 1 root root 4096 Jan 1 21:26 state lrwxrwxrwx 1 root root 0 Jan 1 21:26 subsystem -> ../../../bus/platform -rw-r--r-- 1 root root 4096 Jan 1 21:26 uevent root:/> cat sys/devices/platform/reg-userspace-consumer.0/name ad5398 root:/> cat sys/devices/platform/reg-userspace-consumer.0/state disabled root:/> echo enabled > sys/devices/platform/reg-userspace-consumer.0/state root:/> cat sys/devices/platform/reg-userspace-consumer.0/state enabled
To control ADC to output a given current, you only need to set the value to sysfs entry min_microamps in virtual consumer platform device. The driver adjusts the output according to the min current value received.
- AD5449 IIO DAC Linux驅動程序
- AD5380 IIO多通道Linux驅動程序DAC
- AD5064 IIO四通道Linux驅動程序DAC
- AD5421 IIO DAC Linux驅動程序
- AD5360 IIO多通道Linux驅動程序DAC
- AD7303 IIO DAC Linux驅動程序
- AD5446 IIO DAC Linux驅動程序
- AD5764 IIO四通道Linux驅動程序DAC
- AD5624 IIO四通道Linux驅動程序DAC
- ADP150穩壓器固定電壓Linux驅動程序
- AD5398:120 mA,電流下降,10位,I<sup>2</sup>C DAC數據表
- Linux驅動程序缺陷檢測研究 9次下載
- Linux系統網絡驅動程序的編寫 0次下載
- 第9章 Linux驅動程序設計 3次下載
- AD5398,pdf datasheet (DAC)
- 怎么編寫Framebuffer驅動程序 590次閱讀
- 什么是電壓穩壓器?電壓穩壓器的工作概況 2904次閱讀
- 大電流穩壓器電路設計方案 3643次閱讀
- 如何寫一個Linux設備驅動程序 4535次閱讀
- 米爾科技LINUX設備驅動程序教程 2105次閱讀
- 嵌入式Linux內核的驅動程序開發是怎樣的 1524次閱讀
- 用降壓型穩壓器或線性穩壓器電源時值來會為負載供電 1060次閱讀
- 淺談電腦驅動程序的工作原理 詳解電腦驅動程序意義 3w次閱讀
- 基于嵌入式Linux內核的系統設備驅動程序開發設計 1209次閱讀
- 基于Linux2.6.30開發DS18B20的驅動程序的類型和文件操作接口函數詳解 1500次閱讀
- 可動態安裝的Linux設備驅動程序 1013次閱讀
- 穩壓器有什么作用_穩壓器原理介紹 3.7w次閱讀
- 8155驅動程序 3284次閱讀
- Xilinx設備的驅動程序 8200次閱讀
- PCI驅動程序開發實例 6831次閱讀
下載排行
本周
- 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次下載 | 免費
評論