From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F2F0C433E1 for ; Mon, 6 Jul 2020 15:33:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 451DB20720 for ; Mon, 6 Jul 2020 15:33:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729422AbgGFPdE (ORCPT ); Mon, 6 Jul 2020 11:33:04 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:34877 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729307AbgGFPdE (ORCPT ); Mon, 6 Jul 2020 11:33:04 -0400 Received: by mail-oi1-f194.google.com with SMTP id k4so32309774oik.2; Mon, 06 Jul 2020 08:33:03 -0700 (PDT) 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=z8U0WbtD7YYbhflGPUz8Z1TbfGsbY1TA8GO2xlWQBVk=; b=f3Y/STFHkZW2E67m5Us055orKNEt67RpoDrCht8jZR+P3CK6n7cvMty/xt2YbKQWcE olVYehsfFsdy2BUxbU7cCVgM4n+1JkTxPEzLZE+29GgX4kBKk3Xqxv34v9fwq7VMt/Ym Xllzw9L4WPkrCmy3j7+e3cceSbXClvWQJWR1mwM2TK39hRnnnxvOzd0W0XxVMdhWgwBU sKEIun34FsO1Lvp+6FU0q6VvELWX4nCJpLGkZgc1+76WiG7gmqj5u/Yj/XVAJzZDm6gC 4VuWi9DB+E6AOrTKhScArctaBrUHc3ZhXAj5ABLtsSKEy+aMxG8bcAbez5xviK+uZvgI 73wQ== X-Gm-Message-State: AOAM531QCiY8NE16Bu2tt9vq/ACbb12/Jj+oZjYSqDGABX+/IXfAU5Tb K/xqKQFyWhjq+88Ot8yYub2YhmDxBSZqjci46CE= X-Google-Smtp-Source: ABdhPJxqsVIdoIx7YyiL4cE+REpRjEhCzWl+LWRTxxQHIUZOK+rtUBpXclRghl5nrdwjzg8JklDUzk+bzJKGwQPNXmo= X-Received: by 2002:aca:5c41:: with SMTP id q62mr3762637oib.148.1594049583089; Mon, 06 Jul 2020 08:33:03 -0700 (PDT) MIME-Version: 1.0 References: <202007040833.xIqR5rAw%lkp@intel.com> <20200706092247.20740-1-adrian.fiergolski@fastree3d.com> <20200706092247.20740-2-adrian.fiergolski@fastree3d.com> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 6 Jul 2020 17:32:51 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] dt-bindings: Add documentation for SPI daisy chain driver. To: Adrian Fiergolski Cc: Lukas Wunner , Mark Brown , Rob Herring , linux-spi , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List 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 Adrian, On Mon, Jul 6, 2020 at 5:19 PM Adrian Fiergolski wrote: > On 06.07.2020 17:10, Geert Uytterhoeven wrote: > > On Mon, Jul 6, 2020 at 11:23 AM Adrian Fiergolski > > wrote: > >> Add documentation for SPI daisy chain driver. > >> > >> Signed-off-by: Adrian Fiergolski > > Thanks for your patch! > > > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/spi/spi-daisy_chain.txt > >> @@ -0,0 +1,56 @@ > >> +spi-daisy_chain : The driver handling SPI daisy chains. > >> +----------------------------------------------------------- > >> + > >> +Required properties: > >> +- compatible : Should be "spi,daisy_chain" > >> +- reg : Chip select assigned to the chain > >> + > >> + For the SPI devices on a common SPI chain - nodes of daisy_chain): > >> +- spi-daisy-chain-len : Length (in bytes) of the SPI transfer, > >> + when the SPI device is part of a device chain. > >> +- spi-daisy-chain-noop : Byte string of no-operation command which should > >> + be send when device is not addressed during the > >> + given SPI transfer > > The above two properties are device-specific, and the same for all > > devices of the same type, thus leading to duplication. > > Hence I think this should not be specified in DT, but instead handled > > by the driver. I.e. for Linux, you would retrieve this from struct > > spi_device, as filled in by the slave driver. > The problem is that then this patch would not be compatible out of the > box with all SPI devices (as it's now) and would require rewrite (adding > this extra information in the spi_driver struct) of all SPI drivers > which support daisy chain. That's correct. However, that information would need to be added to each driver only once. With your proposal, it has to be added to all affected nodes of all DTSes of all users. 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