Message ID | 20221019172019.2303223-3-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBCQ4XFG47UFRBWXDYCNAMGQENQ7Z3TA@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E73103F342 for <linux-amarula@patchwork.amarulasolutions.com>; Wed, 19 Oct 2022 19:20:26 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id l18-20020a056402255200b0045d2674d1a0sf11894536edb.0 for <linux-amarula@patchwork.amarulasolutions.com>; Wed, 19 Oct 2022 10:20:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666200026; cv=pass; d=google.com; s=arc-20160816; b=nWDREmtdqhG+28TXIsNXX4ufKlCeemtTrEp5krLeilPnropGLif2qVnkD6Bjp861Fz 25hDWYlfty9drtAaSzW14nCoC1Hf1FzLG86aEp3DC9mHhbV6qsPIw3esO5jGpxPOtpy2 ZcWMa46QMbVFvH/uVWxZg/7T1wkoKppNaVWXuzB9o5+RSWSI3S5D7qUVOOXPKXwKLOKg heWP/Z+zUJa0yLk1SzCnKUO31d7dmW/uxhVETyUkMqmcbQkuCpQe6OQmQMf8jkFpH/6s Gcq1lXO7f2vSrPMLubySDKmKEWj4SyL4OJeX37mtO5AeylM6QUf8f4b7BgpkD3ZJ/hoq ncOg== 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=uwOUUyINFvyNVRx5gvJVymXdTzhtxVw2mijC9gOYysA=; b=XPV8BP7WjmWNjsym2aj4YL1p7FufLJ9LbBPVNUu3PiZ56jonDQLP7InAyDlItdGe4u 1oyMIi0BkfPGmdcbf1SabxIG2d4Hi9GdkJsvRLKESfJlC+mDZGT2/ESulZGBoRhk5+Oz b5wfv0sdkVA4Bym+hnP93CsuoSesr9oKBCTNUpEuoP4SpxKY7sTQaxDZLyqQzUsECW9t LmYqPjaOXfYM/YIrxU8C4YXkbmtkknmYM126NeOoofbWWgDJj1mvD62YdzOzVVX4c3XV FByQHFoTd8OKto9MMgoUNDS9QOgmIHskeALzf3w0qmTAr9pij07SS1hI8PxbltO72Pt5 3yUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Vx3XJK4L; 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:message-id:reply-to; bh=uwOUUyINFvyNVRx5gvJVymXdTzhtxVw2mijC9gOYysA=; b=gJnVsE/S7nli66a8NcrhmVO21VnlbuJVUI58XCWESfImclHifXVjb8/Da5uqs60GjD 2CDeUD7AvAmqanCJ2QuIj18412f6wV+3uEMFxKb9s3rgoKcxKV6O/mMlsbhQpqfTfDfZ 6ZC2QzVZhz6LKssE9mBVSkD06LQ/lc1hXpTfc= 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:message-id:reply-to; bh=uwOUUyINFvyNVRx5gvJVymXdTzhtxVw2mijC9gOYysA=; b=BvnqM+yLICee0suD/I2QXmpB7h1hO9CQw6gLQuZVEQj5NFvNDM4TyM/akeF9HbA+9t 9d8HgWoARdf8SrOJG648zqYgGZySq6lOUke/GpgxMWZBtu2NFOy1XbDHJTtEUOwy0L1a gSYN7YfHH2w2+50ptzB/TB3HvDMGNLoabU26o7ZJ++5akrRkEiYmzzF0zg3O5Ou57UHA lQH7IRQVRxgBGhqLRBMoNhqCg/66Yr6wz2i5BDpyPuhtBOmhZaUEqZv3Xrwx2UDPIN0X qFMXYbkOgqenAfSy1dOTQ2//BlLuGO8ZblEOwTYuNR3Wox3OeN08FxXT8wTLtnQH5j02 o6og== X-Gm-Message-State: ACrzQf1+6Lx1QjqEbiXJktMr1GWgy//qEEUbOFA32ehcSq1fVNf0CzKS Ji399Zaj7oORRvKZ0+JsBOkWbq9B X-Google-Smtp-Source: AMsMyM4ICc24B6F1NW1EDCs/HCPp8cRgl/D/DVKbpqVesppX6B+puSXWTTIv2IhKineRFT7WPGgueQ== X-Received: by 2002:a17:907:783:b0:76e:f290:8b5 with SMTP id xd3-20020a170907078300b0076ef29008b5mr7907583ejb.395.1666200026462; Wed, 19 Oct 2022 10:20:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5193:b0:45c:bfd9:fb45 with SMTP id q19-20020a056402519300b0045cbfd9fb45ls1127981edd.3.-pod-prod-gmail; Wed, 19 Oct 2022 10:20:25 -0700 (PDT) X-Received: by 2002:a05:6402:298d:b0:451:5fc5:d423 with SMTP id eq13-20020a056402298d00b004515fc5d423mr8415557edb.102.1666200025344; Wed, 19 Oct 2022 10:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666200025; cv=none; d=google.com; s=arc-20160816; b=Y3gCGC24Wo1iR1j15YVCBIBAXFmjxIuInr9X6XVCufA8XQ/2e4wYnMYSJB8na4j8eD 5E6aLG50jyAoCfCB4ud89Wr3/H/QtN0SeXPw7nM4m26DimwSeSNinppawppFH/zWGl+D QA5Jw2pOBsCrWM2FuBdfY5PmwniLOJ+R654QRXaDrDRTi97rPv1xFkcz+B6ZNvHuUmJv OKin67/MS2SE1crg80TD94Fankrs+fhjNBZXed0ZWt8o+MzvGSVz2AcvHYBSdZ/G7u70 lcf2uTXZk4AbQ6e3BtoQaw4OsN+dUV+h8FbnbrwmYkhxp8CcqiYq97lKVWZDCbDTf89V dBaA== 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=Hbbs/2GVVuyzOUGxLx75U21cEyKKy5qLxF3kTeKqvr4=; b=MkyY+bPr23qY6KOCdj5y9Lt7UBRNZbMxe7G3GCrwVdBSz6OTXN1QPjt2lYDWYOFNDf medPrPdh5oznwNEhn8RIwPg9Cw4cAT2yIG8QgxNBwL9ZYGHA+ei/+8kPK7YlUB5k5Jqp VifVla5pyUomCrmFiVxubrxXrHlOOEOyfqfZs0tQlLVGWiCeNi/ujav4zvD8Uu1XFDGc xwfVx3q+39lSDR8yGb2NuuE6akGB0qysTXhte8jiNI/NbHzAgClqhlxqSbyFaKxhOWTg 5bZ/IwsB5X76o+FJgrrE7ZxWSGikOIdGecloHecvsZagunmdQp0dT2ptzW45lGwCXtM6 OL2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Vx3XJK4L; 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 k9-20020a508ac9000000b0045810194e5bsor8440325edk.66.2022.10.19.10.20.25 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Wed, 19 Oct 2022 10:20:25 -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:a05:6402:254d:b0:45d:3ed3:8aa9 with SMTP id l13-20020a056402254d00b0045d3ed38aa9mr8335525edb.157.1666200024942; Wed, 19 Oct 2022 10:20:24 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-233-42-253.retail.telecomitalia.it. [95.233.42.253]) by smtp.gmail.com with ESMTPSA id b27-20020a17090630db00b0073dbaeb50f6sm9237983ejb.169.2022.10.19.10.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 10:20:24 -0700 (PDT) From: Dario Binacchi <dario.binacchi@amarulasolutions.com> To: linux-amarula@amarulasolutions.com Cc: anthony@amarulasolutions.com, jagan@amarulasolutions.com, dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, tommaso.merciai@amarulasolutions.com Subject: [RFC PATCH 2/8] clk: imx: add imx_dt_clk_name() helper to use clock-output-names Date: Wed, 19 Oct 2022 19:20:13 +0200 Message-Id: <20221019172019.2303223-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221019172019.2303223-1-dario.binacchi@amarulasolutions.com> References: <20221019172019.2303223-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=Vx3XJK4L; 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: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c index 7cc669934253..96db803647f4 100644 --- a/drivers/clk/imx/clk.c +++ b/drivers/clk/imx/clk.c @@ -17,6 +17,17 @@ DEFINE_SPINLOCK(imx_ccm_lock); EXPORT_SYMBOL_GPL(imx_ccm_lock); +const char *imx_dt_clk_name(struct device_node *np) +{ + const char *name; + + if (!of_property_read_string_index(np, "clock-output-names", 0, + &name)) + return name; + + return np->name; +} + void imx_unregister_clocks(struct clk *clks[], unsigned int count) { unsigned int i; diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 802afb3481c4..e3262ce035f7 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -99,6 +99,8 @@ struct imx_clk_iomap { u16 offset; }; +const char *imx_dt_clk_name(struct device_node *np); + struct clk_hw *imx_clk_fracn_gppll(const char *name, const char *parent_name, void __iomem *base, const struct imx_fracn_gppll_clk *pll_clk);
Let's create the clock alias based on the clock-output-names property if available. Also the component clock drivers can use imx_dt_clk_name() in the following patches. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> --- drivers/clk/imx/clk.c | 11 +++++++++++ drivers/clk/imx/clk.h | 2 ++ 2 files changed, 13 insertions(+)