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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3145C19F2B for ; Thu, 4 Aug 2022 11:31:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233316AbiHDLbl (ORCPT ); Thu, 4 Aug 2022 07:31:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237567AbiHDLbk (ORCPT ); Thu, 4 Aug 2022 07:31:40 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90BA9357DF for ; Thu, 4 Aug 2022 04:31:38 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id z4so7159313ljn.8 for ; Thu, 04 Aug 2022 04:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=6FA3ZfEeBAC9Kp15wqTU0k5tZ0dhaTTUmtqbwpsyYTY=; b=RotSEOoQTObCi0Yo4Rk2W1EXU5o1KIIBkVg4ckpcWxwE1mIYKZWNo1qH7vuL6Hb0Lz yq0rkhznpi9/8km3g3h7y956DhTFWCB6W/1MB1GJhRITv666gVAZtFN5FFpmXriJj12i a9e8u8ntItsOgNRnNgNJq932KPxwL4My2QGn7dcYzTmnZYQ6m0fgnWRR16vidbbH2JJt gvLq18qKywsk4wVMG6jygCQHM6bQRLrNLJ63ch4gJr4T4J8nUq881YNb6zkuii4Oz1Ws nyWDolJkafj8RGzGy1UJnCPm/unjBRTNd7cxx1oLGj/KuZmYhCUuLiElb/5QOFth9Kt6 v1KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=6FA3ZfEeBAC9Kp15wqTU0k5tZ0dhaTTUmtqbwpsyYTY=; b=nBbuZlS5N3PBfxlXRWUEwhTfTsLgqXINgnHQA+hwEOSSQ9bsijFzEgFxShgBnDSQtV 7rUY0xBeiMEk/rYgUFU47t4htekTtAHYOXPqi2/+8baejX+TSL4tgTIHyFQnc1GIqf0/ nIbuah8NhAmeBERcl2dNcgBE5N8jHFCIxPOp7aCTI788QK33n6ngIjYflYVqX1sbLVW7 qUmuYzaFi4GqjNy7CXKT31gahj5GTXEzNDQFxMHYnOaGb1Ch0NWey4FrixJJmaoCZ1+i iOVlTQRtJsoh24fMz2xkEPH8lP1v/JqjRBNJbzdjII0PpWpK0XzEqcg6A01Sz5cRJZP8 XRhA== X-Gm-Message-State: ACgBeo0/mpNg5a56/mQyfvgm/nb+aS3XieKPhQMYVp6VjNmylIVOy9iV hzS33Z2PhQ6Y3XKyD5uq/AVXNA== X-Google-Smtp-Source: AA6agR6qGtsHgJ27BPzUx/ISEKRhgxZ20jwAk8krk4pAMSe22eoioT7tH9INbpYDZ3Bx8ZME5cJmdA== X-Received: by 2002:a2e:804e:0:b0:25e:7231:c304 with SMTP id p14-20020a2e804e000000b0025e7231c304mr445863ljg.257.1659612696954; Thu, 04 Aug 2022 04:31:36 -0700 (PDT) Received: from [192.168.1.6] ([77.222.167.48]) by smtp.gmail.com with ESMTPSA id a17-20020a05651c031100b0025dd5b3fabesm87543ljp.102.2022.08.04.04.31.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Aug 2022 04:31:36 -0700 (PDT) Message-ID: Date: Thu, 4 Aug 2022 13:31:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 1/2] spi: dt-binding: add Microchip CoreQSPI compatible Content-Language: en-US To: Mark Brown Cc: Naga Sureshkumar Relli , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor.dooley@microchip.com, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220801094255.664548-1-nagasuresh.relli@microchip.com> <20220801094255.664548-2-nagasuresh.relli@microchip.com> <6d36b192-9e63-ec13-5583-22b81c99c18b@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On 03/08/2022 15:29, Mark Brown wrote: > On Wed, Aug 03, 2022 at 08:11:03AM +0200, Krzysztof Kozlowski wrote: >> On 02/08/2022 15:13, Mark Brown wrote: >>> On Tue, Aug 02, 2022 at 10:52:25AM +0200, Krzysztof Kozlowski wrote: >>>> On 01/08/2022 11:42, Naga Sureshkumar Relli wrote: > >>>>> + oneOf: >>>>> + - description: Microchip's Polarfire SoC SPI controller. >>>>> + const: microchip,mpfs-spi >>>>> + - description: Microchip's Polarfire SoC QSPI controller. > >>>> Useless descriptions - they repeat compatible. Just keep it as enum and >>>> skip descriptions. What value do they bring? > >>> Someone not familiar with the full Microchip product line might not be >>> aware of the expansion of mpfs, it's not blindingly obvious. > >> Then it should be explained in title/description of the binding, not in >> compatible. This is the usual way of providing some text description, >> not for each compatible by repeating the compatible text. > > I'm not convinced this is a useful rule to try to enforce, and I'm not > sure how well it will work if the same IP is used in several different > places. It's not clear to me what the benefit is intended to be. First, the description here is really not adding any useful information. "description: Microchip's Polarfire SoC SPI controller." Microchip - already in comaptible SPI controller - already in compatible and in device description The only useful piece could be extending pfs to Polarfire SoC. And now imagine every binding doing the same, adding such acronym-explanations in every compatible list. Basically we loose easy to read, compare, analyze and check for errors enum: enum - microchip,mpfs-spi - microchip,mpfs-qspi - microchip,coreqspi-rtl-v2 - microchip,mpfs-some-more-spi - microchip,mpfs-even-newer-spi into double-sized oneOf with additional descriptions each one explaining "mpfs". oneOf: - description: Microchip's Polarfire SoC SPI controller. const: microchip,mpfs-spi - description: Microchip's Polarfire SoC QSPI controller. const: microchip,mpfs-qspi - description: Microchip's FPGA QSPI controller. const: microchip,coreqspi-rtl-v2 - description: Microchip's Polarfire SoC some-more SPI controller. const: microchip,mpfs-some-more-spi - description: Microchip's Polarfire SoC even newer SPI controller. const: microchip,mpfs-even-newer-spi Why do you need to explain "mpfs" more than once? Why explaining these are SPI or QSPI controllers? It's obvious from compatible. Just keep it simple and small. We all have too much code to look at... Best regards, Krzysztof