From patchwork Tue Sep 5 18:53:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13374938 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A1597CA0FF7 for ; Tue, 5 Sep 2023 18:54:13 +0000 (UTC) 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jiZ+7rn8sb018FVtN1duIrbdD5+58Am33SxaTKOAItM=; b=uzivI5duVh05w9 UNJFp4Z2BsyVLMRKX8vaJoyveVzNBErKWWPypR+fVh8i5AgCf3rjPR2v3kWnQLdGIo6OfpftHjneR 8Ans/PEwLmxlxafrQbj0j7YLrPFA83IZSgh0q95JenJ3vh6ITemNAvHC8VqwDAOtcOXAqRz52k3ZM r/XSrNtnp0QVmer9i2VGpVrse1M2M1F029onBIBMrV36SMiAftWyHwYk8AjrQO5O2PpDMZqg0I44J dgFoGipckW3oO52Ap+RN3U/Fjfu+E2jk9HtcNKyg0vYhVU5ni1/Kj0927YgQgltbOTEcxII2r4oJw wvAk0+DLuZ99jFrPEaFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qdbBQ-006Yci-2I; Tue, 05 Sep 2023 18:53:52 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qdbBJ-006YUM-1e for linux-arm-kernel@lists.infradead.org; Tue, 05 Sep 2023 18:53:46 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-401b5516104so28222965e9.2 for ; Tue, 05 Sep 2023 11:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1693940022; x=1694544822; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vPYbcmhlviFwWzuYOu9Z0ne7hiPspJP6iTCWdpKZ06M=; b=Kx/F7Q8hIfX/OkBWIbpi9sXInxdqbaOvNTaZVWN/bWUNUucwBY5snPp4pxPv9L0UOp D9RDMWaewnN00VqhQ4seRBHg1wCUXKrBpjRQfAisEqUMPz6AktNt5dltXWeOd0r7dZfc ZQbhgV1ZA8jlA1p3FgdMc2Z/J4/8rmng1tiNoHnN6yVqdsI8/l+Gir13tH3KWPi0lyr+ KI12W+9QY3nxEMoUZoI5v6cDPwrPE1cRw5V51xdN4ceAK9xYfAd/kDIIGn6vrjSpjA65 2XVp0m4SdTBwU4lFkJyVFZzHNhlMyuqF+1OwD6NYLiumPa1hfUxqLnzjFlQjw8Uasko9 7ayQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693940022; x=1694544822; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vPYbcmhlviFwWzuYOu9Z0ne7hiPspJP6iTCWdpKZ06M=; b=C5KWYFJ1ztwtVs4w84AfYhAfZACGKYvtZsDwZm3YESaDf/bG3NmkdJes6VoU8BB7Yp TXBwdg76bDAH7M2UpVtAVmDy4CzIsKu46SliP4K73r0coP/MfFdWl7nY7QFumGNRbnIO hMQEkiblbYHkxRj/DHAeW6BXgj5BsxjBXORc6GFALM1Ap4T0KC2YHZUVe3Ry3kvZ6iM2 5jXbGEFudo2dSG090E1t0p2LvH/rhDRkapLZK8t2H7k7kdSi/oIxvIkmN7yB0nW+LfMZ sYu9YYfQARtQoU86tZg6SAjftQvFFSw+EGo9BC0edUTh+Llnx+4S9+9luMdzjf5T0C8s ZQXw== X-Gm-Message-State: AOJu0Yydy90xx7JmmsuIg4OpcNVkWaZ3RRyf7E6G29pUnLmGvIgVwzQu PGvI/ngTwZMX+2sEPHbTE2KdWw== X-Google-Smtp-Source: AGHT+IH7bFhmwhJkbEP09mNLLK4toqHl75c1c56y8lKZfC2ULSFpMzvdc2De5dyozg7UIqDbZnvopw== X-Received: by 2002:a7b:cb96:0:b0:3fe:d6bf:f314 with SMTP id m22-20020a7bcb96000000b003fed6bff314mr414148wmi.39.1693940021910; Tue, 05 Sep 2023 11:53:41 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:7a54:5dbc:6d09:48b7]) by smtp.gmail.com with ESMTPSA id 17-20020a05600c249100b003fbc30825fbsm17550010wms.39.2023.09.05.11.53.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 11:53:41 -0700 (PDT) From: Bartosz Golaszewski To: Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Russell King , Mika Westerberg , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , Dipen Patel , Thierry Reding , Jonathan Hunter , Hans de Goede , Mark Gross Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, timestamp@lists.linux.dev, linux-tegra@vger.kernel.org, platform-driver-x86@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 13/21] hte: tegra194: improve the GPIO-related comment Date: Tue, 5 Sep 2023 20:53:01 +0200 Message-Id: <20230905185309.131295-14-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230905185309.131295-1-brgl@bgdev.pl> References: <20230905185309.131295-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230905_115345_553199_F3E8A852 X-CRM114-Status: GOOD ( 14.79 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski Using any of the GPIO interfaces using the global numberspace is deprecated. Make it clear in the comment. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij --- drivers/hte/hte-tegra194.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/hte/hte-tegra194.c b/drivers/hte/hte-tegra194.c index 6fe6897047ac..9fd3c00ff695 100644 --- a/drivers/hte/hte-tegra194.c +++ b/drivers/hte/hte-tegra194.c @@ -407,12 +407,15 @@ static int tegra_hte_line_xlate(struct hte_chip *gc, return -EINVAL; /* + * GPIO consumers can access GPIOs in two ways: * - * There are two paths GPIO consumers can take as follows: - * 1) The consumer (gpiolib-cdev for example) which uses GPIO global - * number which gets assigned run time. - * 2) The consumer passing GPIO from the DT which is assigned - * statically for example by using TEGRA194_AON_GPIO gpio DT binding. + * 1) Using the global GPIO numberspace. + * + * This is the old, now DEPRECATED method and should not be used in + * new code. TODO: Check if tegra is even concerned by this. + * + * 2) Using GPIO descriptors that can be assigned to consumer devices + * using device-tree, ACPI or lookup tables. * * The code below addresses both the consumer use cases and maps into * HTE/GTE namespace.