那么如果parent关闭了,当前clk也就没有了。 secondary - 第二时钟源,用于enable/disable当前clk。 usecount - 引用计数。 get_rate, set_rate, enable, disable, set_parent - 很显然,这些函数指针指到实际操作的函数。clk.h中的各接口函数最后都会调用到这里的函数指针。函数指针是隔离变化的最好办法,在这里一...
return0; if(WARN_ON(clk->prepare_count==0)) return-ESHUTDOWN; if(clk->enable_count==0) { ret=__clk_enable(clk->parent); if(ret) returnret; //这里的操作见一、5中的函数,内部进行了函数集绑定 if(clk->ops->enable) { ret=clk->ops->enable(clk->hw); if(ret) { __clk_disable(...
//get rate: cat /sys/kernel/debug/aclk_gmac0/clk_rate //set rate: echo 24000000 > /sys/kernel/debug/aclk_gmac0/clk_rate //打开clk: echo 1 > /sys/kernel/debug/aclk_gmac0/clk_enable_count //关闭clk: echo 0 > /sys/kernel/debug/aclk_gmac0/clk_enable_count 五、CLK信息导出 1、...
staticintr_tpu_enable(struct r_tpu_priv *p,enumled_brightness brightness){structled_renesas_tpu_config*cfg=p->pdev->dev.platform_data;intprescaler[] = {1,4,16,64};intk, ret;unsignedlongrate, tmp;if(p->timer_state == R_TPU_TIMER_ON)return0;/* wake up device and enable clock */...
0x28,//dc_offset_count_high_range *** adi,dc-offset-tracking-update-event-mask 0x32,//dc_...
rc =mdp3_clk_enable(0,1);if(rc) pr_err("mdp3 clk disable fail\n");elsemdp3_clk_unprepare(); }returnrc; } 开发者ID:FenomenalSabderMOD,项目名称:MOTOE,代码行数:31,代码来源:mdp3_ctrl.c 示例3: mdp3_overlay_unset ▲点赞 5▼ ...
Nothing about clock topology or accounting, such as enable_count or notifier_count, is needed here. That is all handled by the common framework code and struct clk_core. Let's walk through enabling this clk from driver code: struct clk *clk; ...
我现在用FPGA调试AD9361,FPGA输出40MHz时钟作为AD9361demo板的时钟输入,寄存器配置如下:// REFCLK_IN: 40.000 MHzSPIWrite 009,17 // Enable ClocksWAIT 20 // waits ...
/** * @brief Configures the TIM3 peripheral timer for display countdown * @param void * @retval void */ void TIM3_Config(void){ __HAL_RCC_TIM3_CLK_ENABLE(); TIM_Base_InitStruct.Prescaler = 1000; TIM_Base_InitStruct.CounterMode = TIM_COUNTERMODE_UP; TIM_Base_InitStru...
int(*enable)(struct clk *); void(*disable)(struct clk *); u16notifier_count; __u8enable_bit; __s8usecount; u8idlest_bit; #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) u8fixed_div; u32clksel_mask; const struct clksel*clksel; ...