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 E6FD3C47073 for ; Thu, 4 Jan 2024 11:48:44 +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:MIME-Version:References:In-Reply-To: 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=qN1UMnH/nswm7MNXaixmGtnT4cSypbYY0ztVP/rtt88=; b=WfLoOCepO5Lch8 q11neCJ6Mb5SxH+6+364aC1z0sBvSE9Ow+iJdGeBUvVQftbuSL7GrvLTzaLkT6QxcAOspKLtkstih +4r0aYjiMNs3pVIalkjjAvClKVVJnZycavSnzPEUI0WwwL512iYpg35Tl/pYbVo0sPMALqIQTWBtZ Ad/fBDnImAKXOgDrTjqSePyo7vQc2edKkrzO4eYKTuofvgZ7dtM6xwE4T89JLAv4zHcUolwAuIa5w 9kHRo87V0yyCKlXRznLbUyCM+mGb/ZHymqDytv9MremHe3RMfFEQN64KZXytYJPxpU/htn3BbQ18m QKTdPcmv0bOm2Nq9Ua5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLMCv-00DsaC-1z; Thu, 04 Jan 2024 11:48:17 +0000 Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLMCs-00DsZa-1Z for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 11:48:16 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 18F322000A; Thu, 4 Jan 2024 11:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1704368889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9jtxASBHYv7DYWaUVWi8zHXXkgICuHN1u6bOMe9fkFs=; b=Q+3QJNw+iinp96gAThb2+cr1/1jNmbAMsuTsmzXtwdFbYE50g/h5DGmC2NmUID1HolWQgy MZun+DnRrZ2WZe4nP6h3AbKbygeNtiYp2/Au2P7n3zHkx2cenkA9jrtQp86thrb47iOuDB P+0ys/Whl3QF9i8JcSrNWeqSxm0gaMfqHW2eLcnWolOQtk3yPcsbWmz8Yi7e0XysZjwbVY rpqaKtzLWUZYYvl2wkZrZDiZTXH5qprzluTmj1x1GGYmS00aiqfFdJtKcNSKWCN1W+7DYD h/0z2LnpDSqVCfbJqFLiN8uIw8s8UOIithNnmmSVruF6rBcPsvZPi7X6kQ8PNQ== Date: Thu, 4 Jan 2024 12:48:05 +0100 From: Maxime Chevallier To: Christian Marangi Cc: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , William Zhang , Anand Gore , Kursad Oney , Florian Fainelli , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Broadcom internal kernel review list , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , Russell King , Jacek Anaszewski , =?UTF-8?B?RmVybsOhbmRleg==?= Rojas , Sven Schwermer , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Subject: Re: [net-next PATCH v8 5/5] net: phy: at803x: add LED support for qca808x Message-ID: <20240104124805.1b0ba142@device-28.home> In-Reply-To: <20240104110114.2020-6-ansuelsmth@gmail.com> References: <20240104110114.2020-1-ansuelsmth@gmail.com> <20240104110114.2020-6-ansuelsmth@gmail.com> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_034814_833364_90B3CEC1 X-CRM114-Status: GOOD ( 17.06 ) 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 Hello Christian, On Thu, 4 Jan 2024 12:01:12 +0100 Christian Marangi wrote: > Add LED support for QCA8081 PHY. > > Documentation for this LEDs PHY is very scarce even with NDA access > to Documentation for OEMs. Only the blink pattern are documented and are > very confusing most of the time. No documentation is present about > forcing the LED on/off or to always blink. > > Those settings were reversed by poking the regs and trying to find the > correct bits to trigger these modes. Some bits mode are not clear and > maybe the documentation option are not 100% correct. For the sake of LED > support the reversed option are enough to add support for current LED > APIs. I have one small comment below : > +static int qca808x_led_blink_set(struct phy_device *phydev, u8 index, > + unsigned long *delay_on, > + unsigned long *delay_off) > +{ > + int ret; > + u16 reg; > + > + if (index > 2) > + return -EINVAL; > + > + reg = QCA808X_MMD7_LED_FORCE_CTRL(index); > + > + /* Set blink to 50% off, 50% on at 4Hz by default */ > + ret = phy_modify_mmd(phydev, MDIO_MMD_AN, QCA808X_MMD7_LED_GLOBAL, > + QCA808X_LED_BLINK_FREQ_MASK | QCA808X_LED_BLINK_DUTY_MASK, > + QCA808X_LED_BLINK_FREQ_256HZ | QCA808X_LED_BLINK_DUTY_50_50); The comment (4Hz) and the blink frequency (256Hz) don't match, is that right ? because I see there exists a QCA808X_LED_BLINK_FREQ_4HZ definition, shouldn't it be used ? Thanks, Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel