1 Star 0 Fork 0

孙全/nvp6158

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
clock.c 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
jch 提交于 2019-07-25 15:19 . upload 6158 driver code
/********************************************************************************
*
* Copyright (C) 2017 NEXTCHIP Inc. All rights reserved.
* Module : Raptor3 Device Driver
* Description : clock.c
* Author :
* Date :
* Version : Version 1.0
*
********************************************************************************
* History :
*
*
********************************************************************************/
#include <linux/string.h>
#include <linux/delay.h>
#include "clock.h"
#include "common.h"
#include "clock_table.h"
#include "gpio_i2c.h"
extern unsigned int raptor3_i2c_addr[4];
void adc_clock_set(clock *clk_adc)
{
gpio_i2c_write(raptor3_i2c_addr[clk_adc->devnum], 0xff, 0x01);
//B1 0x84/5/6/7 ADC Clock
gpio_i2c_write(raptor3_i2c_addr[clk_adc->devnum], 0x84 + clk_adc->ch, clk_adc->vlaue);
}
void pre_clock_set(clock *clk_pre)
{
gpio_i2c_write(raptor3_i2c_addr[clk_pre->devnum], 0xff, 0x01);
//B1 0x8C/D/E/F PRE Clock
gpio_i2c_write(raptor3_i2c_addr[clk_pre->devnum], 0x8c + clk_pre->ch, clk_pre->vlaue);
}
void clock_set(decoder_dev_ch_info_s *dev_ch_info)
{
clock_set_s clk_set = (clock_set_s)decoder_clk_fmtdef[dev_ch_info->fmt_def];
gpio_i2c_write(raptor3_i2c_addr[dev_ch_info->devnum], 0xff, 0x01);
gpio_i2c_write(raptor3_i2c_addr[dev_ch_info->devnum], 0x84 + dev_ch_info->ch, clk_set.clk_adc);
gpio_i2c_write(raptor3_i2c_addr[dev_ch_info->devnum], 0x8c + dev_ch_info->ch, clk_set.clk_pre);
}
void video_out_auto_vclk_set(clock_video_output *clk_vout)
{
gpio_i2c_write(raptor3_i2c_addr[clk_vout->devnum], 0xff, 0x01);
gpio_i2c_write(raptor3_i2c_addr[clk_vout->devnum], 0xCC + clk_vout->port, clk_vout->clk_sel);
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sunshengquan110/nvp6158.git
git@gitee.com:sunshengquan110/nvp6158.git
sunshengquan110
nvp6158
nvp6158
master

搜索帮助