资料介绍
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驱动程序 3次下载
- AD5380 IIO多通道Linux驱动程序DAC 8次下载
- AD5064 IIO四通道Linux驱动程序DAC 5次下载
- AD5421 IIO DAC Linux驱动程序 2次下载
- AD5360 IIO多通道Linux驱动程序DAC 7次下载
- AD7303 IIO DAC Linux驱动程序 1次下载
- AD5446 IIO DAC Linux驱动程序 7次下载
- AD5764 IIO四通道Linux驱动程序DAC 2次下载
- AD5624 IIO四通道Linux驱动程序DAC 7次下载
- ADP150稳压器固定电压Linux驱动程序 0次下载
- AD5398:120 mA,电流下降,10位,I<sup>2</sup>C DAC数据表 1次下载
- Linux驱动程序缺陷检测研究 9次下载
- Linux系统网络驱动程序的编写 0次下载
- 第9章 Linux驱动程序设计 3次下载
- AD5398,pdf datasheet (DAC) 13次下载
- 怎么编写Framebuffer驱动程序 66次阅读
- 大电流稳压器电路设计方案 3017次阅读
- 基于V4L技术和摄像头的Linux驱动程序的设计与实现 2621次阅读
- 如何写一个Linux设备驱动程序 4018次阅读
- 米尔科技LINUX设备驱动程序教程 1781次阅读
- 嵌入式Linux内核的驱动程序开发是怎样的 1284次阅读
- 浅谈电脑驱动程序的工作原理 详解电脑驱动程序意义 2.8w次阅读
- 基于嵌入式Linux内核的系统设备驱动程序开发设计 1031次阅读
- 基于Linux2.6.30开发DS18B20的驱动程序的类型和文件操作接口函数详解 1262次阅读
- 可动态安装的Linux设备驱动程序 882次阅读
- 如何用嵌入式Linux系统编写键盘驱动 1222次阅读
- 8255A驱动程序 2868次阅读
- 8155驱动程序 2784次阅读
- 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次下载 | 免费
评论
查看更多