media: rockchip: cif: add version number

Change-Id: I75960c5d035b11fd9e8ef2a22d77f4337c826e96
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
This commit is contained in:
Hu Kejun
2019-04-03 16:20:58 +08:00
committed by Tao Huang
parent 95ea71a61c
commit 3e4125e7c9
2 changed files with 32 additions and 0 deletions

View File

@@ -20,6 +20,9 @@
#include "dev.h"
#include "regs.h"
#include "version.h"
#define RKCIF_VERNO_LEN 10
struct cif_match_data {
int chip_id;
@@ -33,6 +36,10 @@ int rkcif_debug;
module_param_named(debug, rkcif_debug, int, 0644);
MODULE_PARM_DESC(debug, "Debug level (0-1)");
static char rkcif_version[RKCIF_VERNO_LEN];
module_param_string(version, rkcif_version, RKCIF_VERNO_LEN, 0444);
MODULE_PARM_DESC(version, "version number");
int using_pingpong;
/***************************** media controller *******************************/
@@ -421,6 +428,13 @@ static int rkcif_plat_probe(struct platform_device *pdev)
struct resource *res;
int i, ret, irq;
sprintf(rkcif_version, "v%02x.%02x.%02x",
RKCIF_DRIVER_VERSION >> 16,
(RKCIF_DRIVER_VERSION & 0xff00) >> 8,
RKCIF_DRIVER_VERSION & 0x00ff);
dev_info(dev, "rkcif driver version: %s\n", rkcif_version);
match = of_match_node(rkcif_plat_of_match, node);
if (IS_ERR(match))
return PTR_ERR(match);

View File

@@ -0,0 +1,18 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd. */
#ifndef _RKCIF_VERSION_H
#define _RKCIF_VERSION_H
#include <linux/version.h>
/*
*RKCIF DRIVER VERSION NOTE
*
*v0.1.0:
*1. First version;
*
*/
#define RKCIF_DRIVER_VERSION KERNEL_VERSION(0, 1, 0x0)
#endif