资源简介
DS90UB927 928驱动,透传,包含设置Pattern Generator测试彩条的参数,等等等等
代码片段和文件信息
/*
* Copyright (C) 2011-2015 Freescale Semiconductor Inc. All Rights Reserved.
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not write to the Free Software Foundation Inc.
* 51 Franklin Street Fifth Floor Boston MA 02110-1301 USA.
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ADDR_MAX9277 0x0C
#define ADDR_928 0x2C
struct i2c_client *p_i2c_client;
static int max9277_probe(struct i2c_client *adapter
const struct i2c_device_id *device_id);
static int max9277_remove(struct i2c_client *client);
static s32 max9277_read_reg(u8 reg);
static s32 max9277_write_reg(u16 reg u8 val);
static int pwr_gpio pdb_gpio;
static const struct i2c_device_id max9277_id[] = {
{“ds90ub927“ 0}
{}
};
MODULE_DEVICE_TABLE(i2c max9277_id);
static struct i2c_driver max9277_i2c_driver = {
.driver = {
.owner = THIS_MODULE
.name = “ds90ub927“
}
.probe = max9277_probe
.remove = max9277_remove
.id_table = max9277_id
};
static s32 max9277_write_reg(u16 reg u8 val)
{
s32 ret;
p_i2c_client->addr = ADDR_MAX9277;
ret = i2c_smbus_write_byte_data(p_i2c_client reg val);
if (ret < 0) {
dev_info(&p_i2c_client->dev
“%s:write reg error:reg=%2xval=%2x\n“ __func__
reg val);
return -1;
}
return 0;
}
static s32 max9277_read_reg(u8 reg)
{
int val;
p_i2c_client->addr = ADDR_MAX9277;
val = i2c_smbus_read_byte_data(p_i2c_client reg);
if (val < 0) {
dev_info(&p_i2c_client->dev
“%s:read reg error: reg=%2x\n“ __func__ reg);
return -1;
}
return val;
}
static s32 ds90ub928_write_reg(u16 reg u8 val)
{
s32 ret;
p_i2c_client->addr = ADDR_928;
ret = i2c_smbus_write_byte_data(p_i2c_client reg val);
if (ret < 0) {
dev_info(&p_i2c_client->dev
“%s:write reg error:reg=%2xval=%2x\n“ __func__
reg val);
return -1;
}
return 0;
}
static s32 ds90ub928_read_reg(u8 reg)
{
int val;
p_i2c_client->addr = ADDR_928;
val = i2c_smbus_read_byte_data(p_i2c_client reg);
if (val < 0) {
dev_info(&p_i2c_client->dev
“%s:read reg error: reg=%2x\n“ __func__ reg);
return -1;
}
return val;
}
/*!
* max9277 I2C probe function
相关资源
- Atheros EEPROM Tool
- Unifi ap编程器固件 7240+9283
- AR7240+AR9283 DD-WRTUBNT编程器固件+简单硬
- b2f660aed9284154afc0d45c45eb04fe.zip
- ov9281_CSP5_DS_1.01
- XMv5.3.3-1000V2(7240+9285)红色背景编程
- OV9281全局sensor
- 841n v7 ar7241+9287 openwrt固件明月永在版
- OV9281-datasheet
- protobuf-cpp-3.1.0.tar.gz 下载192823
- MAX9286 datasheet
- sanjing_shou_9729287.zip
- 中兴5928交换机操作说明
- 7625928_epubBuilder破解版.rar
- XShell6破解版92897
- navicat中文破解版(附注册码)92811
- AD9280 9708 转换芯片外围电路原理图
- ar9285-ar9287无线网卡黑苹果驱动
- 电子学第二版霍罗威茨928页65.9M高清书
- max9286+96705 4路AHDcamera方案
- ad7928 verilog驱动
- AC6928B-音箱参考原理图
- MAX9286的V4L2测试代码
- OV9281 DVP格式寄存器配置
- GT911、GT928、GT9147的驱动程序
- zw_weixin_44264009-11069284-《电气控制与
- LSI MegaRAID SAS 9280-8e外部8端口6Gb RAID卡
- 好力达写频1.1.4修改版 好力达HLD-92
- 7240+9283-300M蓝色背景全中文版ubnt-集成
- OV9282-Preliminary-Specification-CSP_Version-1
评论
共有 条评论