Re: [PATCH V2 8/9] spi: bcm2835aux: add driver stats to debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin,

Am 24.03.19 um 18:50 schrieb kernel@xxxxxxxxxxxxxxxx:
> From: Martin Sperl <kernel@xxxxxxxxxxxxxxxx>
>
> To estimate efficiency add statistics on transfer types
> (polling and interrupt) used to debugfs.
>
> Signed-off-by: Martin Sperl <kernel@xxxxxxxxxxxxxxxx>
> ---
>  drivers/spi/spi-bcm2835aux.c | 61 ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 61 insertions(+)
>
> diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c
> index dd0446968da6..d2b58060b333 100644
> --- a/drivers/spi/spi-bcm2835aux.c
> +++ b/drivers/spi/spi-bcm2835aux.c
> @@ -21,6 +21,7 @@
>
>  #include <linux/clk.h>
>  #include <linux/completion.h>
> +#include <linux/debugfs.h>
>  #include <linux/delay.h>
>  #include <linux/err.h>
>  #include <linux/interrupt.h>
> @@ -102,8 +103,57 @@ struct bcm2835aux_spi {
>  	int tx_len;
>  	int rx_len;
>  	int pending;
> +
> +#if defined(CONFIG_DEBUG_FS)
> +#define BCM2835_AUX_INCR(field) ((field)++)
> +	u64 count_transfer_polling;
> +	u64 count_transfer_irq;
> +	u64 count_transfer_irq_after_poll;
> +
> +	struct dentry *debugfs_dir;
> +#else
> +#define BCM2835_AUX_INCR(field)
> +#endif /* CONFIG_DEBUG_FS */
>  };
>
is there a chance to avoid these ifdefs CONFIG_DEBUG_FS?




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux