Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752886AbdDNC1h (ORCPT ); Thu, 13 Apr 2017 22:27:37 -0400 Received: from mail-by2nam03on0116.outbound.protection.outlook.com ([104.47.42.116]:40939 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751445AbdDNC1c (ORCPT ); Thu, 13 Apr 2017 22:27:32 -0400 Authentication-Results: spf=pass (sender IP is 117.103.190.43) smtp.mailfrom=sony.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sony.com; From: To: , , CC: , , Yasunari Takiguchi , Masayuki Yamamoto , Hideki Nozawa , "Kota Yonezawa" , Toshihiko Matsumoto , Satoshi Watanabe Subject: [PATCH v2 07/15] [media] cxd2880: Add integration layer for the driver Date: Fri, 14 Apr 2017 11:29:59 +0900 Message-ID: <20170414022959.17596-1-Yasunari.Takiguchi@sony.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170414015043.16731-1-Yasunari.Takiguchi@sony.com> References: <20170414015043.16731-1-Yasunari.Takiguchi@sony.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [43.25.42.176] X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:117.103.190.43;IPV:NLI;CTRY:JP;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(39400400002)(39840400002)(39450400003)(39850400002)(39410400002)(2980300002)(438002)(199003)(189002)(5003940100001)(5660300001)(48376002)(47776003)(66066001)(50466002)(36756003)(356003)(305945005)(106466001)(86362001)(7636002)(7736002)(6666003)(2950100002)(2201001)(189998001)(512794004)(1076002)(8936002)(50986999)(76176999)(4326008)(50226002)(8676002)(49486002)(86152003)(2906002)(6306002)(2876002)(38730400002)(107886003)(39060400002)(6116002)(3846002)(54906002)(2004002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR13MB0293;H:JPYOKXEG103.jp.sony.com;FPR:;SPF:Pass;MLV:ovrnspm;A:1;MX:1;PTR:jpyokxeg103.jp.sony.com;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT058;1:rtFzvVdV+FUiMrqJ1w2njg2Q77JWwACioxt8WoqRD3CbYpOTCUyxtFQzaU+hJReCSxUv+5Fr/Lce3Vjk5B2ZNtbC2RhRBxqwUXxkih7ULqHuHcKeK1nL7pphq7gyXoI4GbO2StLpvtDDg/e/AU32aDWFnWv6D5D5KWYFEWRbRQ8fAlWGH87o4SQaNQp6GBEO7jpwIC8eWvP4LziJM60GLfuVL37eZarZWFdAMAo50rYIq+QuiGY0cQU7BS3jDCzvCz/Ky2ocdsddLaTucR9IPbiOTrX+YhKnvrAMpEO9md4FRCxDMfi/lDcWZ+jd1IUhAzWunVDu0KBLO7ExL6L6N8Mtwek0XYD01wNzwYISQvtbwzN/n4y1XovbiDXmLKpcGhFhrxXjwrM+f6j8pZUB2LLHV3H5cM2d4a2qU3uKvLWnnWfdgBy/dA7/bezhVwtpv7VmznTiSsURBmyyRCccrbyINNXE49O/ROtzzUV7V1y8uwgUMeTr6nrmW2hcB4N3M585ZeUXcfdAf33fVsGzyI3iIYYLz4X3R/YbIC33zCA= X-MS-Office365-Filtering-Correlation-Id: 62b27d73-d231-4d81-0f4c-08d482ddccc6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081);SRVR:BY2PR13MB0293; X-Microsoft-Exchange-Diagnostics: 1;BY2PR13MB0293;3:bloiDH4ObaZ4rNBc2j8JCtS5OFHEyhSpvWOrJwWoSP02LZ5oi6ogUuBGNGx7yALVgLzX0z3aOPK2YxBFSIXHZm3YpYlY3SwF1EyI4k+VKoTQgFVsmbTdwFJfn2pjw2PWzaOP2EMDg3TUQUqLr+L6uItGHTQNSAhnEmHc67yjIbYAJ4b0eLKXey9PKLlhrC9FpSot+r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BUreb/Kimpnsa/7lrTbIsuiJcSkvrRWI2aw== X-Microsoft-Exchange-Diagnostics: 1;BY2PR13MB0293;20:BbT4p6seqYZFd5UtqMAvMp4zUES2S7FogBND0paBC6Ucjeeqw15xnO4fq+1DWNuL9yNP8NEbpK4S87WpiSPYA2YPFpepFsYf7aRQ2vCqnHTxAd2pNUnXeSigyULJvLnHZ4F4tt8Gx2GJOBTvlspHISojxWIczQEApB0WQhasG8A/Gav8eGo34xJviDaCi2V0x3OWboZRX1fK1vzDhu6FD09VjT5qDTjDPV30srWJ1kLPTD9qH9UzHQEEk8DC2NXf460aaIAP+fEWoC7gALP7wpukebuEjdVDKPu7cdrYlpx/aaNJbabxUQ4+UNCPN3PKWYa1cLDAu8sa0JsXT8G/xAaaqLt9xu+xSroyEk+wR5r/3i+fOnbZ8J3T95HXOSX+fCBMGiHvXVW6c56SGCwQq3EIgrtRj6Mguot+EgTUc8NkoKV3BZpGOf1NOZJTSwdyXBzHhZri58PjDcWwboDlP2X5d5doQ5j5M0f/qwJSttCHEhKDH50ZNCnf0eC35PNh X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(182409339516656)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(13018025)(13016025)(13023025)(13024025)(8121501046)(5005006)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148);SRVR:BY2PR13MB0293;BCL:0;PCL:0;RULEID:;SRVR:BY2PR13MB0293; X-Microsoft-Exchange-Diagnostics: 1;BY2PR13MB0293;4:tqhmRMqmat82ugeNlKnbD19624GZnKLApPIzFjbFc5wMvZaOoKBGcfFBeCr78rLRB0KxlhzntjSyPuvUCgKpXJYYTYGjR7JiyV50yHGRV3tiA3yTD14sBPVsbyVoPammwCsHMpjvP00rvhYq2nmqdFqQ/pDkr0IUm9eppWs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AiPopUMT3N/Pjhg6n2wEcT5W0uwvy5EDse1RNmQ/96u1C8UTNgu54P+3XAWV?= =?us-ascii?Q?lxtVetQh/kg32vZc9nNFcZwDFZa9K9diB+1SjWH9DNhWwomeEI4n6oa3DcgU?= =?us-ascii?Q?4fzff36znwTowA=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR13MB0293;6:K9abl7ch2lQycQDWNpF+yle+5QiafS9c4E4RGLtUXWzEnzHhB0w6OOUeizhRvq/KFYWIUFPLStlxocOaEGwPmKnP52UBIN/9i5qr3dyMdpAmDrhNjNukpfPJUsrmns35e+HOCTws+dre2x1TxKIwkpS3ELv+DvauIe4zLoO5g6Bt2N9RPvC7pwdV+Y6ZJaO7S5OEEeFNNAnj+FE6oPW/JGdF+C9SSG1MFhMl4UZ/cbaknqFpxHgZ8lndEuFduB2X+0lY3vS7Xh3bRIiavj8z73yF1YNWMNJskL+M2nogEDtP8Vc1CheAnZhQDEVsdK5PZHTT68Pk4rbB8pBZiJoaG+gYkt3MfwpLg4NZIIZ1d7NxeHhIRVemoBS3A5bUF2ZX25B4xL4eg9qvbWExkKBC4KmJmBB3VZj4kF85MGhG5iryXJ45IG8kLU2oMVBUOMTRY78drv5OqoY9sU37vdnnxE89LOUbQUckMWHj2VyLCMA=;5:t4wv0YQwxQXMVcfssSofqhC5s6kxsnjb0lPyXgM0XqyF6UqAkJDzsMmxLu4lhoWvglzskEZyLvP17t6ozI9xbkulpiiKAIYmkqnoPgcSBF3avLa2k1uW/laKy4ZUySzSjG3RpvCx72xZPoO9Ao8ERQ==;24:/luMxgAluQiE9u4zzoWgD8ctTWh0UJZSP5QerB8v1yMxchLxKvDuRecGzPfsGBeBMKnDEoyZZ0ihHR0seSKPDhOMAezMa9yKgHcOyCepZXs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR13MB0293;7:q5HzjLIMiypfhHAzN98OWFeA5tkWEJyLPtwrs5tpEWGurJUwReLW6Q97CZWUhK++zYohnboe/NNxnpQN14YRkOgzIsNf09PbMDYnqxUmsqCLL5Gf5ARD4Ym548d9DtWHBdxI3bSwwTYU/4DUiLZ1+uawA1K2iVWwJnyORDfsTP7aS/pwFmnBddNx2QvzywTDuPQl+n1aR6i9ZYl9uIitDDQ/KJpq47J9DicnelYPB6uEHf5RqGkqZdqOoTJDIyKTRGbaJCug606EZeae796C4Ylb7DXs7E7ilPGuFjPJPz6BIAUb4Ez1FfBIu6p+kUUK2x2RW7F4/pEXgx26o2DRig== X-OriginatorOrg: sony.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2017 02:27:29.4591 (UTC) X-MS-Exchange-CrossTenant-Id: 66c65d8a-9158-4521-a2d8-664963db48e4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=66c65d8a-9158-4521-a2d8-664963db48e4;Ip=[117.103.190.43];Helo=[JPYOKXEG103.jp.sony.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR13MB0293 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6154 Lines: 175 From: Yasunari Takiguchi These functions monitor the driver and watch for task completion. This is part of the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe --- .../media/dvb-frontends/cxd2880/cxd2880_integ.c | 99 ++++++++++++++++++++++ .../media/dvb-frontends/cxd2880/cxd2880_integ.h | 44 ++++++++++ 2 files changed, 143 insertions(+) create mode 100644 drivers/media/dvb-frontends/cxd2880/cxd2880_integ.c create mode 100644 drivers/media/dvb-frontends/cxd2880/cxd2880_integ.h diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_integ.c b/drivers/media/dvb-frontends/cxd2880/cxd2880_integ.c new file mode 100644 index 000000000000..5ad6685e2a1d --- /dev/null +++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_integ.c @@ -0,0 +1,99 @@ +/* + * cxd2880_integ.c + * Sony CXD2880 DVB-T2/T tuner + demodulator driver + * integration layer common functions + * + * Copyright (C) 2016, 2017 Sony Semiconductor Solutions Corporation + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, see . + */ + +#include "cxd2880_tnrdmd.h" +#include "cxd2880_tnrdmd_mon.h" +#include "cxd2880_integ.h" + +enum cxd2880_ret cxd2880_integ_init(struct cxd2880_tnrdmd *tnr_dmd) +{ + enum cxd2880_ret ret = CXD2880_RESULT_OK; + struct cxd2880_stopwatch timer; + u32 elapsed_time = 0; + u8 cpu_task_completed = 0; + + if (!tnr_dmd) + return CXD2880_RESULT_ERROR_ARG; + + ret = cxd2880_tnrdmd_init1(tnr_dmd); + if (ret != CXD2880_RESULT_OK) + return ret; + + ret = cxd2880_stopwatch_start(&timer); + if (ret != CXD2880_RESULT_OK) + return ret; + + while (1) { + ret = cxd2880_stopwatch_elapsed(&timer, &elapsed_time); + if (ret != CXD2880_RESULT_OK) + return ret; + + ret = + cxd2880_tnrdmd_check_internal_cpu_status(tnr_dmd, + &cpu_task_completed); + if (ret != CXD2880_RESULT_OK) + return ret; + + if (cpu_task_completed) + break; + + if (elapsed_time > CXD2880_TNRDMD_WAIT_INIT_TIMEOUT) + return CXD2880_RESULT_ERROR_TIMEOUT; + ret = + cxd2880_stopwatch_sleep(&timer, + CXD2880_TNRDMD_WAIT_INIT_INTVL); + if (ret != CXD2880_RESULT_OK) + return ret; + } + + ret = cxd2880_tnrdmd_init2(tnr_dmd); + if (ret != CXD2880_RESULT_OK) + return ret; + + return CXD2880_RESULT_OK; +} + +enum cxd2880_ret cxd2880_integ_cancel(struct cxd2880_tnrdmd *tnr_dmd) +{ + if (!tnr_dmd) + return CXD2880_RESULT_ERROR_ARG; + + cxd2880_atomic_set(&tnr_dmd->cancel, 1); + + return CXD2880_RESULT_OK; +} + +enum cxd2880_ret cxd2880_integ_check_cancellation(struct cxd2880_tnrdmd + *tnr_dmd) +{ + if (!tnr_dmd) + return CXD2880_RESULT_ERROR_ARG; + + if (cxd2880_atomic_read(&tnr_dmd->cancel) != 0) + return CXD2880_RESULT_ERROR_CANCEL; + + return CXD2880_RESULT_OK; +} diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_integ.h b/drivers/media/dvb-frontends/cxd2880/cxd2880_integ.h new file mode 100644 index 000000000000..9cfc52dbf9d4 --- /dev/null +++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_integ.h @@ -0,0 +1,44 @@ +/* + * cxd2880_integ.h + * Sony CXD2880 DVB-T2/T tuner + demodulator driver + * integration layer common interface + * + * Copyright (C) 2016, 2017 Sony Semiconductor Solutions Corporation + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, see . + */ + +#ifndef CXD2880_INTEG_H +#define CXD2880_INTEG_H + +#include "cxd2880_tnrdmd.h" + +#define CXD2880_TNRDMD_WAIT_INIT_TIMEOUT 500 +#define CXD2880_TNRDMD_WAIT_INIT_INTVL 10 + +#define CXD2880_TNRDMD_WAIT_AGC_STABLE 100 + +enum cxd2880_ret cxd2880_integ_init(struct cxd2880_tnrdmd *tnr_dmd); + +enum cxd2880_ret cxd2880_integ_cancel(struct cxd2880_tnrdmd *tnr_dmd); + +enum cxd2880_ret cxd2880_integ_check_cancellation(struct cxd2880_tnrdmd + *tnr_dmd); + +#endif -- 2.11.0