Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp343885ybr; Fri, 22 May 2020 07:59:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXQWJCzglO1wIXypZ3LTThPhdLHzBeQmGb6dP2KgClEJJlYUj6CBam7UIkO0zek+rzssQU X-Received: by 2002:a17:906:379b:: with SMTP id n27mr8280384ejc.432.1590159599124; Fri, 22 May 2020 07:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590159599; cv=none; d=google.com; s=arc-20160816; b=fCi9rYpbPAAVNl8QH2OaUlpiqxxBkIBB+pef+arLjhjz+rQE1qeyLWSpGKigni0/tv lN8zQG16QJ/xjvI4/KWQibqPAcGR1hr0e2E66bgfMyJtMoWihWhZFFXSyFzYvT+PwAdJ 2Ey6k1LcgpK+fQ41ZLUefEtndnUNxNCS7J0PyzWuGKgoHOhpGkTR/JC2D+ArAHV4Wc42 Puyp22XV4sHYh5fglBEzTUC/QPNgZsAgcZ8tnzDYlRX0gmAQtwFeWgG97BF5Hwf/0Nkz WznF/JI43GP+z5gDG0EhvXsIAGtF+hApbiK2HBc56LV+3Cqb6BNGm1SEQXNPQ8XByrzQ gKVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4E93R1F4OMg9K2XLuc0UwI5BfmV/kB8DZ8DcAqlj91Q=; b=VYoNiMvUSR/YuSHBAfUJpABfHhPDB+xicG8oiYhaIt9gwn/QQ4LDpqpdaLmhHNOtUE 1HbLQbvQbliMwuzF+PB6RKi39xOo27Gxk14TRA+Xf6wlypm/shJqETtVsgzbot351iNl N/DtwfHKGpvAS1w9451RMQscnvJIPAZR1y0FyUTk8Vv3PtbFM6Kd8u/oz7q4y3e4eALU w6FwIoCBEuKvdEjHH+gfn5nljspZLR18ulO7UJB0FI3/z8cQHJw85/ztQVnf4kkhdNER V9codopisi9Nfm+hoyR86xYNycJ4NkP1v8iPiYs3jlxexGyK0nSmT5qtP1ExZv42L3n2 S6FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RJh8B/6r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qx14si5031426ejb.442.2020.05.22.07.59.35; Fri, 22 May 2020 07:59:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RJh8B/6r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731347AbgEVO5v (ORCPT + 99 others); Fri, 22 May 2020 10:57:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731342AbgEVO5r (ORCPT ); Fri, 22 May 2020 10:57:47 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DAE2C061A0E; Fri, 22 May 2020 07:57:47 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id j8so11576754iog.13; Fri, 22 May 2020 07:57:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4E93R1F4OMg9K2XLuc0UwI5BfmV/kB8DZ8DcAqlj91Q=; b=RJh8B/6rHjjbkuji4u+fJ26zGQ2weYdBP8O87V6gBC0R3uO3Cxuxwia4xEC5fiQpVd BVao3bcj3EENB6cqKTKGBQu174xQRasXIfU4q+TkCRor9QpUGn/bNvOhtPgxnpksjF4z 3fsMvYjJfJTHISaJ3cUFiRzeDfD7i3e9PZi6fj0SkJEmzk7TEWtsxWUY/iwJxQpOJ2R4 T9SYcuC5mIwu3BPDv9d/KbkENTdJY9raVR0/065zsK9r46jPvzUkAxudp8zmyxpkPzW8 Mh3IcqqBDWoU5MuQNyfGmuqSaUQzuiK4qAbocc1kDDt5QghsG+0LEtcX/A9knBg3T5Ef pvLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4E93R1F4OMg9K2XLuc0UwI5BfmV/kB8DZ8DcAqlj91Q=; b=A8HAwTy87BkFgPBjC5bZ9vWtb7A3CPFHn+mypgqLRaGzLTcx6LaszXDLvCh6yvCPH3 jM0X6Pmjspr3xcYqx5Qc9pSxKvOa+dGUcCBYjfrACWASbhtJpM8qV5dDph3tN3LxvBDc AvvzBnnTteSNlm4wekzi3T/9hnfHfmu4HMiW+J4+GzJPC7gjcRi6GRJHNl2Y/cnghQ80 PfJJdgnbmq+2OKnpomNjtoe8YQ7q6NjzChJtqOt4NWlzqtZLjnmj7Mpz6VZL817Ck+7x 5Yquj91e6nEwtkPCXUgXSxPT71obhiQ8eKgFRYqN84MWFnZJPSAzqgogMxp4LpVOrORb uflQ== X-Gm-Message-State: AOAM530iIcwXx0ow2TCegm1QtUIfThknF51Av7FqPMYg08j47eKUk3lM O44wTQCrrxMR56+s3QkiFOmGVGrtM5veU/fwpu4= X-Received: by 2002:a05:6602:2ac9:: with SMTP id m9mr3461002iov.68.1590159466755; Fri, 22 May 2020 07:57:46 -0700 (PDT) MIME-Version: 1.0 References: <1589800165-3271-1-git-send-email-dillon.minfei@gmail.com> <1589800165-3271-4-git-send-email-dillon.minfei@gmail.com> <20200522113634.GE5801@sirena.org.uk> In-Reply-To: <20200522113634.GE5801@sirena.org.uk> From: dillon min Date: Fri, 22 May 2020 22:57:10 +0800 Message-ID: Subject: Re: [PATCH v4 3/8] spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4 To: Mark Brown Cc: Rob Herring , p.zabel@pengutronix.de, Maxime Coquelin , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Alexandre Torgue , thierry.reding@gmail.com, Sam Ravnborg , Dave Airlie , Daniel Vetter , Michael Turquette , Stephen Boyd , Linux ARM , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, "open list:DRM PANEL DRIVERS" , linux-clk Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi Mark, Thanks for reviewing. On Fri, May 22, 2020 at 7:36 PM Mark Brown wrote: > > On Mon, May 18, 2020 at 07:09:20PM +0800, dillon.minfei@gmail.com wrote: > > > 2, use stm32 spi's "In full-duplex (BIDIMODE=0 and RXONLY=0)", as tx_buf is > > null, we must add dummy data sent out before read data. > > so, add stm32f4_spi_tx_dummy() to handle this situation. > > There are flags SPI_CONTROLLER_MUST_TX and SPI_CONTROLLER_MUST_RX flags > that the driver can set if it needs to, no need to open code this in the > driver. Yes, after check SPI_CONTROLLER_MUST_TX in drivers/spi/spi.c , it's indeed to meet this situation, i will try it and sumbmit a new patch. thanks. best regards Dillon