資料介紹
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驅(qū)動(dòng)程序
- AD5380 IIO多通道Linux驅(qū)動(dòng)程序DAC
- AD5064 IIO四通道Linux驅(qū)動(dòng)程序DAC
- AD5421 IIO DAC Linux驅(qū)動(dòng)程序
- AD5360 IIO多通道Linux驅(qū)動(dòng)程序DAC
- AD7303 IIO DAC Linux驅(qū)動(dòng)程序
- AD5446 IIO DAC Linux驅(qū)動(dòng)程序
- AD5764 IIO四通道Linux驅(qū)動(dòng)程序DAC
- AD5624 IIO四通道Linux驅(qū)動(dòng)程序DAC
- ADP150穩(wěn)壓器固定電壓Linux驅(qū)動(dòng)程序
- AD5398:120 mA,電流下降,10位,I<sup>2</sup>C DAC數(shù)據(jù)表
- Linux驅(qū)動(dòng)程序缺陷檢測(cè)研究 9次下載
- Linux系統(tǒng)網(wǎng)絡(luò)驅(qū)動(dòng)程序的編寫 0次下載
- 第9章 Linux驅(qū)動(dòng)程序設(shè)計(jì) 3次下載
- AD5398,pdf datasheet (DAC)
- 怎么編寫Framebuffer驅(qū)動(dòng)程序 403次閱讀
- 什么是電壓穩(wěn)壓器?電壓穩(wěn)壓器的工作概況 1910次閱讀
- 大電流穩(wěn)壓器電路設(shè)計(jì)方案 3410次閱讀
- 如何寫一個(gè)Linux設(shè)備驅(qū)動(dòng)程序 4314次閱讀
- 米爾科技LINUX設(shè)備驅(qū)動(dòng)程序教程 1967次閱讀
- 嵌入式Linux內(nèi)核的驅(qū)動(dòng)程序開(kāi)發(fā)是怎樣的 1415次閱讀
- 用降壓型穩(wěn)壓器或線性穩(wěn)壓器電源時(shí)值來(lái)會(huì)為負(fù)載供電 984次閱讀
- 淺談電腦驅(qū)動(dòng)程序的工作原理 詳解電腦驅(qū)動(dòng)程序意義 2.9w次閱讀
- 基于嵌入式Linux內(nèi)核的系統(tǒng)設(shè)備驅(qū)動(dòng)程序開(kāi)發(fā)設(shè)計(jì) 1113次閱讀
- 基于Linux2.6.30開(kāi)發(fā)DS18B20的驅(qū)動(dòng)程序的類型和文件操作接口函數(shù)詳解 1377次閱讀
- 可動(dòng)態(tài)安裝的Linux設(shè)備驅(qū)動(dòng)程序 957次閱讀
- 穩(wěn)壓器有什么作用_穩(wěn)壓器原理介紹 3.6w次閱讀
- 8155驅(qū)動(dòng)程序 3057次閱讀
- Xilinx設(shè)備的驅(qū)動(dòng)程序 7967次閱讀
- PCI驅(qū)動(dòng)程序開(kāi)發(fā)實(shí)例 6702次閱讀
下載排行
本周
- 1HFSS電磁仿真設(shè)計(jì)應(yīng)用詳解PDF電子教程免費(fèi)下載
- 24.30 MB | 128次下載 | 1 積分
- 2雷達(dá)的基本分類方法
- 1.25 MB | 4次下載 | 4 積分
- 3電感技術(shù)講解
- 827.73 KB | 2次下載 | 免費(fèi)
- 4從 MSP430? MCU 到 MSPM0 MCU 的遷移指南
- 1.17MB | 2次下載 | 免費(fèi)
- 5有源低通濾波器設(shè)計(jì)應(yīng)用說(shuō)明
- 1.12MB | 2次下載 | 免費(fèi)
- 6RA-Eco-RA2E1-48PIN-V1.0開(kāi)發(fā)板資料
- 35.59 MB | 2次下載 | 免費(fèi)
- 7面向熱插拔應(yīng)用的 I2C 解決方案
- 685.57KB | 1次下載 | 免費(fèi)
- 8愛(ài)普生有源晶體振蕩器SG3225EEN應(yīng)用于儲(chǔ)能NPC、新能源
- 317.46 KB | 1次下載 | 免費(fèi)
本月
- 12024年工控與通信行業(yè)上游發(fā)展趨勢(shì)和熱點(diǎn)解讀
- 2.61 MB | 763次下載 | 免費(fèi)
- 2HFSS電磁仿真設(shè)計(jì)應(yīng)用詳解PDF電子教程免費(fèi)下載
- 24.30 MB | 128次下載 | 1 積分
- 3繼電保護(hù)原理
- 2.80 MB | 36次下載 | 免費(fèi)
- 4正激、反激、推挽、全橋、半橋區(qū)別和特點(diǎn)
- 0.91 MB | 32次下載 | 1 積分
- 5labview實(shí)現(xiàn)DBC在界面加載配置
- 0.57 MB | 21次下載 | 5 積分
- 6在設(shè)計(jì)中使用MOSFET瞬態(tài)熱阻抗曲線
- 1.57MB | 15次下載 | 免費(fèi)
- 7GBT 4706.1-2024家用和類似用途電器的安全第1部分:通用要求
- 7.43 MB | 14次下載 | 免費(fèi)
- 8AD18學(xué)習(xí)筆記
- 14.47 MB | 8次下載 | 2 積分
總榜
- 1matlab軟件下載入口
- 未知 | 935113次下載 | 10 積分
- 2開(kāi)源硬件-PMP21529.1-4 開(kāi)關(guān)降壓/升壓雙向直流/直流轉(zhuǎn)換器 PCB layout 設(shè)計(jì)
- 1.48MB | 420061次下載 | 10 積分
- 3Altium DXP2002下載入口
- 未知 | 233084次下載 | 10 積分
- 4電路仿真軟件multisim 10.0免費(fèi)下載
- 340992 | 191360次下載 | 10 積分
- 5十天學(xué)會(huì)AVR單片機(jī)與C語(yǔ)言視頻教程 下載
- 158M | 183329次下載 | 10 積分
- 6labview8.5下載
- 未知 | 81578次下載 | 10 積分
- 7Keil工具M(jìn)DK-Arm免費(fèi)下載
- 0.02 MB | 73804次下載 | 10 積分
- 8LabVIEW 8.6下載
- 未知 | 65985次下載 | 10 積分
評(píng)論
查看更多