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=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 518C1C2BBCD for ; Mon, 14 Dec 2020 09:18:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E05722AED for ; Mon, 14 Dec 2020 09:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439706AbgLNJSI (ORCPT ); Mon, 14 Dec 2020 04:18:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439687AbgLNJSF (ORCPT ); Mon, 14 Dec 2020 04:18:05 -0500 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A409C0613D3 for ; Mon, 14 Dec 2020 01:17:25 -0800 (PST) Received: by mail-lf1-x141.google.com with SMTP id r24so28315104lfm.8 for ; Mon, 14 Dec 2020 01:17:25 -0800 (PST) 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=65hNEP/Zbo/41eInJTb1Gnu1ewevqq7m2f/maoMTQwI=; b=Fq10SaFA/GxYpnZsD4Kf1rGdUVRe8oUsqVizqfxleuCRlIDD0wmj/tlvT84+16/27D 1shmKZ1BgDnzQmb2npZ1N/U41jVAF7SoWmrD04d6qYIkPQ5CiK34vL3bP0t0G2Lq1iQA x2askaweOGj2mu01Z/vag9Q7zKZRz4yUlSVllbLiNAD1GE8UitSam1S5abRLUM8/OrvT PtVq9YYiV6TreiGa9z8uAJ5lCNk6a8J3HeBsS5Bsk4EYbHAtQKQofj/TBhXzGu7mgskp L4eCUDxOBcLMVG5shJxr/YBNQRQk/dot2uPtPRF84afNpU1hY4sYYX6wmNF2u7yA4FVw JQ/Q== 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=65hNEP/Zbo/41eInJTb1Gnu1ewevqq7m2f/maoMTQwI=; b=KzjgywX2HjIFiOfbbyhfRGZwXKi3XVSsVR2OvmQdNYoolbpkorqGX5DV3HpZgG0oQc +47cNCtt+fTTJRJcNgGCTJEh+Q27k32OZs5F+POSE6h6Z500MDeIQ17V4XTHex27HWGM b602UEB8NwzmKL7M61mpeTtkBTnVAqRyJXqjY45np5JI3c2zYkQ7gxmJrBSSe4wLCnuW 0SigVqDXxxbwiAyHQKRo8Yl9wz1gEvIz94pyYpV4DPPuKtyaGGbG1PCTj2tGh3mDEsz5 e4ExOzRtVoEvGd5y6QC19e2HEB4uRIyXld775RTEGXpPC+ZdTWVH2jcWK48baKRB8ZP6 zd1g== X-Gm-Message-State: AOAM531wGRj36EPl0S2dO7ktmDLhBty/vNVXzlcprvZTA25fY9a8J7JR aKjzGwBlfEVP/jsMpqV/dneMIIFKsor5WQgQpQtyRNxbDiCIlg== X-Google-Smtp-Source: ABdhPJw1EZXpEQFNlkLympMxrslKeW6dQZNM9e92qymVnytbQ0W65D835UzCJd87S/7r5LF+j8qj+AOoZe445JzBCJc= X-Received: by 2002:a05:651c:1312:: with SMTP id u18mr9206514lja.200.1607937443582; Mon, 14 Dec 2020 01:17:23 -0800 (PST) MIME-Version: 1.0 References: <20201212003447.238474-1-linus.walleij@linaro.org> In-Reply-To: <20201212003447.238474-1-linus.walleij@linaro.org> From: Linus Walleij Date: Mon, 14 Dec 2020 10:17:12 +0100 Message-ID: Subject: Re: [PATCH] gpiolib: Disallow identical line names in the same chip To: "open list:GPIO SUBSYSTEM" Cc: Bartosz Golaszewski , Geert Uytterhoeven , Johan Hovold Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Sat, Dec 12, 2020 at 1:36 AM Linus Walleij wrote: > We need to make this namespace hierarchical: at least do not > allow two lines on the same chip to have the same name, this > is just too much flexibility. If we name a line on a chip, > name it uniquely on that chip. > > I don't know what happens if we just apply this, I *hope* there > are not a lot of systems out there breaking this simple and > intuitive rule. > > As a side effect, this makes the device tree naming code > scream a bit if names are not globally unique. > > I think there are not super-many device trees out there naming > their lines so let's fix this before the problem becomes > widespread. > > Cc: Geert Uytterhoeven > Cc: Johan Hovold > Signed-off-by: Linus Walleij I applied this patch for v5.11 with replacing -EINVAL with -EEXIST as suggested by Andy. Yours, Linus Walleij