From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5B961C6FD1F for ; Wed, 15 Mar 2023 01:31:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hKjhIBsQj0CylwF/8GnLmyMn0gbcwpHK9EPCzF+r/o0=; b=Hy8Z9Id0Lx80Yb 4ggNqGBss0aYOd1RcIGimXypMRqA38Bo/WMEcXSL4myON72glpQXlQoZMHWlj3vaOGYQzw9sSKixh UH95SxFGgEzhb+IqP7Mgc3tVSKvDFLFDZK7KJJjwhYTs88Vim4Mn4LSGu2F5kywvfYWy/xyeJhl+B KV3QHGH2vtfhyuJPsOdT68AIrJYZS1OxKW0fyxGC4d9d/Zu/dP2dGMKZ+m3xKaULOPwq2pOHTCU78 T+8KS6yULlEdcU5PtM0Rw5jyoLp5X09goKVF2sALXBVioaxf5Q8ZWmNq3+CW7wUsuxgLXnefeZQgb VBhNM+LnKCQqruuwyjSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcFyd-00BxgL-1J; Wed, 15 Mar 2023 01:30:51 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcEuk-00BqXr-2O for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 00:22:48 +0000 Received: by mail-ed1-x533.google.com with SMTP id eh3so13211037edb.11 for ; Tue, 14 Mar 2023 17:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678839762; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=L6eritjJV4LmiZbdr9lP3yT7o1szXMCHsn5LCiyfRYA=; b=MlYQbfvWe5d9Ry+P+Vx41YBQ1gL4OtfOQt8b4E0T1AHEtZSohp+M0zt3W6JgqeXI1k 5Ua7MqtpxoZcOf9mdxWmVqygm20lTj+rqEKPQ+Ghq8fUDsQDltZlFgBnyg5ZJ/u55q/8 CNekHNxQ6Wr87imnsoRBo0TiE/5BD+NCU8HuP2znUCSod+EWWgDpM4QmmoRyXjfSDeln mkYv3yAXq3Rz6wKFueC82MBqn0CGREbh5qD9nPJl8i5h+5ABl8a/MRubv84EtfzyCSqh Qgq0fd7yU+hNdgTi+s7ntYP8rAuiMqTQeQyuCPw3iAaB0+BHL1aOihVFlkzZATDGCpMO gYKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678839762; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=L6eritjJV4LmiZbdr9lP3yT7o1szXMCHsn5LCiyfRYA=; b=tdECRDCJSMuMhJN82JCFqtzvevXSf53lfEEWIXCSVeHP+zgXGgyjnAR8dPg4YiBCM8 IJAaHErV0eXPru7U9RD9JM3ryWzW88xk3GqDXRdx18DN9Frv6YLGA9aLZNaVillxWhsP I60Jj8rB2Hf95Sz2ge951Z4vm3Fi9e4cLHlRRBL76it0F7aeVSWg+A+/+B4HE+/BmGjp ala9Kav7Xk71I60GBAo6zM+G4peNe5qHj0/0bzGqVwUuIXIcgll5f8i7AH088dgW5A3v d/f8CUKsgcudPR+blk+qb/uWmIvkAi4Xv2gOJ8sl+KWzGHLDchfK5oqkJCwgYethGSep 354A== X-Gm-Message-State: AO0yUKXugrhTywLI4bJ+f72cTQzMIbgz/GIIo2eXQGuSusivlpQXnfOO yJAeDDFhFimqWmGclf1mnM0= X-Google-Smtp-Source: AK7set/0jp0llLgxtutMBA0b7r+ILPHtzlYr7jAT9FHTqx5rUM1ZuuQ0b8I5XKt4RCtv+JUlnJp6KQ== X-Received: by 2002:a17:906:58c6:b0:922:de2c:fdaa with SMTP id e6-20020a17090658c600b00922de2cfdaamr5934299ejs.50.1678839762231; Tue, 14 Mar 2023 17:22:42 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id ko22-20020a170907987600b008d325e167f3sm1746110ejc.201.2023.03.14.17.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 17:22:41 -0700 (PDT) Date: Wed, 15 Mar 2023 02:22:39 +0200 From: Vladimir Oltean To: Christian Marangi Cc: Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Heiner Kallweit , Russell King , Gregory Clement , Sebastian Hesselbarth , Andy Gross , Bjorn Andersson , Konrad Dybcio , John Crispin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Lee Jones , linux-leds@vger.kernel.org Subject: Re: [net-next PATCH v3 02/14] net: dsa: qca8k: add LEDs basic support Message-ID: <20230315002239.ticvivruobuwcvwz@skbuf> References: <20230314101516.20427-1-ansuelsmth@gmail.com> <20230314101516.20427-1-ansuelsmth@gmail.com> <20230314101516.20427-3-ansuelsmth@gmail.com> <20230314101516.20427-3-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230314101516.20427-3-ansuelsmth@gmail.com> <20230314101516.20427-3-ansuelsmth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230314_172246_822518_756ED732 X-CRM114-Status: GOOD ( 26.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 14, 2023 at 11:15:04AM +0100, Christian Marangi wrote: > Add LEDs basic support for qca8k Switch Family by adding basic > brightness_set() support. > > Since these LEDs refelect port status, the default label is set to > ":port". DT binding should describe the color, function and number of > the leds using standard LEDs api. > > These LEDs supports only blocking variant of the brightness_set() > function since they can sleep during access of the switch leds to set > the brightness. > > While at it add to the qca8k header file each mode defined by the Switch > Documentation for future use. > > Signed-off-by: Christian Marangi > --- > drivers/net/dsa/qca/Kconfig | 7 ++ > drivers/net/dsa/qca/Makefile | 1 + > drivers/net/dsa/qca/qca8k-8xxx.c | 4 + > drivers/net/dsa/qca/qca8k-leds.c | 191 +++++++++++++++++++++++++++++++ > drivers/net/dsa/qca/qca8k.h | 69 +++++++++++ > 5 files changed, 272 insertions(+) > create mode 100644 drivers/net/dsa/qca/qca8k-leds.c > > diff --git a/drivers/net/dsa/qca/Kconfig b/drivers/net/dsa/qca/Kconfig > index ba339747362c..9ed9d9cf80eb 100644 > --- a/drivers/net/dsa/qca/Kconfig > +++ b/drivers/net/dsa/qca/Kconfig > @@ -15,3 +15,10 @@ config NET_DSA_QCA8K > help > This enables support for the Qualcomm Atheros QCA8K Ethernet > switch chips. > + > +config NET_DSA_QCA8K_LEDS_SUPPORT > + bool "Qualcomm Atheros QCA8K Ethernet switch family LEDs support" > + depends on NET_DSA_QCA8K > + help > + This enabled support for LEDs present on the Qualcomm Atheros > + QCA8K Ethernet switch chips. > diff --git a/drivers/net/dsa/qca/Makefile b/drivers/net/dsa/qca/Makefile > index 701f1d199e93..330ae389e489 100644 > --- a/drivers/net/dsa/qca/Makefile > +++ b/drivers/net/dsa/qca/Makefile > @@ -2,3 +2,4 @@ > obj-$(CONFIG_NET_DSA_AR9331) += ar9331.o > obj-$(CONFIG_NET_DSA_QCA8K) += qca8k.o > qca8k-y += qca8k-common.o qca8k-8xxx.o > +obj-$(CONFIG_NET_DSA_QCA8K_LEDS_SUPPORT) += qca8k-leds.o Isn't this what you want instead? ifdef CONFIG_NET_DSA_QCA8K_LEDS_SUPPORT qca8k-y += qca8k-leds.o endif you don't want to have to export the qca8k_setup_led_ctrl() symbol... you want it to be part of the same module AFAIU. > +/* Leds Support function */ > +#ifdef CONFIG_NET_DSA_QCA8K_LEDS_SUPPORT > +int qca8k_setup_led_ctrl(struct qca8k_priv *priv); > +#else > +static inline int qca8k_setup_led_ctrl(struct qca8k_priv *priv) > +{ > + return 0; > +} > +#endif Could there be just a qca8k-leds.h with the function prototypes exported by qca8k-leds.c? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel