Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5000621imu; Tue, 29 Jan 2019 11:03:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN6ynVF7pmxCOdntKkr2HNAFb/mq0DISAANrQWp4wvtoRqlKVjbrT6wHa9lVjaFOM2JPTXOu X-Received: by 2002:a17:902:b48b:: with SMTP id y11mr26142013plr.200.1548788605264; Tue, 29 Jan 2019 11:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548788605; cv=none; d=google.com; s=arc-20160816; b=tulekNGztYAcroIH/N8xLf4jJ49J/KTn4n7/AIhFB00tvzOWnl6UY3NV7ocbBYqiTW 0RJVjU43wKmET8PBVLqcv13cIKufC60qyvQaofsx3UVPedSVmJDR/mFlFYBNdI7LcT18 Mb6nmzd6T2nMevnlO8n3LvpjQQ4LkNFRu5GNGLgTUTsqH5bNA4tf0N8RuyF65ScKkMB8 JWVsobRWR0QdeFrzY/L/AwWdV0Pnd6czmIkDEugJJD4eM2YHlP3FU5P/3ba+fYTAFbuh EnvdGsyughdCEzicWCULQG/d2m+lBWvtKAkkv5YY+cPtc1uGacqtCHLvCXHT6j1qXZ54 C3wA== 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; bh=JGbalnbWK1BdJsVh4SfasEI2KSz1Xmm2olQ96cpZjL4=; b=MpWqCX1g21I7poFFU0OcDg3y3wimGlsNuX/QLszXTOmXLOwTlEvnQPE5R27l4CRWPL TDaHFPdr7aSN+u1ZjSsE91EIRQCC8b143NuFZJVRkRyv66gl4IqOu/q2q7lfvB5IV0Cy KxMYV+KKdjgpaZjGexgzsrIUnZvKamPcMBCuF8G+irM3QdjvQ8Dt9iMKZojmQE5YoiNp NEPhSh7Zl+HllSI05P8bMu/DtFV3tH1zmEL5jdA5lslp435hXf6oyZCh9hjwXi21DFYF l8Q6ZbDHXrVqWZjx9Ti/OfYS8jcU2LM19HRxBiuRnQnpXuQHVn3WbBiMRAVIYesDJC9j zHvQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b27si36761459pgb.107.2019.01.29.11.03.08; Tue, 29 Jan 2019 11:03:25 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729349AbfA2TCv (ORCPT + 99 others); Tue, 29 Jan 2019 14:02:51 -0500 Received: from mail-ua1-f66.google.com ([209.85.222.66]:45206 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727071AbfA2TCu (ORCPT ); Tue, 29 Jan 2019 14:02:50 -0500 Received: by mail-ua1-f66.google.com with SMTP id e16so7205696uam.12; Tue, 29 Jan 2019 11:02:50 -0800 (PST) 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=JGbalnbWK1BdJsVh4SfasEI2KSz1Xmm2olQ96cpZjL4=; b=p9YabY/uvBO52zZPkzM/ZYIcZBHXbxx98ZI0AoKCI5IQh/4u3c22Ouu82j0iwyL0mJ gibxFYqjEv8u2LLd0fPvNzYqqI8ROLXuflezApa+JqibI1FEbTShBCtHsGVF6aPymxuj bWyduW1RQbz0PXzCUVhF+S/VTLL8go/NHRY5iKWGzPqRVMaB8hnBaG7MaDdwBwBSGTd0 znBSaUlcSm0z54q5zy4g5Mvn2PNV5AsrpuIxxTHvC9eotJEpjGuckcNcYpRRuYqD3N60 0v43Nrb+/2SDqWXp7zSbBiL+oLLhLOivXRzDBbDuRIJ/ycG3lPN2OP/VDRHav083XxBE GAFg== X-Gm-Message-State: AJcUukfD+hw3iknsnqkUlN8z9yVIVl91XpQLVJASBrJzi884eC74W/k1 OiQE1jMTSQKWv7H1g3gagF++zeXM9rHiz/5XSVk40Oxr X-Received: by 2002:ab0:7251:: with SMTP id d17mr11815650uap.0.1548788569395; Tue, 29 Jan 2019 11:02:49 -0800 (PST) MIME-Version: 1.0 References: <20190118140525.29189-1-geert+renesas@glider.be> <20190118230740.44239fcf@bbrezillon> In-Reply-To: <20190118230740.44239fcf@bbrezillon> From: Geert Uytterhoeven Date: Tue, 29 Jan 2019 20:02:37 +0100 Message-ID: Subject: Re: [PATCH v2 0/2] eeprom: at25: SPI transfer improvements To: Boris Brezillon Cc: Geert Uytterhoeven , Arnd Bergmann , Greg Kroah-Hartman , MTD Maling List , Nguyen An Hoan , Linux Kernel Mailing List , linux-spi 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 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. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds