Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4693230imm; Tue, 9 Oct 2018 03:54:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV63M/+mClyPb40WsY90uZwHHC+IMzB6+8xNI7hQ1McyirPItUJpghB4Z5eecB0itU1Wd9B3+ X-Received: by 2002:a17:902:24a5:: with SMTP id w34-v6mr8291798pla.73.1539082468662; Tue, 09 Oct 2018 03:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539082468; cv=none; d=google.com; s=arc-20160816; b=vH3cFDvUH81i9sq2yVGRwQwvaMrTrhPyCZ05RNrQnNaoOVed8YtO1e9tFcWKY8Ocho KDdakTrqYvchIPuL+N1r1cny+ZtXIFWL793Evdaxe4I2dSVD6okkX2ES5NBlDqbyWGsR F603+7KGmpm9+/sabizFDTmQ/ZeOpZwYqW3k8VLCx5IDCD/AEq82Q6ZF96p2R3uWP6HS bLPsUfMm4+j9JLaBtw8EgbCReE283DlzXYyDgPd+CGYEEd/bYpj7Anniu5Ox4TV+U4rf h7cQMuKcDYkfj8DqLaJmHBk1V8STUmvJhAVrRNdBsd9JwrzKIJm57eGeQP3uMycgJ+Xr kTwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dkim-signature; bh=7hu+9I3df9yDB49L5W9dRz6K+Zh3RHIGg0xYk//E5lM=; b=GfzXW08UGuPPJstj8m7pqIJOo6wmO88+r2vku8neP/fk/tPgwCPig5ywUnhzyDD5ho alXNZWaiBlj2/Jdh+bXDvzUlpB4swJX5fAuaCkNcuHXq0Jy1UsJd945WurpRTJTCeImv BFFgSjFVAKdZ1lVJ4QzBatnVQ8QnIMmdS6HSWlUQl3+G2QbTEnlztTBmK/xVNEizqE0T ykISp0NrGmU4Tt82SbV+bBx7DnHfbQpK6Jg1pRr7b7Q5pYTTNds2J6CmgxCeQbWAxULP rmKsqj7HOBkmIqZPW+GM1OA7u0saPqxIhmkOn3HEjRZF11wZ8hPJ1Jkzj7gsSO9JTo+/ FsZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bWz2I0o8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b35-v6si19750520pgl.235.2018.10.09.03.54.13; Tue, 09 Oct 2018 03:54:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bWz2I0o8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbeJISKI (ORCPT + 99 others); Tue, 9 Oct 2018 14:10:08 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:37044 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbeJISKH (ORCPT ); Tue, 9 Oct 2018 14:10:07 -0400 Received: by mail-ed1-f68.google.com with SMTP id c22-v6so1256147edc.4; Tue, 09 Oct 2018 03:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7hu+9I3df9yDB49L5W9dRz6K+Zh3RHIGg0xYk//E5lM=; b=bWz2I0o8eQHYFEOlliZuzBRf1Ifdutsf2uphDcuTxM/xYZg+3/4EznUsegFbFg1m0Z cB/3rSXPDTzYkbnqzvgXo/mCtsWyIvOWgmYremBDpukPw9sP/Pnu7WbGGQ/Ra5vLLigO pPTapl1/h7hMAyR56QaPYY0aj5CRs2HlU5k+3MuX202DKRMzmEDeM0bOFIxzgd/eZ1zH Agz271NZeFgd3ZLTrmcbZ8PEop4itJ62MuDI8KXm5tjWMzFTrUqdmg0NxDhdeGOlLwF7 P00L51gnX6fHQeGgPqBP3M2J7XJG0CYgSmPTgbJmxAWUyjk11lUE94O6EM1TSCwHtpzM Hm6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=7hu+9I3df9yDB49L5W9dRz6K+Zh3RHIGg0xYk//E5lM=; b=o1pUNKM1guhJpAuDqGKwsMjOQW+t8/fxR/oTWQeTQ0GQ7yAxVbs/FtdcNhwJ6wfKLQ sYEsBqWq0tnoWC7AyI24h8VrjeoNw60R3vDsOIdIHuJVw5AnSEhkZAGom3sbybGaxUD6 kq8pSof3HzhDJzo5JMNXeYhTsl6cUqMHGeDPNHDUscYDnP2ILR7LC/cUWvvr4BpujJRM x02hdSyJRb0MCLkdcvFu/DjPP2NMly4wXNGeRxorgocMh6LlJqqYfqCuFJio5cBSVHmH g84SODpwGnxBGuVOgqVP3OdGNnF+kLFSolSVgT0dyIRqXMhFQlzw92iFcz+IYP/iKMnu qbmQ== X-Gm-Message-State: ABuFfohgfs1tKKYEXkPWqDHpD/E3eukPB4ksjEM7jtd/DNuPjFZAXfZt myO8jjb/1MupRVQpB0DPaXw= X-Received: by 2002:a17:906:5512:: with SMTP id r18-v6mr27162720ejp.15.1539082425085; Tue, 09 Oct 2018 03:53:45 -0700 (PDT) Received: from localhost ([87.54.42.112]) by smtp.gmail.com with ESMTPSA id v11-v6sm3564133ejj.19.2018.10.09.03.53.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Oct 2018 03:53:44 -0700 (PDT) From: Esben Haabendal To: Chuanhua Han Cc: Boris Brezillon , "broonie\@kernel.org" , "linux-spi\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function References: <20180921070628.35153-1-chuanhua.han@nxp.com> <20180928084431.300b7bf9@bbrezillon> <20180928091833.15e95f7f@bbrezillon> Date: Tue, 09 Oct 2018 12:53:42 +0200 In-Reply-To: (Chuanhua Han's message of "Tue, 9 Oct 2018 09:52:23 +0000") Message-ID: <87y3b72xxl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chuanhua Han writes: > 1. In the dspi driver (spi controller), bits_per_word (dspi->bits_per_word = > transfer->bits_per_word) passed from the upper layer (spi-mem.c) is used. > In this way, I can only assign the appropriate value of > transfer->bits_per_word before passing to the controller, that is, the > controller driver does not > know the value of bits_per_word, and it will use this value when the upper > level sets what value is passed. Yes, the upper layer (spi-mem.c) should set ->bits_per_word according to how the SPI data is to be transfered on the wire. In this case (I haven't looked at spi-mem.c myself), it sounds like the desired value is 8. So it is set to 8, and that should definitely not be changed by dspi driver. > 2. As I understand, bits_per_word does not exist for non-byte alignment, but > for the need to reserve non-byte transmission mode that meets the > controller. Where did you get that understanding from? The bits_per_word value defines the word size in bits for all transfers. > 3. In addition, now the XSPI of dspi cannot transfer data normally, so this > problem needs to be solved. As for the DMA transfer mode, some colleagues will > study it. What do you mean that "XSPI of dspi cannot tranffer data normally"? What specific problems do you see (with unpatched mainline kernel)? /Esben