linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/7] cec: add error injection support
@ 2018-03-05 13:51 Hans Verkuil
  2018-03-05 13:51 ` [PATCHv2 1/7] cec: add core " Hans Verkuil
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Hans Verkuil @ 2018-03-05 13:51 UTC (permalink / raw)
  To: linux-media; +Cc: Wolfram Sang, Maxime Ripard, dri-devel

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

This patch series adds support for CEC error injection for drivers
using the CEC Pin Framework (cec-pin.c). There are two CEC drivers
currently using this framework: the sun4i Allwinner A10/A20 driver
and the cec-gpio driver. This patch series was developed with the
cec-gpio driver and a Raspberry Pi.

The CEC Pin Framework is meant for hardware that has no high-level
support but only direct low-level control of the bus (i.e. pull the
CEC line down or read the CEC line). Low-level bus access like that
is ideal to implement error injection since you have full control of
the bus and you can do anything you want.

This new error injection framework can create most if not all error
conditions that I could think of. We (Cisco) used it to verify our
own CEC implementation and in fact this error injection framework
was developed together with the low-level CEC analysis code in the
cec-ctl userspace utility to analyze what is happening on the bus.

I have been working on creating scripts that can test a remote CEC
adapter for low-level compliance with the CEC standard:

https://git.linuxtv.org/hverkuil/v4l-utils.git/log/?h=cec-pin-tests

(note: these scripts are for the v1 version of this patch series,
they need to be updated for this v2)

These scripts are not complete yet since it isn't smart enough to
tell the difference between different (but valid) interpretations
of the CEC specification and actual violations of the specification.
I plan to continue working on that since I would like to have a
test-suite that can check a CEC implementation automatically.

Special thanks go to Wolfram Sang since his i2c error injection
presentation at the Embedded Linux Conference Europe 2017 inspired
me to switch to debugfs for this instead of using ioctls.

Changes since v1:

- added 'mode' support (off/once/always/toggle).
- simplified the error injection data structures and logic.
- added patch 7 to log various errors in the 'status' debugfs file.

Regards,

	Hans


Hans Verkuil (7):
  cec: add core error injection support
  cec-core.rst: document the error injection ops
  cec-pin: create cec_pin_start_timer() function
  cec-pin-error-inj: parse/show error injection
  cec-pin: add error injection support
  cec-pin-error-inj.rst: document CEC Pin Error Injection
  cec-pin: improve status log

 .../media/cec-drivers/cec-pin-error-inj.rst        | 322 +++++++++++
 Documentation/media/cec-drivers/index.rst          |   1 +
 Documentation/media/kapi/cec-core.rst              |  72 ++-
 MAINTAINERS                                        |   1 +
 drivers/media/cec/Kconfig                          |   6 +
 drivers/media/cec/Makefile                         |   4 +
 drivers/media/cec/cec-core.c                       |  58 ++
 drivers/media/cec/cec-pin-error-inj.c              | 341 +++++++++++
 drivers/media/cec/cec-pin-priv.h                   | 124 +++-
 drivers/media/cec/cec-pin.c                        | 627 ++++++++++++++++++---
 include/media/cec.h                                |   5 +
 11 files changed, 1490 insertions(+), 71 deletions(-)
 create mode 100644 Documentation/media/cec-drivers/cec-pin-error-inj.rst
 create mode 100644 drivers/media/cec/cec-pin-error-inj.c

-- 
2.16.1

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

end of thread, other threads:[~2018-03-27  8:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 13:51 [PATCHv2 0/7] cec: add error injection support Hans Verkuil
2018-03-05 13:51 ` [PATCHv2 1/7] cec: add core " Hans Verkuil
2018-03-05 13:51 ` [PATCHv2 2/7] cec-core.rst: document the error injection ops Hans Verkuil
2018-03-05 13:51 ` [PATCHv2 3/7] cec-pin: create cec_pin_start_timer() function Hans Verkuil
2018-03-05 13:51 ` [PATCHv2 4/7] cec-pin-error-inj: parse/show error injection Hans Verkuil
2018-03-05 13:51 ` [PATCHv2 5/7] cec-pin: add error injection support Hans Verkuil
2018-03-06 22:48   ` Hans Verkuil
2018-03-07 14:17     ` [PATCHv2.1 " Hans Verkuil
2018-03-05 13:51 ` [PATCHv2 6/7] cec-pin-error-inj.rst: document CEC Pin Error Injection Hans Verkuil
2018-03-21 15:45   ` Mauro Carvalho Chehab
2018-03-27  7:59     ` Jani Nikula
2018-03-27  8:09       ` Wolfram Sang
2018-03-05 13:51 ` [PATCHv2 7/7] cec-pin: improve status log Hans Verkuil
2018-03-05 17:40 ` [PATCHv2 0/7] cec: add error injection support Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).