From patchwork Fri Feb 10 15:29:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frode Isaksen X-Patchwork-Id: 9567025 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 CC9B160216 for ; Fri, 10 Feb 2017 15:58:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAD9728575 for ; Fri, 10 Feb 2017 15:58:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF6C828597; Fri, 10 Feb 2017 15:58:22 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 24BA128575 for ; Fri, 10 Feb 2017 15:58:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753292AbdBJP6J (ORCPT ); Fri, 10 Feb 2017 10:58:09 -0500 Received: from mail-wr0-f178.google.com ([209.85.128.178]:36657 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752848AbdBJP6I (ORCPT ); Fri, 10 Feb 2017 10:58:08 -0500 Received: by mail-wr0-f178.google.com with SMTP id k90so110843397wrc.3 for ; Fri, 10 Feb 2017 07:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=f3Z7NHladD3iRkm9/dRe1SIx5g7FHnMxjoLBWjKnqe8=; b=aZYQ+3Tol/NNciw7pF02S4P1LOvr6bG+Hq4Pef0fdAJcnoyi3/fo8JCDaaTgxFrRvk nUPMwtNUE9gCDdeCfMXXb/nX99XtT5FFaNHEkaUyXJrRNjIkggJyWZPxp2v94kuHv1uh VGo//LYbp+b2nr8L9pxzuhVu/jaydQitjVOmDY2/teiE17du04HlRQ2rfWzz04IbuXf2 sEKxmlAYm6cFDFZ/E8x5v4PSOrM+fBGRuh0q3iXheP/DWqw9UmWGT54CRoREaPIaQpee OFuw5+mzkA6z/guHghTq/VHvMI0r7azWpYMyZPJWb1SOP5MMtsRQTRkuL6/Y8z+jkvJK gJtg== 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=f3Z7NHladD3iRkm9/dRe1SIx5g7FHnMxjoLBWjKnqe8=; b=tqO2Iz879IwgfMA9oCRKimMys2cxaJIe4Kr0M7F+qQdOITJiyWFsEMeJrezldGgU38 0/t763qs7B96Hodn/aC00dqHOaUhZkExwbg31+0lZABTjgLVcdOxR9WO0NiHQiAzvVPn Q0dliYTvtR2GvUrPLipqblUiRwgaAA21hWDMi1VQdz1Bn+qSs4000+zTLQezi/un9M2L Zz+nZCqDYpkXz5v2BAhTnTxVtuyixracf+CykO4wdcpbR+Hffne0H9OhHHb2f75b/3Fs DvC1UL4DipNKWELI6c8wINQM60oPbTB5LiapeI3EsLIPGvgV5jgOt6Q8w8p/ZGgPtGxK f+EQ== X-Gm-Message-State: AMke39le29ValxGUtyBH57pa4tshFQ/WCGhTplhhgqVaIT7uCAGdlnLf+o4WM0tRp/d0/H5C X-Received: by 10.223.135.163 with SMTP id b32mr8392865wrb.184.1486740645460; Fri, 10 Feb 2017 07:30:45 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id o143sm2068192wmd.3.2017.02.10.07.30.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Feb 2017 07:30:45 -0800 (PST) From: Frode Isaksen To: nsekhar@ti.com, khilman@baylibre.com, ptitiano@baylibre.com, linux-arm-kernel@lists.infradead.org Cc: broonie@kernel.org, linux-spi@vger.kernel.org, Frode Isaksen Subject: [PATCH 6/8] spi: loopback-test: set HW loopback mode if loopback set Date: Fri, 10 Feb 2017 16:29:42 +0100 Message-Id: <1486740584-17875-7-git-send-email-fisaksen@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486740584-17875-1-git-send-email-fisaksen@baylibre.com> References: <1486740584-17875-1-git-send-email-fisaksen@baylibre.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Set the internal HW loopback mode if the loopback option is set. Signed-off-by: Frode Isaksen --- drivers/spi/spi-loopback-test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c index 50e620f..ce552af 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c @@ -285,6 +285,11 @@ static int spi_loopback_test_probe(struct spi_device *spi) dev_info(&spi->dev, "Executing spi-loopback-tests\n"); + if (loopback) { + spi->mode |= SPI_LOOP; + ret = spi_setup(spi); + dev_info(&spi->dev, "configure loopback return: %i\n", ret); + } ret = spi_test_run_tests(spi, spi_tests); dev_info(&spi->dev, "Finished spi-loopback-tests with return: %i\n",