From patchwork Sat Jun 23 15:36:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 10483733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 97D6D60230 for ; Sat, 23 Jun 2018 15:36:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C102288EC for ; Sat, 23 Jun 2018 15:36:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90F6328AA2; Sat, 23 Jun 2018 15:36:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4418F288EC for ; Sat, 23 Jun 2018 15:36:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751783AbeFWPgs (ORCPT ); Sat, 23 Jun 2018 11:36:48 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:44524 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbeFWPgd (ORCPT ); Sat, 23 Jun 2018 11:36:33 -0400 Received: by mail-wr0-f193.google.com with SMTP id p12-v6so7790581wrn.11 for ; Sat, 23 Jun 2018 08:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+rcvRTHn48BBvmgs0cIcKqEWbjMEkJuvAs4vgQXTuLw=; b=I8DyAg9PY0VbM7AfhKWfajnQmzZMkp1ZFS8PwQXj1io2rSdGm3H6sB10mtOd6Tczc/ JL8DtD9MLd0vSyLfqo8FBuj7UsRsUFf16kl/7sPTxZKEXnQwMSqtjf/SGEo/Axpdw4pl AVHj4C0Dl3QCpllVfB5J8EPiXIHAw6pm4dfSlTyhxuz2qLGHEQ65Si74BaKSSwk2cAPZ dnw4r60/Egn+l14OF11t2tCadisXxPjBEOMRT74rTMvFEaf4gYbuA88wCLffUwooLM89 3Tu1WtCG4HEJhdsibP7RDVXkBcrlSGg/OWqdZu3SwsrA/JX5WDsqSWOx3vFZKeJxsPIx 8qgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+rcvRTHn48BBvmgs0cIcKqEWbjMEkJuvAs4vgQXTuLw=; b=qQsBxAnNN49MhjRG055VVTE3+bxdHwG8oskjGB5hEnXn/UqRZhfjMkTEONisYc3f+F nDXDDESYxrCn1omlIzzwL+iNRoNt4F6EJb3C5ZmKerPiBh7tdtVTrfkWnc/fAPXE5j3r /xq34s423XILUQxD+b1/WpPe6i4AkUmwoJ3LkRt0rBAiFMaf2Q28iV+kf4EqzyvpwOKg c3SKxThdHnAy4WtUC2719AkWT6S4nQ96V00mn/qOh3/asUtcQsk0LWGsFnQ9uUVi7cP9 Hb15thl81tQY6azouEC8JnETz6MNUFB+BLF0Fm1kVkaqxu2sEjgDplNheECvkgSw2BIq U92Q== X-Gm-Message-State: APt69E1HNkiYnacSdVq6oT3DBAn7c+3hfuSLtncJNPAwX4VLajDJYS9I g6K5ZqsE2aBYPrk5z53dzEc= X-Google-Smtp-Source: ADUXVKIGRBr0CDU44HC96yYjr/qbym6c+4uhyEA5B5VdKcExfoAud3OkavN7l37bAJo+dmeDiCI4WQ== X-Received: by 2002:a5d:408f:: with SMTP id o15-v6mr4519075wrp.133.1529768192500; Sat, 23 Jun 2018 08:36:32 -0700 (PDT) Received: from dvbdev.wuest.de (ip-176-199-71-134.hsi06.unitymediagroup.de. [176.199.71.134]) by smtp.gmail.com with ESMTPSA id o15-v6sm3443156wrm.38.2018.06.23.08.36.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Jun 2018 08:36:32 -0700 (PDT) From: Daniel Scheller To: mchehab@kernel.org, mchehab@s-opensource.com Cc: linux-media@vger.kernel.org Subject: [PATCH 16/19] [media] ddbridge/mci: add more MCI status codes, improve MCI_SUCCESS macro Date: Sat, 23 Jun 2018 17:36:12 +0200 Message-Id: <20180623153615.27630-17-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180623153615.27630-1-d.scheller.oss@gmail.com> References: <20180623153615.27630-1-d.scheller.oss@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daniel Scheller 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 --- drivers/media/pci/ddbridge/ddbridge-mci.h | 8 ++++++-- 1 file 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)