From patchwork Wed Sep 28 08:45:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2394 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4AD2F3F0E1 for ; Wed, 28 Sep 2022 10:45:26 +0200 (CEST) Received: by mail-ej1-f71.google.com with SMTP id dm10-20020a170907948a00b00781fa5e140fsf5161389ejc.21 for ; Wed, 28 Sep 2022 01:45:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1664354726; cv=pass; d=google.com; s=arc-20160816; b=s3pv73dVxDfgJKwdSmc9TwxFrDXmpnhf6zIOBtsAXBPXeBqM3ybfdCnp4550Nn3Rzi HTtwpEOPL1carlMxLIZhSw2cX3HxtvDAMIJcbiJt/TiEbwcofifZuwCNEOyx54f9fO6X ENxKQoxXQvpASUPIT/gKF0nI5GBUuUzPrgh45A8pjKFhwsIDyMAqdG3hf6dhelOxEo4V SxeHZ53/SlkS6Ws46D8XMJM9gfWs6iWwoOuH5JS1Rj3D6gg4SbiUkYUS0lHkIQrYQ/Ab IHWf2rMgteQ9ghJVIM0IuLW1mBASzchkDFRBEAtHpkKlga4tcObFxz4hyiVnFf6wFlO9 Z2wA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=OZL0wRQFP7Yar/PDbG7ZoKwSVTT5x3Gyu+eYvAm2q0o=; b=AjM8k7jw4WIQk30Z3qqihKRRu5XlWq1h31XPtzZ7s2jLnOhKwyGOMzX7P4VRUF2GNG QFAmYA6FF7s3gPf26wfp/Bvw2/rVZSyZsed0nnyL/b1nM/ZCp+iSs7OldAmuPBCM7pHE 6BFxyQtjUR1gsJ942DpcpME3O76rUX+SAGBKb217rKKvUgNqnX3hGZXGHGviQn/fU0G/ ua/+bucC/QxtsWiPOlr3EQmCn9AGjMuT+2nwuJGCaLM4aVO3kJFNa8PMIIPcnfr7kNvY 70p1lBaj/2CNfQYihjX+EjSon3j243nHK0W6uiiG7Ws0yrleyJgKe7kk0JYLiLueOl0K mOKg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BkVyTpWA; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date; bh=OZL0wRQFP7Yar/PDbG7ZoKwSVTT5x3Gyu+eYvAm2q0o=; b=ampOeRWQd+0I3nl0prLFLbJEhBNvCSDO18ghoQRFa4qja80IgoEQcoWgc+UpoeVIYr J23iIHbCGbWMEdHeovOtSfSbDNw0c8W4OR9yjIq1+FG4XVr1HAzWb8goWRngowLMsvOn VX0SeSCuQHu8vNOtmKF1QqgpyxmYim/kOsEfA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date; bh=OZL0wRQFP7Yar/PDbG7ZoKwSVTT5x3Gyu+eYvAm2q0o=; b=jT36ebapWS0KW1PpLXT3898g/p1aKC1ycZYoOZ2AvRwP3AQQHYZmz5bqMCZl3HdO2w +vFUWauhJweJidrJE8num/5hbXo/46ZtnphSFJ96YeiFP83EQ4P4cWG8ZSozKFv8zZZL +2i8VbuVh/RP4cf/wFBteSivhsOF7Thds9je7SbS3IgcGFuyf8adbIpDJBHvBMKc4kjU 6gL+vmnhbAEhha8TQwwqjEsGGk6IbHXcJ6LCPS58t9ScijI5mb3GclZJQ3mdAA377zyh LUzMiJhce3b7THvkCiSt1QL+fuD7XTYnAbfpRTMpxjeuYZNnWY7FX1thaVE1BeYD8WU0 VzNQ== X-Gm-Message-State: ACrzQf2tiayqKzHc70A+rxvULiIlIpIn+PayLCz2OH/uWccW5tXoOz4I OBeqICj5GuWKLGmqTMGfxdQQKxwY X-Google-Smtp-Source: AMsMyM5PniGGeoSdsmSw9FND95Rz3va0oWS3vMcjB7hb2iX3gE2Pq2H/KdP5HfsioZrexcQGCtpXOw== X-Received: by 2002:a17:907:a06a:b0:77d:2f20:69c0 with SMTP id ia10-20020a170907a06a00b0077d2f2069c0mr26053413ejc.40.1664354725776; Wed, 28 Sep 2022 01:45:25 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:e10:b0:776:305f:399f with SMTP id l16-20020a1709060e1000b00776305f399fls516637eji.1.-pod-prod-gmail; Wed, 28 Sep 2022 01:45:24 -0700 (PDT) X-Received: by 2002:a17:906:fd84:b0:730:acee:d067 with SMTP id xa4-20020a170906fd8400b00730aceed067mr26722554ejb.206.1664354724526; Wed, 28 Sep 2022 01:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664354724; cv=none; d=google.com; s=arc-20160816; b=FhsPVPhbzib8Bf87eVM4KwiJDCquLiN82c9tNgLGQ7VKb+Ssw1GUpt3fO/p6HTjOQZ neUO1+CbgFG/pmqmYC9FDQkC1+3fyMWbeNhmkoUB3qWdGjMDdDXb3NzunKyFDYMDExf2 zKJHA+Em9ZUTSA0ynYszC4TwNuF8taV17O+oG8t6ndum6lUu9rF5roqFxVhSbjtR2DfN bdIIHXf2xvC8iXjgXeepOt2tgIy6U68KKWkcp41eicLWDnVR6yG+NHPekdCW4Gv9NA1I TLC9Ukp/mOALPPXc4IW4rinFqHul5u7Gv0aIsn3jL+SO9VpPreCk08UQ2oEX9FHs6axm xWFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=h3YaKURbiQ7LuhL1Xu/lWdSKUeeQp7qXCFgrkT2hkvo=; b=WsIIcA2sZ5vSCWjA7DAsQyLLLHNlN9QIfTvWmzksS3annxf3tSvi/ka47mh/8Q+kTa X9NNEJ51Tr76znM8Aaiv4mTW8LdsL8TpPNVhkurKnfmyJg6m40rQ23LoePADbOlLGgCC 6T7aqdAAzZR9llxP3/VAIxafNQ5scIo7ES9szlE0edo4vvq56o0f/SPhjPqhmjDTaV1W /pcGB8PkBAJo6Wu705yg0YrxbxIimypR8HlXfoher6Gxo9JmmB6124Qp8txDW7HcQwE9 8D9tpPNBqQajMhTpjTNhnlwfS9sEwgQNUMF/8nKXz3S+GSty6ukM2Zm6B66vnB057XUM g9zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BkVyTpWA; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id dn6-20020a17090794c600b007309a848439sor1740511ejc.35.2022.09.28.01.45.24 for (Google Transport Security); Wed, 28 Sep 2022 01:45:24 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; 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 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BkVyTpWA; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add missing stub for functions [devm_]clk_...() when CONFIG_CLK is deactivated. Signed-off-by: Dario Binacchi Reviewed-by: Sean Anderson --- 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 /**