Skip to content

Commit

Permalink
vela fs procfs add clock procfs entry
Browse files Browse the repository at this point in the history
procfs enrty add clock feature procfs operations

Signed-off-by: zhengshaobo1 <[email protected]>
Signed-off-by: Xiang Xiao <[email protected]>
  • Loading branch information
zhengshaobo1 authored and GUIDINGLI committed Sep 19, 2023
1 parent 15e7847 commit be767dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static int clk_procfs_stat(const char *relpath, struct stat *buf);

#if !defined(CONFIG_FS_PROCFS_EXCLUDE_CLK) && defined(CONFIG_FS_PROCFS)

const struct procfs_operations clk_procfsoperations =
const struct procfs_operations g_clk_operations =
{
clk_procfs_open, /* open */
clk_procfs_close, /* close */
Expand Down
5 changes: 5 additions & 0 deletions fs/procfs/fs_procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
* External Definitions
****************************************************************************/

extern const struct procfs_operations g_clk_operations;
extern const struct procfs_operations g_cpuinfo_operations;
extern const struct procfs_operations g_cpuload_operations;
extern const struct procfs_operations g_critmon_operations;
Expand Down Expand Up @@ -97,6 +98,10 @@ static const struct procfs_entry_s g_procfs_entries[] =
{ "[0-9]*", &g_proc_operations, PROCFS_DIR_TYPE },
#endif

#if defined(CONFIG_CLK) && !defined(CONFIG_FS_PROCFS_EXCLUDE_CLK)
{ "clk", &g_clk_operations, PROCFS_FILE_TYPE },
#endif

#if defined(CONFIG_ARCH_HAVE_CPUINFO) && !defined(CONFIG_FS_PROCFS_EXCLUDE_CPUINFO)
{ "cpuinfo", &g_cpuinfo_operations, PROCFS_FILE_TYPE },
#endif
Expand Down

0 comments on commit be767dd

Please sign in to comment.