Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7657178rdb; Thu, 4 Jan 2024 03:48:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQvQ022+nC2wyyMrq0bs2uGinga2PA8rZhAx7FhX+xJVZ/w5n9zl0jja/BxLR2GepzCqQ8 X-Received: by 2002:a17:902:c405:b0:1d4:4b09:6b69 with SMTP id k5-20020a170902c40500b001d44b096b69mr488921plk.137.1704368906330; Thu, 04 Jan 2024 03:48:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704368906; cv=none; d=google.com; s=arc-20160816; b=QLcnL4f3I0WwzWm3biE8WlWBsm4iOqZATwy+b3Ohxi05jMIQ3wP4X2bFQDXKSPg8FN dsAyT9vpKiBOSci5HOTjnBdG/K/iRs7r0S24xrdA99E3ZyJ7ZTN5X9ta2EC0W1WxpnyR CH2H/gdOEVzuvkoHU8e8Ye9sUXVtX32jP1vyZZ8K/5iJPSk19+gv3nTka92wxh01qRF3 zRO++5uV9ZFU7ZOPH1ny32zY5KDj393WEmxxeTgnVokUWDOaNsmooHtsJ21g5jZtzN5K EjKRUq2vzaRYQi9XcCkHoTpB3D1Ly4nwB4ik8RKDLArWheBnD+klVJKoOHH1xL+SzIKm /hxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=9jtxASBHYv7DYWaUVWi8zHXXkgICuHN1u6bOMe9fkFs=; fh=93FR0posHd1B9MC7yIqfaz8tNH4wp13rSqIxUdYGYas=; b=Jn/OEypFbMHmomneJXQSvvhlMMM5Ny9mEGRbbjp68b/YLkAxz+73xDv/Jli6MXrIiE FUc7jevY7VDYP9BEC8Kp1wH9lGZgInscPLd7SmJtQS+L2wIzrGJBCrIVL8ZgEd4nrP3S OGEVzJjvwhoJMjoK6KfslitS70cLDiMw3TqBf4B88LZQH1+w9TOoUnXP7uNcPMzZ2fVp Oj6GY1yJtcNvz76QJF+Hnf0bmBohDH4lCbX9ral+tdO35qj5z9ouLIa/a0FSxawqM0zK j8NNh2GSe8cKfKJFgRvP4oO8lcs/QJB4MKZ9P1nnYhCQ63WnmUpL4YJhbnlxxZ3UBzQj 1oZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Q+3QJNw+; spf=pass (google.com: domain of linux-kernel+bounces-16604-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bc7-20020a170902930700b001d09c54485esi23135598plb.568.2024.01.04.03.48.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 03:48:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16604-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Q+3QJNw+; spf=pass (google.com: domain of linux-kernel+bounces-16604-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 03AC6286EA0 for ; Thu, 4 Jan 2024 11:48:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B22CB21343; Thu, 4 Jan 2024 11:48:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Q+3QJNw+" X-Original-To: linux-kernel@vger.kernel.org Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72BA921344; Thu, 4 Jan 2024 11:48:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com 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