1 /* 2 * Support for Intel Camera Imaging ISP subsystem. 3 * Copyright (c) 2015, Intel Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms and conditions of the GNU General Public License, 7 * version 2, as published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 */ 14 15 #include "../../include/linux/atomisp.h" 16 #include "ia_css_version.h" 17 #include "ia_css_version_data.h" 18 #include "ia_css_err.h" 19 #include "sh_css_firmware.h" 20 21 int 22 ia_css_get_version(char *version, int max_size) { 23 char *css_version; 24 25 if (!atomisp_hw_is_isp2401) 26 css_version = ISP2400_CSS_VERSION_STRING; 27 else 28 css_version = ISP2401_CSS_VERSION_STRING; 29 30 if (max_size <= (int)strlen(css_version) + (int)strlen(sh_css_get_fw_version()) + 5) 31 return -EINVAL; 32 strcpy(version, css_version); 33 strcat(version, "FW:"); 34 strcat(version, sh_css_get_fw_version()); 35 strcat(version, "; "); 36 return 0; 37 } 38