Skip to content

Commit

Permalink
SSP: shut up debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lance.zhou committed Jun 8, 2016
1 parent 7c4affa commit f6c817a
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/sensorhub/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
# sensor drivers configuration
#

config SENSORS_SSP_DEBUG
tristate "Sensors ssp debug"
default n
help
this controls the debug timer of sensor hub.
If you say yes here you get ssp support for
sensor hub.
To compile this driver as a module, choose M here: the
module will be called ssp.

config SENSORS_SSP_ATMEL
tristate "Sensors ssp ATMEL"
default n
Expand Down
4 changes: 4 additions & 0 deletions drivers/sensorhub/atmel/ssp_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,18 @@ static void debug_timer_func(unsigned long ptr)

void enable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
mod_timer(&data->debug_timer,
round_jiffies_up(jiffies + SSP_DEBUG_TIMER_SEC));
#endif
}

void disable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
del_timer_sync(&data->debug_timer);
cancel_work_sync(&data->work_debug);
#endif
}

int initialize_debug_timer(struct ssp_data *data)
Expand Down
4 changes: 4 additions & 0 deletions drivers/sensorhub/stm/ssp_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,18 @@ static void debug_timer_func(unsigned long ptr)

void enable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
mod_timer(&data->debug_timer,
round_jiffies_up(jiffies + SSP_DEBUG_TIMER_SEC));
#endif
}

void disable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
del_timer_sync(&data->debug_timer);
cancel_work_sync(&data->work_debug);
#endif
}

int initialize_debug_timer(struct ssp_data *data)
Expand Down
4 changes: 4 additions & 0 deletions drivers/sensorhub/stm32f/ssp_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,18 @@ static void debug_timer_func(unsigned long ptr)

void enable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
mod_timer(&data->debug_timer,
round_jiffies_up(jiffies + SSP_DEBUG_TIMER_SEC));
#endif
}

void disable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
del_timer_sync(&data->debug_timer);
cancel_work_sync(&data->work_debug);
#endif
}

int initialize_debug_timer(struct ssp_data *data)
Expand Down
4 changes: 4 additions & 0 deletions drivers/sensorhub/stm_hestia/ssp_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,18 @@ static void debug_timer_func(unsigned long ptr)

void enable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
mod_timer(&data->debug_timer,
round_jiffies_up(jiffies + SSP_DEBUG_TIMER_SEC));
#endif
}

void disable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
del_timer_sync(&data->debug_timer);
cancel_work_sync(&data->work_debug);
#endif
}

int initialize_debug_timer(struct ssp_data *data)
Expand Down
4 changes: 4 additions & 0 deletions drivers/sensorhub/stm_patek/ssp_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,14 +434,18 @@ static void debug_timer_func(unsigned long ptr)

void enable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
mod_timer(&data->debug_timer,
round_jiffies_up(jiffies + SSP_DEBUG_TIMER_SEC));
#endif
}

void disable_debug_timer(struct ssp_data *data)
{
#ifdef SENSORS_SSP_DEBUG
del_timer_sync(&data->debug_timer);
cancel_work_sync(&data->work_debug);
#endif
}

int initialize_debug_timer(struct ssp_data *data)
Expand Down

0 comments on commit f6c817a

Please sign in to comment.