资源简介
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
相关资源
- 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
- 29281-f50 GTPv1-U.docx中英文对照翻译文档
- 7240 9285好用的UBNT最新固件XM-v5.5.8.bu
- FPGA控制ad9280驱动程序
- MAX9286datasheet
- driver_of_9286.c
- gt9xx驱动程序
- LVDS ADC AD9289的FPGA接口参考设计
评论
共有 条评论