Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1246112pxb; Fri, 21 Jan 2022 13:15:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuD9c66W1UQzlCoyy7fARDizjuv5U3TMRV+GQ5atfsckBzHhGLiYMC9N4BD3/XQwj1kvj9 X-Received: by 2002:a05:6a00:15d4:b0:4c4:fad0:54be with SMTP id o20-20020a056a0015d400b004c4fad054bemr5087479pfu.62.1642799727024; Fri, 21 Jan 2022 13:15:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642799727; cv=none; d=google.com; s=arc-20160816; b=kB1I7smBhFkrjd6m33+mEEZvDtckK31bPRF0PxTFwbMYpB9J88/zz3NL83HDLskpbV kjwldjrNKy/1NcXyNMy35tA+WK3apaqWQuZOSnbSbyPFmJJ0wBhCrJXlUATJz9FMtWh/ 3hKw4fiAkwRbydZDgH/J5elezN35h8h4lGQk9H8MWj3rDsCnK2HLLohjABEsbUjXYYSS qF/wlrEeCQrXeArRu6z7ZxhBNn9B1Hfxyk/+8cofgcgJa4YrsFxkO1OEufQnlG2CJ6gt zHmB0z3XL/K419qvypYWa1VUpXlWjQ6jfE3qf8xJ5j3DYgB6PYG5BNjsGn4cvBzKx/uK 1J4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=u7cI7G3trpUtnHCfqhJut3Gt91Xt99WAiwIJwAPsTAw=; b=r4JP3NrawKQpc6ttlbY5bVdx8HvOi/UpeLGgpT/0f1I4nfX1doFid4WaL9q+Sak7Al raQNZ2HGi9F83W6cbzSF0UDlbH+XPbL/H9ggfFTWKLXy2pDrMcLPZ2IT4iF++qBWg5EG ORpQJjZC0WmnI3Uk67UPQavVJzwbr8awy5lXGHkbm7Lpi2+Rf19i9ZMacxdilXbqgoeo 2ohH9/OTAkeng31owtC5EvfV9ShHWpjOHwI8Afulz0xRqihBU52EZ0LMrefvPxzryVCf 18+wfNmtk6OjewNWPVj2maDMo4GcNp7FiRfCg686U98Ir6DwOnEoJCZ0WLOT/OVarmV+ bh8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Bn4QBTi3; 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 pc8si5479470pjb.36.2022.01.21.13.15.15; Fri, 21 Jan 2022 13:15:27 -0800 (PST) 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=20210112 header.b=Bn4QBTi3; 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 S1359662AbiATJwK (ORCPT + 99 others); Thu, 20 Jan 2022 04:52:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237302AbiATJwJ (ORCPT ); Thu, 20 Jan 2022 04:52:09 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02A8EC061574; Thu, 20 Jan 2022 01:52:09 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id z22so26074429edd.12; Thu, 20 Jan 2022 01:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=u7cI7G3trpUtnHCfqhJut3Gt91Xt99WAiwIJwAPsTAw=; b=Bn4QBTi3qUFOEld4FbuzD4vMnYnTqwdK+G1fNwrrZ6KfaG0UQ+3HG73aYE5wwFlOZE ESK+SW5NjSt6ewacY0L+HwFr2+b8zm6aBd3O+097nA53oDyjEfpU9vS8Bck09EYV+RQ1 te3/x2WvicezIlvYZpOJCzzPVtD9Idq8v/VBbccvQUAcml1ToyaFPu4NUwFD1AsXEOFp XGXe0q2UUW3Ff86m0uWB3ulVW1MK07WVNLYpDcpqs1bp4fDDRI0c6p3q5nIEJ/j5Gc9D fCANAT+CQIgfbw2LhqORBICjVk9HoYKOSBxyYaKNI0RmdqYONz61iyk3fqXwgffqIZwS 8tJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=u7cI7G3trpUtnHCfqhJut3Gt91Xt99WAiwIJwAPsTAw=; b=H69uywMOhZcJ+TMdR8wDytA9OZn6yP6v2fSEDSGCoI7bpUsdxFptZ5kQ1Aw1hy7AC2 XAW1APsUQXCTzGvjnJmGgyaqRKNjX/VQlGJvyKi5Lom64KXLt5S8on6Ig6B4fZxbLO7V 21K6tXnxIyOta/2uuz0XlBqHTSOof7D57KDXty7FTFbBdqCuuBKRWWdvNZFmVQdcQYVF EwwMf/BivrhEuVkqCrILO/JxRce14PsYZHPCDpGdOAEn7lhwJsC9CbuSZxCkDQf4ICSH IxdmYbkO7lQgnBLgFvna3kTnPGyQLz7fiF5QPjdny6u/+iPi7p3GH4DVD2laE9+l8gmU L1Aw== X-Gm-Message-State: AOAM532nr2hoBKpVC9KwCfLyMfrPQ2KuAFcgZ8p+ZI2UArYa+m0T/U5x c06+ZI8Ika2YyENzyZTkKNa0YzJgtmjY3G/ah00= X-Received: by 2002:a17:907:968c:: with SMTP id hd12mr27722577ejc.639.1642672327429; Thu, 20 Jan 2022 01:52:07 -0800 (PST) MIME-Version: 1.0 References: <37998e515d561e762ee30d0ac4fca25a948e0c5c.1642494310.git.lhjeff911@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Thu, 20 Jan 2022 11:51:30 +0200 Message-ID: Subject: Re: [PATCH v6 1/2] spi: Add spi driver for Sunplus SP7021 To: =?UTF-8?B?TGggS3VvIOmDreWKm+ixqg==?= Cc: Li-hao Kuo , Philipp Zabel , Mark Brown , Rob Herring , linux-spi , devicetree , Linux Kernel Mailing List , =?UTF-8?B?V2VsbHMgTHUg5ZGC6Iqz6aiw?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 20, 2022 at 11:22 AM Lh Kuo =E9=83=AD=E5=8A=9B=E8=B1=AA wrote: ... > > > + if (xfer->tx_buf) > > > + dma_unmap_single(dev, xfer->tx_dma, xfer->len, DMA_TO= _DEVICE); > > > + if (xfer->rx_buf) > > > + dma_unmap_single(dev, xfer->rx_dma, xfer->len, > > > + DMA_FROM_DEVICE); > > > > Why can't you use SPI core DMA mapping code? > > I didn't find the SPI core DMA mapping code for single maping. > The method currently used is the general DMA single-map code usage method= . Why do you need single page mapping? What's wrong with SG mapping that SPI core provides? ... > > > + device_set_node(&ctlr->dev, pdev->dev.fwnode); > > > > Use dev_fwnode() in the second argument. > > You mean as below ? > > device_set_node(&ctlr->dev, dev_fwnode(dev)); Yes. --=20 With Best Regards, Andy Shevchenko