Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1419194imu; Sat, 26 Jan 2019 02:26:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN6hmyy8nXf3ZiuCA11vMlmG0HplOS3QpGxDWx/dToPf5rTwucGGILfOppLZsxuqlCDiPu8m X-Received: by 2002:a63:82c6:: with SMTP id w189mr13220361pgd.344.1548498372140; Sat, 26 Jan 2019 02:26:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548498372; cv=none; d=google.com; s=arc-20160816; b=s5gEnOtIwM91h+YfE2Wo/u/Fnp4Gy0+k6I8ODWofE7u0x0OGATsSKu4dru/gWf8Gah I4IkvelmhIbpUSRJ0tWB3JAW8ZfO4xLxGRp6WguCLStnSp8fy6KuNIcbIxtyqeTLGaTO OQ/h5H1tZosHzXQc+qqWnJ9n+TY9YEhYcx1ZxAkufw1RffgE55l8TjyF4LtuZfO6t1qV gpNXBxoMYl6Gvd/sMHPhfyJCDLrG7aBrDgc0HC7r54dC15zkQWlTMIsctTL/HYCYGdhu GNMRRnSxogYsrekQwGdFVd3yhm4jb2ZqlZHYlPisiGzeKd0Qvwm93CmATIQY7ih7lZni Uz7g== 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=hXFk2P3Vse2UsQPQiWrGQq6Z73B1APMdhn/Ravn5Ong=; b=ItS6MBLNn73IUS5r9cr8erGVt9No0rfJaZJCdTy3xOZZwj1Ss3l8ZPiQww6JgVfGRS LWPH1dRpAoluEjqA+RpAPJnhPDpUOEUEzBlNjrS+OQ9rgazzgakFtFy15tUwOVAJ3Zx4 x2m4KKlbBil77eKdJCIXgJJtBtnCWip1yupbX3687Lez6SZuDpU0J+FWz6DnKS2bbRbO vwZbi8AMjxFmQYAXC2TFaAx9HQTs41V+XO969BgDhO01D+c46gUT9c8P5jkl/W6m8deh x/jUuLQYE4Iq3XpQ8DKAyfyfm9j7hFVNvrjzKFYnWPkMRs6gdyG33dkGU4qI9p1KRXtD qWeg== 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 t10si28389960plh.307.2019.01.26.02.25.56; Sat, 26 Jan 2019 02:26:12 -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 S1727662AbfAZKZs (ORCPT + 99 others); Sat, 26 Jan 2019 05:25:48 -0500 Received: from mail-vs1-f67.google.com ([209.85.217.67]:38434 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbfAZKZs (ORCPT ); Sat, 26 Jan 2019 05:25:48 -0500 Received: by mail-vs1-f67.google.com with SMTP id x64so7173384vsa.5; Sat, 26 Jan 2019 02:25:47 -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=hXFk2P3Vse2UsQPQiWrGQq6Z73B1APMdhn/Ravn5Ong=; b=aPOF54xOSwo7OV8taGvyq8tLlpe88AfQjXS+tfpyC4WxqM308KUUHLHw4zWNVsrzhH ZsqSJ1ez9dKDOwoNyQWhTRpycj4APHHafrmteWQ3CnzJTQujojIgRyBBnfG9zP1yMWXC kXL/o/0H4JuzBuAVqZfs1HOyoTSnYkVNL/RHcYo07LfTyiv8Z7nR9YqR+wdKQL9mchEc p4PH9nDkueEFMDq6/eU96XB6DMsIjkG0d/MB2suy/v8P6vdWLohsle+EaJjmoj2n0h0n xNtL6kmhVCugmUrYStV2yiy6R1BKc5Yzis+YQaqhPx7QGZEBfM/ZZsaY4EzZJJh2AUhx sojw== X-Gm-Message-State: AJcUukf8litZwrxJv3kDYJCzs64ma3GGuuTDM0nf1Das0gIbD7MrVqWy 4ZlzPHk7EaSBueJuIZAxCEuEbFtlgnlD2or2gz8= X-Received: by 2002:a67:d119:: with SMTP id u25mr5540086vsi.63.1548498346735; Sat, 26 Jan 2019 02:25:46 -0800 (PST) MIME-Version: 1.0 References: <20190125114429.20066-1-jonas@norrbonn.se> <20190125114429.20066-2-jonas@norrbonn.se> <20190125174713.GA6939@sirena.org.uk> <20190125175031.GA25898@sirena.org.uk> <84d6c40f-62bb-fd00-0dcb-d2f390b136c1@norrbonn.se> In-Reply-To: <84d6c40f-62bb-fd00-0dcb-d2f390b136c1@norrbonn.se> From: Geert Uytterhoeven Date: Sat, 26 Jan 2019 11:25:34 +0100 Message-ID: Subject: Re: [PATCH 1/2] spi: support inter-word delay requirement for devices To: Jonas Bonn Cc: Mark Brown , Baolin Wang , LKML , linux-spi , Rob Herring , Mark Rutland , DTML 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 Jonas, On Sat, Jan 26, 2019 at 8:53 AM Jonas Bonn wrote: > On 25/01/2019 18:50, Mark Brown wrote: > > On Fri, Jan 25, 2019 at 05:47:13PM +0000, Mark Brown wrote: > >> On Fri, Jan 25, 2019 at 01:06:45PM +0100, Jonas Bonn wrote: > >>> Having this as device property rather than a transfer property allows this > >>> to be configured one time in setup() rather than having to fiddle with the > >>> configuration register for every transfer. > > > >> That doesn't mean that the coniguration should be done in DT though, and > >> given that this presumably is a property of the device there seems to be > >> no reason why we'd have it in DT - if every instance of the device is > >> going to need to set the property we should just figure it out from the > >> compatble string instead. > > > > To be clear here: the suggestion is to add a parameter the slave device > > can set in spi_device which sets the default word_delay similarly to how > > max_speed_hz works. > > I'm confused... isn't that exactly what this patch does? It adds a > field word_delay to spi_device in the same manner as max_speed_hz. > > I also added the ability to set it via DT, which I can break out into a > separate patch if that's an issue. Or is the problem that it's set via > DT, at all? Documentation/devicetree/bindings/spi-bus.txt documents 10 > other slave-node properties related to transfer characteristics; > word_delay is just another such characteristic. > > But again, I'm having trouble parsing your response Is the patch wrong, > should be broken up, or you just misunderstood it? IIUIC, Mark means that it may be a non-configurable property of the slave device, and thus should be handled (fixed setting) in the SPI slave driver. Compare this to CPHA/CPOL, which are properties of the SPI slave device, but which may be configurable. E.g. many SPI FLASHes support multiple configurations. See e.g. commit 9c5becce21af35e5 ("ARM: shmobile: koelsch: Fix QSPI mode of SPI-Flash into mode3"). Again, max_speed_hz is something different: while both the SPI master and slave may support high speeds, board wiring (capacitance/inductance) may need to force a slower speed than supported by the devices, so it makes sense to make that configurable from DT. 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