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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 000A6C04A95 for ; Wed, 28 Sep 2022 08:45:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 55C6884C8E; Wed, 28 Sep 2022 10:45:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com 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=amarulasolutions.com header.i=@amarulasolutions.com header.b="BkVyTpWA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A749684C4F; Wed, 28 Sep 2022 10:45:30 +0200 (CEST) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (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 E8F3B84C4F for ; Wed, 28 Sep 2022 10:45:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dario.binacchi@amarulasolutions.com Received: by mail-ej1-x630.google.com with SMTP id rk17so12448813ejb.1 for ; Wed, 28 Sep 2022 01:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=h3YaKURbiQ7LuhL1Xu/lWdSKUeeQp7qXCFgrkT2hkvo=; b=BkVyTpWAZJKmG5IJ4yeZqB9uMY6FZ0dlVNVveJx6uBydZgdvfEhBZf5SQg1LqjRVWO DIhLzKKSh7qGYvczZ/4b6Bj3WneywRuelSu9eNnlRp2InuW4D59ZTj/cPSpmRGupfNco 6rDiyHf1g/hsKv/P5LygGn8+kZm2JpnZZRjE8= 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=h3YaKURbiQ7LuhL1Xu/lWdSKUeeQp7qXCFgrkT2hkvo=; b=SwXN/W78EtMKe2rRTgv21CfR+Oc7Cd5MjtFN6ub2VLgEvl9goLxegmSoVB89V6wGNA +fbP+k04xsdVfmxzOo0Ou6PvxT0LWYSLvQc/I+p2LXAwRUnmI6fXPOp8SlO/9xi+O+vz QH2ldsFWNXhCf7qnxf7kxi/g27zX3tB+mUJfAmeL9m4if+xfCWD+VLIHthy8M0AeeHtX 03DNvz/v4oJbfwwezru4MCbeZ5G9XeqegeM78JbEfKoxFiCUoPeel7+Juiyb7iyYe3Qs SPOn4F61E6nEOBZvub0KzGrRGnocOcJeEhFdzAQmopBIun/k4IcblEDiPYjcJqWpG2mf swPw== X-Gm-Message-State: ACrzQf30pi2vK0jZjj0Ciqdg2y8Nzxmo7Hy+SfkJm4Q5yFsM16lat3F2 wdZjE2fpCKIsUQAZ9/k0ho0xWQyug1zm4A== X-Google-Smtp-Source: AMsMyM6M0jjnGZsQegeBaDmoBvS1VO4gmPo61AvHRC287AzzFpXfGTZLvwRUAj0zaZadOPPrOQ7WeQ== X-Received: by 2002:a17:906:9bd3:b0:778:c8e0:fcee with SMTP id de19-20020a1709069bd300b00778c8e0fceemr26842385ejc.275.1664354724331; Wed, 28 Sep 2022 01:45:24 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-232-92-192.retail.telecomitalia.it. [95.232.92.192]) by smtp.gmail.com with ESMTPSA id q1-20020a50cc81000000b00457618d3409sm2928883edi.68.2022.09.28.01.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 01:45:24 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Giulio Benetti , Heinrich Schuchardt , Neil Armstrong , Sean Anderson , Simon Glass Subject: [PATCH 1/7] dm: clk: add missing stub when CONFIG_CLK is deactivated Date: Wed, 28 Sep 2022 10:45:03 +0200 Message-Id: <20220928084509.2758974-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220928084509.2758974-1-dario.binacchi@amarulasolutions.com> References: <20220928084509.2758974-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Add missing stub for functions [devm_]clk_...() when CONFIG_CLK is deactivated. Signed-off-by: Dario Binacchi --- include/clk.h | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/include/clk.h b/include/clk.h index 76bb64bb5ee0..407513e0fa29 100644 --- a/include/clk.h +++ b/include/clk.h @@ -88,8 +88,9 @@ struct clk_bulk { unsigned int count; }; -#if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(CLK) struct phandle_1_arg; + +#if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(CLK) /** * clk_get_by_phandle() - Get a clock by its phandle information (of-platadata) * @dev: Device containing the phandle @@ -258,12 +259,26 @@ int clk_release_all(struct clk *clk, int count); void devm_clk_put(struct udevice *dev, struct clk *clk); #else + +static inline int clk_get_by_phandle(struct udevice *dev, const + struct phandle_1_arg *cells, + struct clk *clk) +{ + return -ENOSYS; +} + static inline int clk_get_by_index(struct udevice *dev, int index, struct clk *clk) { return -ENOSYS; } +static inline int clk_get_by_index_nodev(ofnode node, int index, + struct clk *clk) +{ + return -ENOSYS; +} + static inline int clk_get_bulk(struct udevice *dev, struct clk_bulk *bulk) { return -ENOSYS; @@ -275,6 +290,17 @@ static inline int clk_get_by_name(struct udevice *dev, const char *name, return -ENOSYS; } +static inline struct clk *devm_clk_get(struct udevice *dev, const char *id) +{ + return ERR_PTR(-ENOSYS); +} + +static inline struct clk *devm_clk_get_optional(struct udevice *dev, + const char *id) +{ + return ERR_PTR(-ENOSYS); +} + static inline int clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk) { @@ -285,6 +311,10 @@ static inline int clk_release_all(struct clk *clk, int count) { return -ENOSYS; } + +static inline void devm_clk_put(struct udevice *dev, struct clk *clk) +{ +} #endif /** -- 2.32.0