Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2750496rwb; Mon, 5 Sep 2022 00:20:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR5iIwgPU1D/GQJB9+eXjBewz8RxiFYwbCXfxCA234pjxL79HWefy15h/cGmDBModzTPto9x X-Received: by 2002:a17:90b:4a4c:b0:1fe:24ac:2bb3 with SMTP id lb12-20020a17090b4a4c00b001fe24ac2bb3mr18372439pjb.79.1662362411086; Mon, 05 Sep 2022 00:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662362411; cv=none; d=google.com; s=arc-20160816; b=GTxX2YW4RuOyFhfS2OzvakZXbrcPn3bcCH5vZzyXJuL1cqmaNxf3dlEQdpT28NBaTr thb1P75JIbNHk/TRTIh5ONjRCdTJ/Aumia3GF1BzDSocJ8iLyMUAU6q4SN+aYywoLAqe lc8f91NPDGAz0VEY+1+NPZxzq1Xt0AZWVOepXo0m5x93oPFp9SXXSOEp2HBo0evFs7DN Cfj3THZw/KfeSLi6CDUx4tGUEJ7zalQhRS0djbvw9xzLoIZD4789XUnWoJK/IISpFMbK LesoLGzRiR/Yc4N40ChZPKp3KIstyVPvPIqeyPJ0vo4dMYJgXyHd0BrcKenDKfzw2P4k fztw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U194c+dv3L8PGxjQRUqmKsyVJlhonDrX8vTPY/i9hXs=; b=T//epfRde+fmmH/5Zfi0UR7iIfCgwloifnZelYn54roZr/F/JzPYjg1dCFy+KfBiMq 99irhwBD+UvkF4YX20AxjYW9d/OloXghBLoQwdlI6CrRT6ijwyPDYP1eeL1b9RXyRGZw QijV2WO1eioTJ2RUYfilAbNHyFTiYWAAe0nxw3DOlzhRAdXRXYRpn/r+jsnkBUVUlGMk ywZc7+9w1elcPcE+V8FdEfJYWk9r6zGO8EsQkaYOXP15qtZUt6Fh8VAmoo6tNul2WAz3 r1oomfGucXVH3vs4VN0CaLgDDocfuQSzZshL51gvfL5BX9rjG/2mKoRVnn26TQfRWxdS Yp+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Fkbc/qOj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a1709029a8c00b00174418919a6si5716999plp.513.2022.09.05.00.20.00; Mon, 05 Sep 2022 00:20:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Fkbc/qOj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236748AbiIEGbX (ORCPT + 99 others); Mon, 5 Sep 2022 02:31:23 -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-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=20Wilczy=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=20Roh=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 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.10.0-dev-fc921 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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); -- b4 0.10.0-dev-fc921