Commit 6710fcff authored by Pavan Savoy's avatar Pavan Savoy Committed by Greg Kroah-Hartman

drivers:misc: ti-st: set right debug levels for logs

pr_debug-ing few pr_infos from the data paths such as tty receive and
write so as to reduce debugs when we have higher logging levels enabled
undef VERBOSE in receive to avoid huge logs when log level 8 is set.
Signed-off-by: default avatarPavan Savoy <pavan_savoy@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 70442664
...@@ -82,7 +82,7 @@ int st_int_write(struct st_data_s *st_gdata, ...@@ -82,7 +82,7 @@ int st_int_write(struct st_data_s *st_gdata,
*/ */
void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata) void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata)
{ {
pr_info(" %s(prot:%d) ", __func__, chnl_id); pr_debug(" %s(prot:%d) ", __func__, chnl_id);
if (unlikely if (unlikely
(st_gdata == NULL || st_gdata->rx_skb == NULL (st_gdata == NULL || st_gdata->rx_skb == NULL
...@@ -226,7 +226,7 @@ void st_int_recv(void *disc_data, ...@@ -226,7 +226,7 @@ void st_int_recv(void *disc_data,
return; return;
} }
pr_info("count %ld rx_state %ld" pr_debug("count %ld rx_state %ld"
"rx_count %ld", count, st_gdata->rx_state, "rx_count %ld", count, st_gdata->rx_state,
st_gdata->rx_count); st_gdata->rx_count);
...@@ -260,7 +260,7 @@ void st_int_recv(void *disc_data, ...@@ -260,7 +260,7 @@ void st_int_recv(void *disc_data,
plen = plen =
&st_gdata->rx_skb->data &st_gdata->rx_skb->data
[proto->offset_len_in_hdr]; [proto->offset_len_in_hdr];
pr_info("plen pointing to %x\n", *plen); pr_debug("plen pointing to %x\n", *plen);
if (proto->len_size == 1)/* 1 byte len field */ if (proto->len_size == 1)/* 1 byte len field */
payload_len = *(unsigned char *)plen; payload_len = *(unsigned char *)plen;
else if (proto->len_size == 2) else if (proto->len_size == 2)
...@@ -272,7 +272,7 @@ void st_int_recv(void *disc_data, ...@@ -272,7 +272,7 @@ void st_int_recv(void *disc_data,
__func__, proto->chnl_id); __func__, proto->chnl_id);
st_check_data_len(st_gdata, proto->chnl_id, st_check_data_len(st_gdata, proto->chnl_id,
payload_len); payload_len);
pr_info("off %d, pay len %d\n", pr_debug("off %d, pay len %d\n",
proto->offset_len_in_hdr, payload_len); proto->offset_len_in_hdr, payload_len);
continue; continue;
} /* end of switch rx_state */ } /* end of switch rx_state */
...@@ -285,7 +285,7 @@ void st_int_recv(void *disc_data, ...@@ -285,7 +285,7 @@ void st_int_recv(void *disc_data,
case LL_SLEEP_IND: case LL_SLEEP_IND:
case LL_SLEEP_ACK: case LL_SLEEP_ACK:
case LL_WAKE_UP_IND: case LL_WAKE_UP_IND:
pr_info("PM packet"); pr_debug("PM packet");
/* this takes appropriate action based on /* this takes appropriate action based on
* sleep state received -- * sleep state received --
*/ */
...@@ -294,7 +294,7 @@ void st_int_recv(void *disc_data, ...@@ -294,7 +294,7 @@ void st_int_recv(void *disc_data,
count--; count--;
continue; continue;
case LL_WAKE_UP_ACK: case LL_WAKE_UP_ACK:
pr_info("PM packet"); pr_debug("PM packet");
/* wake up ack received */ /* wake up ack received */
st_wakeup_ack(st_gdata, *ptr); st_wakeup_ack(st_gdata, *ptr);
ptr++; ptr++;
...@@ -314,7 +314,7 @@ void st_int_recv(void *disc_data, ...@@ -314,7 +314,7 @@ void st_int_recv(void *disc_data,
st_gdata->rx_chnl = *ptr; st_gdata->rx_chnl = *ptr;
st_gdata->rx_state = ST_W4_HEADER; st_gdata->rx_state = ST_W4_HEADER;
st_gdata->rx_count = st_gdata->list[type]->hdr_len; st_gdata->rx_count = st_gdata->list[type]->hdr_len;
pr_info("rx_count %ld\n", st_gdata->rx_count); pr_debug("rx_count %ld\n", st_gdata->rx_count);
}; };
ptr++; ptr++;
count--; count--;
...@@ -360,7 +360,7 @@ void st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb) ...@@ -360,7 +360,7 @@ void st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb)
switch (st_ll_getstate(st_gdata)) { switch (st_ll_getstate(st_gdata)) {
case ST_LL_AWAKE: case ST_LL_AWAKE:
pr_info("ST LL is AWAKE, sending normally"); pr_debug("ST LL is AWAKE, sending normally");
skb_queue_tail(&st_gdata->txq, skb); skb_queue_tail(&st_gdata->txq, skb);
break; break;
case ST_LL_ASLEEP_TO_AWAKE: case ST_LL_ASLEEP_TO_AWAKE:
...@@ -400,7 +400,7 @@ void st_tx_wakeup(struct st_data_s *st_data) ...@@ -400,7 +400,7 @@ void st_tx_wakeup(struct st_data_s *st_data)
pr_debug("%s", __func__); pr_debug("%s", __func__);
/* check for sending & set flag sending here */ /* check for sending & set flag sending here */
if (test_and_set_bit(ST_TX_SENDING, &st_data->tx_state)) { if (test_and_set_bit(ST_TX_SENDING, &st_data->tx_state)) {
pr_info("ST already sending"); pr_debug("ST already sending");
/* keep sending */ /* keep sending */
set_bit(ST_TX_WAKEUP, &st_data->tx_state); set_bit(ST_TX_WAKEUP, &st_data->tx_state);
return; return;
...@@ -735,7 +735,6 @@ static void st_tty_close(struct tty_struct *tty) ...@@ -735,7 +735,6 @@ static void st_tty_close(struct tty_struct *tty)
static void st_tty_receive(struct tty_struct *tty, const unsigned char *data, static void st_tty_receive(struct tty_struct *tty, const unsigned char *data,
char *tty_flags, int count) char *tty_flags, int count)
{ {
#define VERBOSE
#ifdef VERBOSE #ifdef VERBOSE
print_hex_dump(KERN_DEBUG, ">in>", DUMP_PREFIX_NONE, print_hex_dump(KERN_DEBUG, ">in>", DUMP_PREFIX_NONE,
16, 1, data, count, 0); 16, 1, data, count, 0);
......
...@@ -30,7 +30,7 @@ static void send_ll_cmd(struct st_data_s *st_data, ...@@ -30,7 +30,7 @@ static void send_ll_cmd(struct st_data_s *st_data,
unsigned char cmd) unsigned char cmd)
{ {
pr_info("%s: writing %x", __func__, cmd); pr_debug("%s: writing %x", __func__, cmd);
st_int_write(st_data, &cmd, 1); st_int_write(st_data, &cmd, 1);
return; return;
} }
...@@ -114,18 +114,18 @@ unsigned long st_ll_sleep_state(struct st_data_s *st_data, ...@@ -114,18 +114,18 @@ unsigned long st_ll_sleep_state(struct st_data_s *st_data,
{ {
switch (cmd) { switch (cmd) {
case LL_SLEEP_IND: /* sleep ind */ case LL_SLEEP_IND: /* sleep ind */
pr_info("sleep indication recvd"); pr_debug("sleep indication recvd");
ll_device_want_to_sleep(st_data); ll_device_want_to_sleep(st_data);
break; break;
case LL_SLEEP_ACK: /* sleep ack */ case LL_SLEEP_ACK: /* sleep ack */
pr_err("sleep ack rcvd: host shouldn't"); pr_err("sleep ack rcvd: host shouldn't");
break; break;
case LL_WAKE_UP_IND: /* wake ind */ case LL_WAKE_UP_IND: /* wake ind */
pr_info("wake indication recvd"); pr_debug("wake indication recvd");
ll_device_want_to_wakeup(st_data); ll_device_want_to_wakeup(st_data);
break; break;
case LL_WAKE_UP_ACK: /* wake ack */ case LL_WAKE_UP_ACK: /* wake ack */
pr_info("wake ack rcvd"); pr_debug("wake ack rcvd");
st_data->ll_state = ST_LL_AWAKE; st_data->ll_state = ST_LL_AWAKE;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment