From patchwork Fri Jan 15 14:04:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1427042 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=d7AzTf2D; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DHNHl0M8wz9t6g for ; Sat, 16 Jan 2021 01:05:38 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 492FA825B6; Fri, 15 Jan 2021 15:05:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="d7AzTf2D"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 63267825B6; Fri, 15 Jan 2021 15:05:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 160CE82483 for ; Fri, 15 Jan 2021 15:05:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2b.google.com with SMTP id q2so16617670iow.13 for ; Fri, 15 Jan 2021 06:05:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B1Ch/ldDDnjVJig6GgpvMO+b3wzfQqzM6XmWu2cvHek=; b=d7AzTf2DlSfrrkdzFx9zn6UjWhgZgBN1+1Txv3Vr5XIus/FJ6dSG9NlFoJzQ4Erqqu fsQyEpvIk+EslbRUm2B5h8MO/dIQcZrRAYOH4J1LgUcPV3dhBEMNQY4rneAEKGp1jkqC 5hmnW19BK7f53hVNMFLX3ZO6XFkK93zTWG+RA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B1Ch/ldDDnjVJig6GgpvMO+b3wzfQqzM6XmWu2cvHek=; b=qH5NLmQyZH8evw9bzkRqCCmcYfo5IW8wBZwXuLHYTDYQbwdpOm4GN407qqGCGcLZi6 CmcHIqf1qhCHOLSy61pUQfwf3Wky83lkQNUllM3bzHEQRH7kaehol844XDIiUXLYXQ2B NqxFWAKCrJ598iBe3UYkZVU6ieTvx1YsuHcNJF+VKvufe1ZflqNAyAfWkODURqgthNcd S/bu2+xAxzDmRcjt6XsFSgS/2k+OqXFXM1psDTexe8qxp4nU2VQchrViA0hmZ5ElaUrz uVTnEUwn+mHL6Gs/eYhiPNazxl+Sn5KjcgwqGotW0eAC8VNTf0wmLvLH7DHoc07jNnTx PZFw== X-Gm-Message-State: AOAM533YUJ1lWhNQzTwS7AECoM0mqfi67NgsmG9tbmwDTu6075cxbLH3 MdsT8TTJ1Uyeuf2QzBnXWW16ZUtJqPFiWbqx X-Google-Smtp-Source: ABdhPJx7TMLy7rZxLboMHKITz933f8XBSOc84qmVqxTqLd35izfVS7N+AqW+h50FYHJZgC2mSUky/A== X-Received: by 2002:a6b:93d5:: with SMTP id v204mr8594027iod.155.1610719524680; Fri, 15 Jan 2021 06:05:24 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id 1sm5664843ilv.37.2021.01.15.06.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 06:05:24 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Patrick Delaunay , Tom Rini , Simon Glass , Heiko Schocher , Jean-Jacques Hiblot , Patrick Delaunay , Pratyush Yadav Subject: [PATCH 01/15] gpio: Disable functions not used with of-platdata Date: Fri, 15 Jan 2021 07:04:46 -0700 Message-Id: <20210115140500.846307-2-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210115140500.846307-1-sjg@chromium.org> References: <20210115140500.846307-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean These functions use devicetree and cannot wprl with of-platdata, which has no runtime devicetree. If they are used, the current linker error is confusing, since it talks about missing functions in the bowels of driver model. Avoid compiling these functions at all with of-platdata, so that a straightforward link error points to the problem. Signed-off-by: Simon Glass Reviewed-by: Patrick Delaunay --- drivers/gpio/gpio-uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index bad6b71e0c3..e84b68db772 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -1023,6 +1023,7 @@ err: return ret; } +#if !CONFIG_IS_ENABLED(OF_PLATDATA) static int _gpio_request_by_name_nodev(ofnode node, const char *list_name, int index, struct gpio_desc *desc, int flags, bool add_index) @@ -1109,6 +1110,7 @@ int gpio_get_list_count(struct udevice *dev, const char *list_name) return ret; } +#endif /* OF_PLATDATA */ int dm_gpio_free(struct udevice *dev, struct gpio_desc *desc) {