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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 87684C4360C for ; Fri, 27 Sep 2019 20:15:21 +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 5729020872 for ; Fri, 27 Sep 2019 20:15:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gN1S87V9"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iJFiMf8o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5729020872 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+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=ohctiuFvzKepLl9xD0lM2Vc7cij9j4iwQuCwS4luAIM=; b=gN1S87V9hm00+W 19khQN2y37OhXhfPBqzHspYQBXSKLcsgrtVhb1EaKIdNcTlNffKr9w8Ribsb/rocG8qhAT/PF3HMD lnY8eVISECGE/5HfuwPjLQc4s5x+leq2YaWlHJ+slfhG5KA9gUwCK8gqdiFwNbyvtcBljKeEXXGRV BhY2HuVzT7ACP/qCoZknIQlvpdyclMn8JKRC8S1ja/cn/BBwQpS6WSeEUPpcNMfm+ZwPmLYJJWCbj RahEJNjQjn5mWRC1ap5q/hJgllVIZZvlU6ATRq/97L22Bep9u524mhuX2cZNBRCx40xYVyNcCEWDg y/CKpm8kjIdwODwss9rA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iDwe8-0005mA-AL; Fri, 27 Sep 2019 20:15:20 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iDwe4-0005in-Pt for linux-arm-kernel@lists.infradead.org; Fri, 27 Sep 2019 20:15:18 +0000 Received: by mail-lj1-x244.google.com with SMTP id m13so3664637ljj.11 for ; Fri, 27 Sep 2019 13:15:16 -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=qXC46ElY52rOcZF+haJMaG9kGcpXjGEmuqnl/s6D7sU=; b=iJFiMf8oaWyvJ8t2FRdzBieJmBW5yu3HRnK01HFEMVSw7D+/9QK25m8hgUZhlWOrkd GziWqf9HwAaV/7hi26Io+K/S80D/MN/x+ezIQfe7uGfBQiGtpImE2fapnlVBtF1Vb+/3 yQFsiXQup4fp1DCtB1o8KLpGpzcrECIOGG0AqChAK5VdPoNZvJJkWfrIX+n1PXyv3VmT xGys7w1WQGLfw68iLVFJYjP9Y2g0uImlpyLL/hpSnSJNSyZYO9tVpYVdCkiH5gkniz8q qLMAKTa17sTc5w77+WioyDKi/0DjMl+dAoWnHWw2RP+jPn1YO6K5X6L28U4WNAe5qVco U9RQ== 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=qXC46ElY52rOcZF+haJMaG9kGcpXjGEmuqnl/s6D7sU=; b=BJqbJ+WBnqgh0nH87hV8UxfwtP1kCrGHVGyFOObtPPR5fqiA50yIS+j+k/9NOJ+ieB HKQiBu9WIVbP+VfrzOE51Hd6/OFvjLVR9KU+eLf7ud6tBMU6v1xyntw3iBy4ED7S1SsH gBQCsVcFSuVPzqy8AVAeHqQbEEQN8vUw+9H48RU980FxJVQr48NpWFwGD1mZvxIdzeZa dVW5kt6vBh5awZCj2bUrp1FDp9dpOtXWnP6JbI2hkBogLjsA31cAUNLfiqQIueQub6dA su3TJj+LhSt2UZQVMCZR2DEre3ZP2152qTUYHX9sB6g7ia8MiKA37Z9LEOY2hrXqYqF4 +kyQ== X-Gm-Message-State: APjAAAUu1415yW8sW3g0OjdIkI4d+2oIWJYhu9lOubzUJuOjLu/fnXca cO3M9YZauzEAsQgg9lwUFmxuKyb+GnVs7xoYCx82Qg== X-Google-Smtp-Source: APXvYqyc5PxTmVaJ0Ok+2gj+DX5t1h/U/xZZiw2Ey28AqH+xKmSmLTYAFO5aIUid9OVGoQCZP/0p7sxnItq2tt3rgmM= X-Received: by 2002:a2e:98ce:: with SMTP id s14mr4228705ljj.108.1569615315050; Fri, 27 Sep 2019 13:15:15 -0700 (PDT) MIME-Version: 1.0 References: <1563776607-8368-1-git-send-email-wahrenst@gmx.net> <1563776607-8368-3-git-send-email-wahrenst@gmx.net> <63f17284-5551-9492-9eff-f8a4c003196b@gmx.net> <66dc2cad-673e-0a0b-0aeb-3d62fa2d4ccf@gmx.net> In-Reply-To: <66dc2cad-673e-0a0b-0aeb-3d62fa2d4ccf@gmx.net> From: Linus Walleij Date: Fri, 27 Sep 2019 22:15:01 +0200 Message-ID: Subject: Re: [PATCH 12/18] pinctrl: bcm2835: Add support for BCM2711 pull-up functionality To: Stefan Wahren X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190927_131516_905644_2377016C X-CRM114-Status: GOOD ( 13.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Ulf Hansson , Matthias Brugger , Scott Branden , Eric Anholt , Stephen Boyd , Ray Jui , Michael Turquette , linux-mmc , Adrian Hunter , "open list:GPIO SUBSYSTEM" , Rob Herring , bcm-kernel-feedback-list , Nicolas Saenz Julienne , Florian Fainelli , Linux ARM , linux-rpi-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 27, 2019 at 9:29 PM Stefan Wahren wrote: > today i had the time to try this out. Instead of the following: > > i2c0_gpio0: i2c0_gpio0 { > brcm,pins = <0 1>; > brcm,function = ; > brcm,pull = BCM2835_PUD_OFF>; > } > > you want this? > > i2c0_gpio0: i2c0_gpio0 { > pin-sda { > function = "alt0"; > pins = "gpio0"; > bias-pull-up; > }; > pin-scl { > function = "alt0"; > pins = "gpio1"; > bias-disable; > }; > }; Yes that looks much better. In my opinion. I understand that it puts some developers off because of being more lines or excessively verbose, so to be on the clear, verboseness in itself is not the goal. The goal is universal portability: i.e. it should not matter one bit whether I work on an 2001 Intel StrongARM SoC, a 2019 Broadcom SoC or a 2011 ST-Ericsson SoC: I will understand what bias-disable; or bias-pull-up; means, which lowers the threshold to maintenance. Opaque macros, however helpfully named, still creates a higher cognitive resistance and stresses developers. > Unfortunately i don't know U-Boot is handle the BCM2835 specific pinctrl > functions. I think it would be nice if boot loaders avoid to forking the standards, but I suppose it will invariably happen. Just keep in mind the IETF motto "rough consensus and running code". Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel