Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6000982imu; Wed, 30 Jan 2019 07:11:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN7LIOt8DGssYxiD/mYVISwOOEkaYXppdlkIybSU7Ar7yUEahzWZX23yuPXYwFjOKE8c1DE7 X-Received: by 2002:a62:f54f:: with SMTP id n76mr30956891pfh.59.1548861061363; Wed, 30 Jan 2019 07:11:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548861061; cv=none; d=google.com; s=arc-20160816; b=cn3S6qN9apWVhZGdJFq5KPr4DCC6AvaSDjSiDpYoHASDBuHJKIE2dQXUlRAGscwlGK GSXSXJKJiIF9sXmeI+IbH/yISIVmM1zBmsHbAnW02edrFdfpO9LOCWBEAmDXsl4118bV 25Jepq5Tv/UAwNxS8ZYIL1MQDl+6ZJCfyk1w6ePUoILaqq9IVhIKdOJgiI9vbSkG7dc8 OqxAO9cHMdIefPa3Yva+0AKQ4W6hw5WbwIIf6ucEBfkcboIhiCvxnk8T9FhMccYVM3BB 4uNb0Iun5WsE+Q8QfFIUEpIAKJBwgYLPDq16mpshD965fvev8okUcgewoOuV+364llXI Lt+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=+ymVkIi1kFXl1akoIBleph03iwjyp0vGLjBIaxg0lHY=; b=DIvGm1AjXV/pspq1nTZ4U5gF6PdZzIs7B8qoAflCoVZag7fskMo2Xy0PWomWRYBNhb AqtWZqD7kUQYpxEW2EhCtzXxyr7EGUlrlKhlPtSKFra8oGynXQOLWNoHY1jBnO3pRvFa 4l6IM5aco3059vJn7tV/dAY9J+6xReKez4ZmVBDAl3K1nQZdKiug4u+lbITLclHD2cOT UOEGF8QEoVvnwdLXdQwmN3RXdQPP6R6IVKvkEFI5NsjyA2dLcJiXaX2SFJDeKHoVl/5M /0kg09iMwo1eDYB6KJTJXfj4vvs/3DgkDVHlx6LkOMzvi/B8ZAOPcJSenQHRgRm5bclI 3iUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zJa+P08V; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w185si1791992pfw.122.2019.01.30.07.10.43; Wed, 30 Jan 2019 07:11:01 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b=zJa+P08V; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731615AbfA3PIw (ORCPT + 99 others); Wed, 30 Jan 2019 10:08:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:55760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731596AbfA3PIu (ORCPT ); Wed, 30 Jan 2019 10:08:50 -0500 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2A6F720989; Wed, 30 Jan 2019 15:08:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548860929; bh=7tSXuv1G3q0TZTT11mY3TM9600zhP/Lt29G6XlH6Kvg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=zJa+P08V6zahu54Z+HGd75lTdIj/T+74SYRgRGPlnEWi6yJXfEbdzChLO00T4VR5j GrnCi/uWar3GTTSFFbEhKAOKmjZ1mxcmpjzcVOobcDZJZztW9eWlzzw+sloSxNCZj6 Y9U/CZj6ahHYenu5hXpbzPDKnnWTWHEQUnkIsdtw= Date: Wed, 30 Jan 2019 16:08:39 +0100 From: Boris Brezillon To: Greg Kroah-Hartman Cc: Geert Uytterhoeven , Geert Uytterhoeven , Arnd Bergmann , MTD Maling List , Nguyen An Hoan , Linux Kernel Mailing List , linux-spi Subject: Re: [PATCH v2 0/2] eeprom: at25: SPI transfer improvements Message-ID: <20190130160839.55f99e63@bbrezillon> In-Reply-To: <20190130145054.GA990@kroah.com> References: <20190118140525.29189-1-geert+renesas@glider.be> <20190118230740.44239fcf@bbrezillon> <20190130145054.GA990@kroah.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On Wed, 30 Jan 2019 15:50:54 +0100 Greg Kroah-Hartman wrote: > On Tue, Jan 29, 2019 at 08:02:37PM +0100, Geert Uytterhoeven wrote: > > Hi Boris, > > > > On Fri, Jan 18, 2019 at 11:07 PM Boris Brezillon wrote: > > > Did you consider converting this driver to spimem? Looks like the > > > protocol used to communicate with the memory resembles the one used on > > > SPI NANDs/NORs and fits pretty well in the spi_mem_op representation. > > > > > > By doing this conversion you'd allow people to connect an AT25 EEPROM > > > to an advanced SPI controller that does not support regular SPI > > > transfers and you wouldn't have to forge SPI messages manually. > > > > > > Here is a patch (only compile tested) doing that. The diffstat is not in > > > favor of this conversion, but I find the resulting code cleaner and more > > > future proof. > > > > Thanks, seems to work fine, with the 512-byte 25LC040 I have! > > > > Tested-by: Geert Uytterhoeven > > > > I did notice that the first two-byte transfer (command+offset) of each > > message is now split in two one-byte transfers, though. > > Ok, I'll drop this patch series and wait for the updated version to be > sent out :) I'd like to further simplify the patch by using the recently introduced devm_spi_mem_dirmap_create() function (queued to Mark's spi/for-5.1 branch), which means I'll have to wait v5.1-rc1 before sending a new version. I'll let you decide if it's worth applying Geert's patches in the meantime. Regards, Boris