diff options
author | Daniel Scheller <d.scheller@gmx.net> | 2018-06-23 11:36:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-30 16:23:12 -0400 |
commit | 8610326e39cc929dd6fa49161c3472e4babe6bbc (patch) | |
tree | a35c6c81d8903b03b70d377fcec77630a40e2768 /drivers | |
parent | e552684809d601c9a6109a73322c816ce1de10bd (diff) |
media: ddbridge/mci: add more MCI status codes, improve MCI_SUCCESS macro
The MCI can report the command status more finegrained, so, add more
status code defines and update the MCI_SUCCESS macro.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/pci/ddbridge/ddbridge-mci.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-mci.h b/drivers/media/pci/ddbridge/ddbridge-mci.h index f02bc76e3c98..600a8bc642c4 100644 --- a/drivers/media/pci/ddbridge/ddbridge-mci.h +++ b/drivers/media/pci/ddbridge/ddbridge-mci.h @@ -74,9 +74,13 @@ #define SX8_CMD_ENABLE_IQOUTPUT (0x44) #define SX8_CMD_DISABLE_IQOUTPUT (0x45) -#define MCI_ERROR_UNSUPPORTED (0x80) +#define MCI_STATUS_OK (0x00) +#define MCI_STATUS_UNSUPPORTED (0x80) +#define MCI_STATUS_RETRY (0xFD) +#define MCI_STATUS_NOT_READY (0xFE) +#define MCI_STATUS_ERROR (0xFF) -#define MCI_SUCCESS(status) (status < MCI_ERROR_UNSUPPORTED) +#define MCI_SUCCESS(status) ((status & MCI_STATUS_UNSUPPORTED) == 0) #define SX8_CMD_DIAG_READ8 (0xE0) #define SX8_CMD_DIAG_READ32 (0xE1) |