project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
83 lines
2.6 KiB
C
83 lines
2.6 KiB
C
/*
|
|
* Copyright (c) 2022 rockchip
|
|
*
|
|
*/
|
|
#ifndef _SYSFS_H_
|
|
#define _SYSFS_H_
|
|
|
|
/**
|
|
* write_sysfs_int() - write an integer value to a sysfs file
|
|
* @filename: name of the file to write to
|
|
* @basedir: the sysfs directory in which the file is to be found
|
|
* @val: integer value to write to file
|
|
*
|
|
* Returns a value >= 0 on success, otherwise a negative error code.
|
|
**/
|
|
int write_sysfs_int(const char *filename, const char *basedir, int val);
|
|
|
|
/**
|
|
* write_sysfs_int_and_verify() - write an integer value to a sysfs file
|
|
* and verify
|
|
* @filename: name of the file to write to
|
|
* @basedir: the sysfs directory in which the file is to be found
|
|
* @val: integer value to write to file
|
|
*
|
|
* Returns a value >= 0 on success, otherwise a negative error code.
|
|
**/
|
|
int write_sysfs_int_and_verify(const char *filename, const char *basedir,
|
|
int val);
|
|
|
|
/**
|
|
* write_sysfs_string_and_verify() - string write, readback and verify
|
|
* @filename: name of file to write to
|
|
* @basedir: the sysfs directory in which the file is to be found
|
|
* @val: the string to write
|
|
*
|
|
* Returns a value >= 0 on success, otherwise a negative error code.
|
|
**/
|
|
int write_sysfs_string_and_verify(const char *filename, const char *basedir,
|
|
const char *val);
|
|
|
|
/**
|
|
* write_sysfs_string() - write string to a sysfs file
|
|
* @filename: name of file to write to
|
|
* @basedir: the sysfs directory in which the file is to be found
|
|
* @val: the string to write
|
|
*
|
|
* Returns a value >= 0 on success, otherwise a negative error code.
|
|
**/
|
|
int write_sysfs_string(const char *filename, const char *basedir,
|
|
const char *val);
|
|
|
|
/**
|
|
* read_sysfs_posint() - read an integer value from file
|
|
* @filename: name of file to read from
|
|
* @basedir: the sysfs directory in which the file is to be found
|
|
*
|
|
* Returns the read integer value >= 0 on success, otherwise a negative error
|
|
* code.
|
|
**/
|
|
int read_sysfs_posint(const char *filename, const char *basedir);
|
|
|
|
/**
|
|
* read_sysfs_float() - read a float value from file
|
|
* @filename: name of file to read from
|
|
* @basedir: the sysfs directory in which the file is to be found
|
|
* @val: output the read float value
|
|
*
|
|
* Returns a value >= 0 on success, otherwise a negative error code.
|
|
**/
|
|
int read_sysfs_float(const char *filename, const char *basedir, float *val);
|
|
|
|
/**
|
|
* read_sysfs_string() - read a string from file
|
|
* @filename: name of file to read from
|
|
* @basedir: the sysfs directory in which the file is to be found
|
|
* @str: output the read string
|
|
*
|
|
* Returns a value >= 0 on success, otherwise a negative error code.
|
|
**/
|
|
int read_sysfs_string(const char *filename, const char *basedir, char *str);
|
|
|
|
#endif
|