All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for 4.8 0/2] pulse8-cec fixes
@ 2016-08-12  9:49 Hans Verkuil
  2016-08-12  9:49 ` [PATCH for 4.8 1/2] pulse8-cec: set correct Signal Free Time Hans Verkuil
  2016-08-12  9:49 ` [PATCH for 4.8 2/2] pulse8-cec: fix error handling Hans Verkuil
  0 siblings, 2 replies; 3+ messages in thread
From: Hans Verkuil @ 2016-08-12  9:49 UTC (permalink / raw)
  To: linux-media

From: Hans Verkuil <hans.verkuil@cisco.com>

Two fixes for the pulse8-cec driver. Thanks to Pulse-Eight for
providing me with the additional information so I could resolve
these issues.

Regards,

	Hans

Hans Verkuil (2):
  pulse8-cec: set correct Signal Free Time
  pulse8-cec: fix error handling

 drivers/staging/media/pulse8-cec/pulse8-cec.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

-- 
2.8.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH for 4.8 1/2] pulse8-cec: set correct Signal Free Time
  2016-08-12  9:49 [PATCH for 4.8 0/2] pulse8-cec fixes Hans Verkuil
@ 2016-08-12  9:49 ` Hans Verkuil
  2016-08-12  9:49 ` [PATCH for 4.8 2/2] pulse8-cec: fix error handling Hans Verkuil
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2016-08-12  9:49 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

Don't hardcode the signal free time to 3 bit periods, instead use
the value for the signal free time as passed in by the CEC framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/staging/media/pulse8-cec/pulse8-cec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/pulse8-cec/pulse8-cec.c b/drivers/staging/media/pulse8-cec/pulse8-cec.c
index 94f8590..28f853c 100644
--- a/drivers/staging/media/pulse8-cec/pulse8-cec.c
+++ b/drivers/staging/media/pulse8-cec/pulse8-cec.c
@@ -388,7 +388,7 @@ static int pulse8_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
 	int err;
 
 	cmd[0] = MSGCODE_TRANSMIT_IDLETIME;
-	cmd[1] = 3;
+	cmd[1] = signal_free_time;
 	err = pulse8_send_and_wait(pulse8, cmd, 2,
 				   MSGCODE_COMMAND_ACCEPTED, 1);
 	cmd[0] = MSGCODE_TRANSMIT_ACK_POLARITY;
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH for 4.8 2/2] pulse8-cec: fix error handling
  2016-08-12  9:49 [PATCH for 4.8 0/2] pulse8-cec fixes Hans Verkuil
  2016-08-12  9:49 ` [PATCH for 4.8 1/2] pulse8-cec: set correct Signal Free Time Hans Verkuil
@ 2016-08-12  9:49 ` Hans Verkuil
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2016-08-12  9:49 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

Support more error codes and fix a bug where MSGCODE_TRANSMIT_FAILED_LINE
was mapped to CEC_TX_STATUS_ARB_LOST, which is wrong.

Thanks to Pulse-Eight for providing me with the information needed
to handle this correctly (I hope).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/staging/media/pulse8-cec/pulse8-cec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/pulse8-cec/pulse8-cec.c b/drivers/staging/media/pulse8-cec/pulse8-cec.c
index 28f853c..ed8bd95 100644
--- a/drivers/staging/media/pulse8-cec/pulse8-cec.c
+++ b/drivers/staging/media/pulse8-cec/pulse8-cec.c
@@ -114,14 +114,11 @@ static void pulse8_irq_work_handler(struct work_struct *work)
 		cec_transmit_done(pulse8->adap, CEC_TX_STATUS_OK,
 				  0, 0, 0, 0);
 		break;
-	case MSGCODE_TRANSMIT_FAILED_LINE:
-		cec_transmit_done(pulse8->adap, CEC_TX_STATUS_ARB_LOST,
-				  1, 0, 0, 0);
-		break;
 	case MSGCODE_TRANSMIT_FAILED_ACK:
 		cec_transmit_done(pulse8->adap, CEC_TX_STATUS_NACK,
 				  0, 1, 0, 0);
 		break;
+	case MSGCODE_TRANSMIT_FAILED_LINE:
 	case MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA:
 	case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE:
 		cec_transmit_done(pulse8->adap, CEC_TX_STATUS_ERROR,
@@ -170,6 +167,9 @@ static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data,
 		case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE:
 			schedule_work(&pulse8->work);
 			break;
+		case MSGCODE_HIGH_ERROR:
+		case MSGCODE_LOW_ERROR:
+		case MSGCODE_RECEIVE_FAILED:
 		case MSGCODE_TIMEOUT_ERROR:
 			break;
 		case MSGCODE_COMMAND_ACCEPTED:
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-12  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-12  9:49 [PATCH for 4.8 0/2] pulse8-cec fixes Hans Verkuil
2016-08-12  9:49 ` [PATCH for 4.8 1/2] pulse8-cec: set correct Signal Free Time Hans Verkuil
2016-08-12  9:49 ` [PATCH for 4.8 2/2] pulse8-cec: fix error handling Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.