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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 C4B50C47093 for ; Tue, 1 Jun 2021 10:16:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB4DA6139A for ; Tue, 1 Jun 2021 10:16:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230262AbhFAKSV (ORCPT ); Tue, 1 Jun 2021 06:18:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230170AbhFAKSV (ORCPT ); Tue, 1 Jun 2021 06:18:21 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34CEFC06174A for ; Tue, 1 Jun 2021 03:16:40 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id x38so20909367lfa.10 for ; Tue, 01 Jun 2021 03:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9JgJKLG77oA4fsPfmhV/22/+J8paV7JGFmptd3FIW44=; b=sl+L5T4gBDijTK/6PvXm02T1i8WN8JiAWYOScypKiijXgVP6N1crIeVt+wWGBXXFDH 3bj7Vv2phMrmsLD6ekzlzlzgtg2MgXSKL/DL63Y3EGZnDOsTqKgLIRO7b2umrlTw7std GWGZhhGmbTAdUS6Dv8FSjCuGB7AjPT0R9XNIoF13jT7jKHHc1epZX0edVkf0ldfOuGMo w0hFrTRebe8kTg5hCXmkUHuC/HgJQqiM6NB06D1hzudz1sJotMH4RxG6uEuf/CvkMs/+ oQe44XFiI/94UDn7W448kquuUxis6Cae4rc3z8SkQmHKh30VUpteVsP4C5Lh02HTEguu g3tQ== 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=9JgJKLG77oA4fsPfmhV/22/+J8paV7JGFmptd3FIW44=; b=tJ6Vj8i1ulQ+Juh8YlnUjLrrKCep9tk8oPBTRYkIefLhnGRdWHaSiCD+2DCk2HDhCZ tUX4Fz9WrLfiK0GXvgEkLuXLr27nWP2id5W0LID3cSRKeu4TFLmo2F1xP8cmQc0lB/D0 ctGUIsGyM4qR560SbvnfZrG0PyG8+jQaLNmgr/1fkBZWg6Km+tn32CCOhm51uZSe/6Sd cCKHaSo++IKkvV+eAwkE5GPBFS22v8O4G3YUzlzqUg4bxsxxK/JWloyEZOvT1zii3CAL KMNNm37LqyPW5JVnYJ086JXIXYZMwZVyMDaulrzR7MDGXUemRsK7Mmz8iFTJvTbjhoMm ZG+A== X-Gm-Message-State: AOAM53137Yoom9tF+gEtWMoIKU2F+YTSO7UDAGapSkw0lJMUzYH6Mg4S DZ0aOpJe6BBPH9w0LxObVGdEuRl6RDNNtMPlCZ10yQ== X-Google-Smtp-Source: ABdhPJy/xrCcERW+957lXcvVNGT5zyGBGdADRSZbatHeuqcKcxbF4gcIYsCn4wfFQ5npF9r30qUpQIoF7hiIHQTgIxE= X-Received: by 2002:a19:5503:: with SMTP id n3mr9973147lfe.649.1622542598494; Tue, 01 Jun 2021 03:16:38 -0700 (PDT) MIME-Version: 1.0 References: <20210527005455.25758-1-steven_lee@aspeedtech.com> <20210527005455.25758-2-steven_lee@aspeedtech.com> <20210528040934.GA28403@aspeedtech.com> <20210531052318.GA3973@aspeedtech.com> In-Reply-To: <20210531052318.GA3973@aspeedtech.com> From: Linus Walleij Date: Tue, 1 Jun 2021 12:16:27 +0200 Message-ID: Subject: Re: [PATCH v2 1/4] dt-bindings: aspeed-sgpio: Convert txt bindings to yaml. To: Steven Lee Cc: Rob Herring , Bartosz Golaszewski , Joel Stanley , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , Hongwei Zhang , Ryan Chen , Billy Tsai Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Mon, May 31, 2021 at 7:23 AM Steven Lee wrote: > The parameter max-ngpios is the maxmum number of gpio pins that SoC supported, > ngpios is the maximum number of gpio pins that sgpio devices(e.g. sgpio cards) supported. When you put it like that you really make it sound like you already know, just looking at the compatible string, what max-ngpios is? I.e. do you know for these three: aspeed,ast2400-sgpiom aspeed,ast2500-sgpiom aspeed,ast2600-sgpiom the unique number of slots for each? A 1-to-1 correspondance? Then just add code to set this value from looking at the compatible in the driver. You can write some text in description in these bindings about how many slots each SoC has but there is no need to add any extra parameter if you already know this from the SoC. Yours, Linus Walleij 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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 15186C4708F for ; Tue, 1 Jun 2021 10:18:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0E5B60FD8 for ; Tue, 1 Jun 2021 10:18:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0E5B60FD8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U9M/AtsIJndHCHkV/4LlUQoLJr55uQclZ4UrMveFF/M=; b=cEUIwaUmMGPk/i Sn9XL3e0d9UuYcrmbYy/+YtBxn9Cro0rbB3FL1VuBZ6Wa8ou7wX6OfsCABGTpvRXeli6WsWI25BrE ev/9x5eAV8W7m8NY3I7dL3vnfR8JYw8/4SiKedwWQi323kmG0IOJdf6pUtnsI1UUbFJJb1wIPOH9i vBeZjqy1IUdB9jBzhif/ySwQcd77srwFU2gd+/Z1Zqg/ubdOCM5gBDncaTmaKMBFNdTVcd+L6MzWQ qVusqNPTwBf50PPGSf1CPG9QFhG1UxeZBRuVMgxrCTobWLPmhYbjNYJ7TnAjDlK3PDZw0/EMau5Xt q/vNCy333hhgSvy5tqSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo1SD-00FppK-IQ; Tue, 01 Jun 2021 10:16:57 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo1Rw-00FpY9-FB for linux-arm-kernel@lists.infradead.org; Tue, 01 Jun 2021 10:16:42 +0000 Received: by mail-lf1-x135.google.com with SMTP id q7so20949083lfr.6 for ; Tue, 01 Jun 2021 03:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9JgJKLG77oA4fsPfmhV/22/+J8paV7JGFmptd3FIW44=; b=sl+L5T4gBDijTK/6PvXm02T1i8WN8JiAWYOScypKiijXgVP6N1crIeVt+wWGBXXFDH 3bj7Vv2phMrmsLD6ekzlzlzgtg2MgXSKL/DL63Y3EGZnDOsTqKgLIRO7b2umrlTw7std GWGZhhGmbTAdUS6Dv8FSjCuGB7AjPT0R9XNIoF13jT7jKHHc1epZX0edVkf0ldfOuGMo w0hFrTRebe8kTg5hCXmkUHuC/HgJQqiM6NB06D1hzudz1sJotMH4RxG6uEuf/CvkMs/+ oQe44XFiI/94UDn7W448kquuUxis6Cae4rc3z8SkQmHKh30VUpteVsP4C5Lh02HTEguu g3tQ== 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=9JgJKLG77oA4fsPfmhV/22/+J8paV7JGFmptd3FIW44=; b=QCSmBW9bVkVodHtYErkEUmdTV+kIiR/j/kcWOYXOyAnQGY60ALPiu90AUB82dKy909 ab8WqbKr4gEs+wyhjajSQ9MJLJsY1talGsa+NQTDeDruVfz8viyTL64gTjfOQPDaXt7x Nce8M93lG8T1FUm1jAarq73//5HUQXkOKn6jYuG+4OBV5lMGz/qZ4PBDmEkht3tMje9C +evfwcD750pCMLWiQaADy5jlb1CJ/zQ4WmiAyEu/tQ2wm/1aSkd+GdYQpqO0bZv/bS4q FpV0IlYHzt7BuTkO21nt6jC1Ke94jFGyAhKHZeJnKTyGuKeXI+4DgiVIoSpRtRZt0gTG DV/w== X-Gm-Message-State: AOAM530xD7ZoaCzAJF5Irf4jS4NcsIOjqxUMBBri99yN5IpunZ1u97cl pziIIsBniP1+KWJ0FybBL7dQ9w0/9ZtWzUdtIQhPTQ== X-Google-Smtp-Source: ABdhPJy/xrCcERW+957lXcvVNGT5zyGBGdADRSZbatHeuqcKcxbF4gcIYsCn4wfFQ5npF9r30qUpQIoF7hiIHQTgIxE= X-Received: by 2002:a19:5503:: with SMTP id n3mr9973147lfe.649.1622542598494; Tue, 01 Jun 2021 03:16:38 -0700 (PDT) MIME-Version: 1.0 References: <20210527005455.25758-1-steven_lee@aspeedtech.com> <20210527005455.25758-2-steven_lee@aspeedtech.com> <20210528040934.GA28403@aspeedtech.com> <20210531052318.GA3973@aspeedtech.com> In-Reply-To: <20210531052318.GA3973@aspeedtech.com> From: Linus Walleij Date: Tue, 1 Jun 2021 12:16:27 +0200 Message-ID: Subject: Re: [PATCH v2 1/4] dt-bindings: aspeed-sgpio: Convert txt bindings to yaml. To: Steven Lee Cc: Rob Herring , Bartosz Golaszewski , Joel Stanley , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , Hongwei Zhang , Ryan Chen , Billy Tsai X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210601_031640_596606_5C3D4142 X-CRM114-Status: GOOD ( 12.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 31, 2021 at 7:23 AM Steven Lee wrote: > The parameter max-ngpios is the maxmum number of gpio pins that SoC supported, > ngpios is the maximum number of gpio pins that sgpio devices(e.g. sgpio cards) supported. When you put it like that you really make it sound like you already know, just looking at the compatible string, what max-ngpios is? I.e. do you know for these three: aspeed,ast2400-sgpiom aspeed,ast2500-sgpiom aspeed,ast2600-sgpiom the unique number of slots for each? A 1-to-1 correspondance? Then just add code to set this value from looking at the compatible in the driver. You can write some text in description in these bindings about how many slots each SoC has but there is no need to add any extra parameter if you already know this from the SoC. Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel