Xia Yang 4026c9868c tegra: cec: Driver rework
Change write() to work per frame.
Change write() to return -1 on error and set up errno

write() API:
-Userspace is responsible for re-transmission.
-Read from user-space byte by byte, each byte representing
 a block, up to 16 bytes as specified by HDMI standard.
-Return 0 on success transmission, -1 otherwise, with errno
 setup as follows:
  EIO - TX_REGISTER_UNDERRUN, should not happen, otherwise
      driver is have serious timing issue.
  ECOMM - BUS arbitration failure or anomaly BUS activity.
      Transmission is abandoned.
  ECONNRESET - For broadcast message only, someone on the BUS
      asserted NAK during transmission.
  EHOSTUNREACH - For direct message only, message was not ACK'd.
      (Required by logical address allocation)
  EMSGSIZE - Message size > 16 bit.
  EFAULT - Page fault accessing message buffer.
  EINTR - call interrupted by singal.

read() API is unchanged, works per packet with no error report.

Change-Id: Iabdd92b5658dd63c7b500a7ec88d79a64c8c0a43
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/304664
(cherry picked from commit 6ab7a446c4a3e8e4970ceec5a3c715453a24e4a5)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/347779
Reviewed-on: http://git-master/r/1164143
(cherry picked from commit 67a6c2d3cfbeeca5cb5ed57aae53f34d07decd4f)
2024-12-20 03:54:00 +00:00
2024-12-20 03:54:00 +00:00
2022-12-07 23:57:14 -08:00
2024-10-31 06:08:59 -07:00
2024-02-26 03:10:53 -08:00
Description
No description provided
34 MiB