Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1067682imu; Wed, 23 Jan 2019 10:11:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN4GL9YqyuI/c3z92hJSNf+8EpxVA5bS2mgoE+ZP+Iwro1Z9r0GnTM3+bK/qfWxsqm6B2iRr X-Received: by 2002:a17:902:f44:: with SMTP id 62mr3279491ply.38.1548267116974; Wed, 23 Jan 2019 10:11:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548267116; cv=none; d=google.com; s=arc-20160816; b=VZbr51dKNBU0BpwtPxyGjEnkQG7gHun5e5B+K6x5gGdvXJCbsJpazFDh+sArbY7bNF TMem4RVE+7BrgHRn7lrnA5NEiERnRLVoyGhUBV3lTmZFdIAIj2EiAYyQFHBaX8MEGKVl RtMFhkCVfAFV69YzykgnomqmtpYaEk1fQBh5VYD4H10DMC63Amm40RNl4XFMQ6mDFGF5 quP12RuuL6EuCbdoBHlVUJHGDOshWTcChRzZppMwHbAKEOYB//XcZo1SPHVbI2Q+VdiL xNN5j8+88nyewOFaOLk2dlCfndR6Eh9/Xu1thmeF7BViF8xizTIclkKkqW3jB8H82HJz Ed3A== 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=Lar/7CirLLuwgN7QjrkipPVg9UnJ8H/ir6GU33xHxvc=; b=QzBEvuvSq/n/KN/OxsOYtO5n9893MVef4lALYxXNQ3gcAvkysqCFwXWAcExV75n1rB eMgy2hJpG+5QwLECTvWjXr+c7VYKoSOkF1DuVNFvCd2glIDe5Yww99ggvpY/I63wt1JM lffjvK454m/2lHFNtF4UDkEcrIf0LXVMuCmbZnk207AgGfgBLy7H+l+y1uIgTFgf7mxU +1Q5rRuyXHro5PBt4LTfIQbQhFjevbaiv4x3uLQ4aXsl40l1WRyi5wJLmNGMPlYH0JmE /NtDey35oNHdnV4vFAiWdjKaoT49TIO9RULkRgwZOwh9Jjs0U4/aOJhedwL5aCErsVBz pIFQ== 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 v11si19439502plp.85.2019.01.23.10.11.41; Wed, 23 Jan 2019 10:11:56 -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 S1726197AbfAWSLK (ORCPT + 99 others); Wed, 23 Jan 2019 13:11:10 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:44641 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725996AbfAWSLK (ORCPT ); Wed, 23 Jan 2019 13:11:10 -0500 Received: by mail-vs1-f66.google.com with SMTP id u11so1852407vsp.11; Wed, 23 Jan 2019 10:11:09 -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=Lar/7CirLLuwgN7QjrkipPVg9UnJ8H/ir6GU33xHxvc=; b=LJKJYHEdMi/ChlSo8PUD4F6tt57D+lZ5Fm6QiaXuvlC6Mti9i63yKyvYL3hma638yS PFwd2YyFCeaCG56ccAtOmIOc95bS+LxOacJd1u5GpLCF7HeCCweeMbqrECpDVglJf8IN 0Gmzb2dVDV3j+LsjB6K44zBLMGdeVSakEhxUwCzGwqp73nCyRqsw67wwaYs86Oapf3z5 pndQiELaoHbL7aEkoRDicWVGAcvcJSjJKvQB3Nw3kPh+50hHSYlphvnnk//x8toZb+gz PK0af6RbOjfEtBOvwqmRYQeC6bR5vYHUQF3yaUVEiyL+BrREsAe54ArmolvnY10p4lpW e/yQ== X-Gm-Message-State: AJcUukfXUVhy62T6DQcDRNceKGj+ViKiub/R9yW9QTZcaiziW2ABKvCh XU1kc3BUXCm8BJB+ORDBfXp6XVSfRKu1JlI0oMJWmw== X-Received: by 2002:a67:c202:: with SMTP id i2mr1277005vsj.11.1548267069275; Wed, 23 Jan 2019 10:11:09 -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: Wed, 23 Jan 2019 19:10:56 +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: > On Fri, 18 Jan 2019 15:05:23 +0100 > Geert Uytterhoeven wrote: > > This patch series contains two improvements for the AT25 SPI EEPROM > > driver, related to SPI transfers. > > > > Changes compared to v1: > > - Merge "off" and "offset" into a single variable instead of just > > killing the cast, as suggested by Arnd, > > - Add Acked-by, > > - Dropped "[PATCH 3/3] eeprom: at25: Split writes in two SPI transfers > > to optimize DMA", as this is better implemented in the SPI > > controller driver (cfr. e.g. "[v2 PATCH 2/2] spi: sh-msiof: Use DMA > > if possible", > > https://lore.kernel.org/linux-renesas-soc/1547803771-9564-2-git-send-email-na-hoan@jinso.co.jp/) > > > > Tested on a Renesas Ebisu development board with R-Car E3 using MSIOF > > and a 25LC040 EEPROM. > > 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. No, I hadn't considered doing that ;-) > 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, will give it a try, eventually... 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