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 6DEFBC47073 for ; Thu, 4 Jan 2024 13:11:52 +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: Subject:Cc:To:From:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ISPDPX46v/2tS5Qlw8Z0u7vXq5UT2Twi75t97KMRkho=; b=eejYOCpBpWxLl+ NrV2yPe6GQFbjvaCFwF5e5oJPNg7PsgsJk2rlAbTw1FKSBGIYKG6fIlg+G8Xu5jaPUyhr4+Q8o2pK jxwp1gIeg2BmXAg9Ggroj77f73KoI6aVmY9fH3q8l4KOJg6zmIxW+6emOPgSJ15zyUzFv+nVt+rWn +7mzibde5/e4QgD5g2WBWqpAAR/o9IyQXMAOkrmIDmoYU+/8X4pSqUWxi8UXtDHx2UL7488Vi7fTH tbMktJRqYuotIw+drc9rqyfJaWBXZLQqG8LUDhD3115gMC7L39r8vk84aOBSugG8z9GGNVclVy2sZ FlqQ9hlGVhKoD8gdw+nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNVH-00E5dU-0u; Thu, 04 Jan 2024 13:11:19 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNVE-00E5bn-0S for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:11:17 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-33687627ad0so406793f8f.2 for ; Thu, 04 Jan 2024 05:11:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704373874; x=1704978674; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=mD0BtoavTOP3v/vUfEDahgNoFQu6hqlrFVAdzIefsBU=; b=OH2em9LkpEo6R/XaF5gHBBFxQojyRbGJHuYqUuUIrsmn60mOpHY+9Y9fTCNXFZIky9 Oq3bjUj8tCoH6OpqSKUN1vP5LWJQP65Nz1U7X2sDQElflAc/pRcc18zll+fM6bluMFVM szHjf3y4GqDpLM50eqPVxmKZy9um5BICDyf3sWIFHagDNwO7OJLdFDKuIjp8lRoDzaOr 9Qfu951X9p+5gRqvcJH71/y/C0Bs6jOPtqdDSOOAsB1AerMYlY0VgRyKJM/J7/ZFsAHU t3ELczqwDzAunRmBDZb93N4kNEOZQIPPbdSI19PcOYePJ9VA/UL4Rq0cmh/iHP5YfT05 yr+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373874; x=1704978674; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mD0BtoavTOP3v/vUfEDahgNoFQu6hqlrFVAdzIefsBU=; b=dpFUEFoxVfh7XUdE3FRhX0Y4kc1HOASUyBThMYfFzfruyCxCdBaaJgXLsIiCyDhBei H7FFI3ZzN/lTTx3v7QiSqMCmO7RcZBK2Ekl376a0xTGAwwxAjPqjXLi0ptztNpPP8ckz kSMSaFpnVUzFLDpLY/AziBUJLEO3CFYMVPrcmfFL2TiQLsHsd6HV7N4Nmg6nDNmMRrzu 1qjw8IC15H4C/Wy4xh10zdPBSVwymG6h8W+OSLCqCwS1iXUdnNHp41Po9nCrR/bCXzuT b1ZLb0MpPoLcwLFS6VRbIk4HgvEfijlvDpqig85T6n8UV87zDIDn/+0fCXiYozEWdcGh DCtg== X-Gm-Message-State: AOJu0YyUPq+md8Niptv76mLisLUTK2tNsiyeTn/B7aRzVgnLsO6p6nUA ZSXoo7pUxsG89A3synKsSmQ= X-Google-Smtp-Source: AGHT+IG0LMhhU/gfhoVr7LAviwbZXPweDz/CGpAVxscjxDW2uQY6VEjT58wBpBcmJBrbK9LEtlPxUA== X-Received: by 2002:a5d:4004:0:b0:336:8664:54b4 with SMTP id n4-20020a5d4004000000b00336866454b4mr376338wrp.132.1704373873447; Thu, 04 Jan 2024 05:11:13 -0800 (PST) Received: from Ansuel-xps. (host-80-116-159-187.retail.telecomitalia.it. [80.116.159.187]) by smtp.gmail.com with ESMTPSA id z13-20020adfe54d000000b00333359b522dsm33187913wrm.77.2024.01.04.05.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:11:13 -0800 (PST) Message-ID: <6596ae71.df0a0220.a153a.6407@mx.google.com> X-Google-Original-Message-ID: Date: Thu, 4 Jan 2024 14:11:11 +0100 From: Christian Marangi To: Maxime Chevallier 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 , =?iso-8859-1?Q?Fern=E1ndez?= 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 References: <20240104110114.2020-1-ansuelsmth@gmail.com> <20240104110114.2020-6-ansuelsmth@gmail.com> <20240104124805.1b0ba142@device-28.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240104124805.1b0ba142@device-28.home> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_051116_176064_D442C639 X-CRM114-Status: GOOD ( 22.90 ) 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 Thu, Jan 04, 2024 at 12:48:05PM +0100, Maxime Chevallier wrote: > 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 for checking this, oversight by me! Will fix. (the blink frequency was discovered only lately) -- Ansuel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel