From patchwork Mon Sep 5 06:30:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 12965499 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 2758AC6FA8B for ; Mon, 5 Sep 2022 06:31:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236703AbiIEGbU (ORCPT ); Mon, 5 Sep 2022 02:31:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235843AbiIEGbP (ORCPT ); Mon, 5 Sep 2022 02:31:15 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E70A18B36; Sun, 4 Sep 2022 23:31:14 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id s206so7309344pgs.3; Sun, 04 Sep 2022 23:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=U194c+dv3L8PGxjQRUqmKsyVJlhonDrX8vTPY/i9hXs=; b=Fkbc/qOj6ZS7IqaqFcyPDPM8EDvYCU7OGChWB/9DpWkiWqS2dcKh9l1ojNoGhPTnaD njtjyQXo+Rn/WKjPbWSgQwcSRXqdDOgJDGXNJQq5SFjXCfctlSjW18o5uDca1l2zvr9s qI1PzrfdfgBUibYLHx0f78UFpIn7lM4srMFlpQG6GGUAs+9ir4zw3UO2CcA6EiK7Fjf1 bf4cjTs1g6ppz8vMIVX34VakImJ62Z/3L44MxW6WWlAwFP7SjkuSosBV+uw4t/dQJPMK jdTwvre314VlwpC1eofIVn09IiP/lYmwjM75pESkwXfDC4BXtIhlz1s+2S/HOBFZhOcr KREw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=U194c+dv3L8PGxjQRUqmKsyVJlhonDrX8vTPY/i9hXs=; b=FH7N3z98qZ9bBOunPxiUaxnmkLk+taVR8AdZUnjUmjuJHcf1V3ou+NcMO7oZeBH1C7 7CN2Ddng4Oz1UJwrCLVnUGEn2ccL3CAHqKUEfAIaQLMUFI4QhIDkQy2gnIMggSJmTzxL dbXItbb8pj4TVALamecgqn2q0s62seASemTthw3qIm+vX1+kuxo6dH91huPZ05XhwwWy 9xUTrYKrAIjhQgptVThfdzDhELT+Fn5GSwr57By/jdx/TFJhMuC1jV0fwarI9Z3og3Ew uGfDly53OfuqNkFpSeaSo47FYQizu8sldNhipj1vx8kjN2Agon1P1fmXaPhVsAsbru7t kJOg== X-Gm-Message-State: ACgBeo2Tl+wdjOdtViVsqsXGMzwsy8MaBxy8FWNKNHF04/R8tdW+ySNa JJ3oYebTg/xsWst2mBFsjgg= X-Google-Smtp-Source: AA6agR5AcoEUClPAM45JZ1w1Bqqw5txpdGe6Mc9rimWxG6gO38z3tQNrUedFo00QOImtqhFwVKAqJg== X-Received: by 2002:a63:914c:0:b0:42b:a8fa:eb4a with SMTP id l73-20020a63914c000000b0042ba8faeb4amr34343614pge.481.1662359473959; Sun, 04 Sep 2022 23:31:13 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:7332:f188:2984:5930]) by smtp.gmail.com with ESMTPSA id d197-20020a6336ce000000b0042254fce5e7sm5710653pga.50.2022.09.04.23.31.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Sep 2022 23:31:13 -0700 (PDT) From: Dmitry Torokhov To: Thierry Reding , Mark Brown , Matti Vaittinen , Lorenzo Pieralisi , Claudiu Beznea , Liam Girdwood , Wim Van Sebroeck , Greg Kroah-Hartman , Guenter Roeck , Miquel Raynal , Linus Walleij , Felipe Balbi , Alexandre Belloni , =?utf-8?q?Krzysztof_Wilc?= =?utf-8?q?zy=C5=84ski?= , Vignesh Raghavendra , Daniel Vetter , Thomas Petazzoni , Alexandre Torgue , Marc Zyngier , Richard Weinberger , David Airlie , Nicolas Ferre , Alyssa Rosenzweig , Bartosz Golaszewski , Jonathan Hunter , Rob Herring , Maxime Coquelin , Bjorn Helgaas , =?utf-8?q?Pali_Roh=C3=A1r?= Cc: linux-watchdog@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v1 02/11] drm/tegra: switch to using devm_fwnode_gpiod_get Date: Sun, 4 Sep 2022 23:30:54 -0700 Message-Id: <20220903-gpiod_get_from_of_node-remove-v1-2-b29adfb27a6c@gmail.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog In-Reply-To: <20220903-gpiod_get_from_of_node-remove-v1-0-b29adfb27a6c@gmail.com> References: <20220903-gpiod_get_from_of_node-remove-v1-0-b29adfb27a6c@gmail.com> MIME-Version: 1.0 X-Mailer: b4 0.10.0-dev-fc921 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org I would like to limit (or maybe even remove) use of [devm_]gpiod_get_from_of_node in drivers so that gpiolib can be cleaned a bit, so let's switch to the generic device property API. It may even help with handling secondary fwnodes when gpiolib is taught to handle gpios described by swnodes. Signed-off-by: Dmitry Torokhov diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c index 47d26b5d9945..a8925dcd7edd 100644 --- a/drivers/gpu/drm/tegra/output.c +++ b/drivers/gpu/drm/tegra/output.c @@ -133,11 +133,11 @@ int tegra_output_probe(struct tegra_output *output) } } - output->hpd_gpio = devm_gpiod_get_from_of_node(output->dev, - output->of_node, - "nvidia,hpd-gpio", 0, - GPIOD_IN, - "HDMI hotplug detect"); + output->hpd_gpio = devm_fwnode_gpiod_get(output->dev, + of_fwnode_handle(output->of_node), + "nvidia,hpd", + GPIOD_IN, + "HDMI hotplug detect"); if (IS_ERR(output->hpd_gpio)) { if (PTR_ERR(output->hpd_gpio) != -ENOENT) return PTR_ERR(output->hpd_gpio);