mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-25 19:42:19 +00:00
media: rkisp1: Move debugfs code to a separate file
To avoid cluttering the main rkisp1-dev.c driver file, move debugfs code to a separate source file. This prepares for extensions to the debugfs infrastructure. While at it, add a missing forward declaration for struct dentry in rkisp1-common.h to avoid depending on indirect includes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
3e74a42223
commit
8682037db3
50
drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c
Normal file
50
drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c
Normal file
@@ -0,0 +1,50 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Rockchip ISP1 Driver - Base driver
|
||||
*
|
||||
* Copyright (C) 2019 Collabora, Ltd.
|
||||
*
|
||||
* Based on Rockchip ISP1 driver by Rockchip Electronics Co., Ltd.
|
||||
* Copyright (C) 2017 Rockchip Electronics Co., Ltd.
|
||||
*/
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
#include "rkisp1-common.h"
|
||||
|
||||
void rkisp1_debug_init(struct rkisp1_device *rkisp1)
|
||||
{
|
||||
struct rkisp1_debug *debug = &rkisp1->debug;
|
||||
|
||||
debug->debugfs_dir = debugfs_create_dir(dev_name(rkisp1->dev), NULL);
|
||||
|
||||
debugfs_create_ulong("data_loss", 0444, debug->debugfs_dir,
|
||||
&debug->data_loss);
|
||||
debugfs_create_ulong("outform_size_err", 0444, debug->debugfs_dir,
|
||||
&debug->outform_size_error);
|
||||
debugfs_create_ulong("img_stabilization_size_error", 0444,
|
||||
debug->debugfs_dir,
|
||||
&debug->img_stabilization_size_error);
|
||||
debugfs_create_ulong("inform_size_error", 0444, debug->debugfs_dir,
|
||||
&debug->inform_size_error);
|
||||
debugfs_create_ulong("irq_delay", 0444, debug->debugfs_dir,
|
||||
&debug->irq_delay);
|
||||
debugfs_create_ulong("mipi_error", 0444, debug->debugfs_dir,
|
||||
&debug->mipi_error);
|
||||
debugfs_create_ulong("stats_error", 0444, debug->debugfs_dir,
|
||||
&debug->stats_error);
|
||||
debugfs_create_ulong("mp_stop_timeout", 0444, debug->debugfs_dir,
|
||||
&debug->stop_timeout[RKISP1_MAINPATH]);
|
||||
debugfs_create_ulong("sp_stop_timeout", 0444, debug->debugfs_dir,
|
||||
&debug->stop_timeout[RKISP1_SELFPATH]);
|
||||
debugfs_create_ulong("mp_frame_drop", 0444, debug->debugfs_dir,
|
||||
&debug->frame_drop[RKISP1_MAINPATH]);
|
||||
debugfs_create_ulong("sp_frame_drop", 0444, debug->debugfs_dir,
|
||||
&debug->frame_drop[RKISP1_SELFPATH]);
|
||||
}
|
||||
|
||||
void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1)
|
||||
{
|
||||
debugfs_remove_recursive(rkisp1->debug.debugfs_dir);
|
||||
}
|
||||
Reference in New Issue
Block a user