Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp461140lqo; Wed, 8 May 2024 05:26:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVALLHCK6szWztw1K5Mfd5mwXOU4D7UpUUEm1aNCdiNLGbiqNm8+YSPjQFbQc0rYJqDRqM0w1/ULjiqEyFcyxz10lWODaWkAJ/Vuwu4Qw== X-Google-Smtp-Source: AGHT+IHbkeXDu7eWT3LyV/QE8lbxxPQRJfqs1BEOqbMHDqHF5aOxTm0ZTRWdAKlA71aJgwI3cgME X-Received: by 2002:ac8:7f52:0:b0:437:9c7e:ab1f with SMTP id d75a77b69052e-43d8f7f6685mr97662041cf.33.1715171186780; Wed, 08 May 2024 05:26:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715171186; cv=pass; d=google.com; s=arc-20160816; b=zSg6h0eOfV2M/70ioARAi6jM0sEwf8m7Yq/sN1XDq1PyUKCMMRDir6abKW+D1Vgkle DN4CuVAXCpBnn46Uw3awsHK4gTg0HtFVE+lGAaozYda50Vawa3uG3t6w7BR74GI4OVH1 d4eScG4fTbGkwnEkjzafxfk59Dp89Hn/kWrm9hBPi2KIRfExNtPT+jMkAz1CUPRxk9ab 82PDDyS/j7IJyeQTBMNLRqyQwAR3+JY87v2JXfrAZ+yKLWWmcQdvHckBmTfrhUktz6oD Y2fs2YiTtUHNRdyiyYuWdiA9KTDh6ch/w4+im30tvyZFhf1RE1VIEJ8IHO4j7fBLoSWf uA4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=c6FK8kE2E3qY4r3/M503lbKRVuqOuZQLe5oE7UqdJHg=; fh=4S8GlLDFbLxntk5QUAtWmjgzZDH0p+U5YBomK6dB3Hg=; b=t8QcfHiekryTOp17miD8QFuU+xnIwXOU8E67jMrhTrIaN5LarxFePpylhP6kFXoUlN ybH4ApUqSHXXPr3W5ujBCthK68VfyTgHoQlORGzGNG6kL5VCMTwzmpPpKBdvFd/JKSUl jPXckv+uSn7s/W5y+5DjtIMiS2hP4m6MjkHNl3Scr+ElsXETMoabaNkD50cO8FkrPYrw vg1epwa0Ut/kN7uwhYri7jQtmSQc7m9ZvhL3S64xJ3CH0iEygyFIouHuJ00KVf+K4RDM +cwZ8LzmjIPt/YbituoKpKyH0NLxzhTdjNptAaewodS7qMEx4WEYbBYMULvZcxArX08J h+9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=V+mV4j4i; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-173212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v4-20020a05622a144400b0043ab15dde65si13118108qtx.274.2024.05.08.05.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 05:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=V+mV4j4i; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-173212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 80A2F1C22F31 for ; Wed, 8 May 2024 12:26:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5715484A38; Wed, 8 May 2024 12:26:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="V+mV4j4i" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 35E5281ABF; Wed, 8 May 2024 12:26:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715171176; cv=none; b=iqpjx56+7VSGheAhBcJrOHzwhGmeNF+Q9zbhbWzeQhkWV4VA8k7L6/e3nW4vykgGbJwRmfjcwxs7SwQsXb5WfmLccQeGsa6WlougQRW99UyE8yXDXtwPjosQSYKr3OVOSwXvzIq/b3wIfy0/5WutLcOt8cEiWrViHBhJODSgGVk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715171176; c=relaxed/simple; bh=j3Ot/IyazXb8aifsPqkGgRMobmYq0OZQJ/U3tJeKFsY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lbqHGjwwt+CSEFUVcRdNLpiSLww3kO3H+SR4EVhypqkUdjK4JA/u/PGPPykCxHetEg1fe6N23cyz9grxYOSm1Bg3hjPzWwVkO3vWlFWGWp7ehD7q4Z38z7uGQRJChZ2ygYmq8mAdcqJHBpo40HJhhN4q6cD/dFlUqh/MHQs3ruE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=V+mV4j4i; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=c6FK8kE2E3qY4r3/M503lbKRVuqOuZQLe5oE7UqdJHg=; b=V+mV4j4inbuhAz6AIWRBNs3IQi NOZlDUdJ4zXWr1Ml995bvReYQczAhXUaZixVikHFfF9GMKnM/xQuazWx3+DtIV2MjnBM0/P03+NWY 6aRqHq4BPcMEkSXNYwCAZtw1KVS35tu/FVWMSKmbsPG3tu4HKOZ7hjgDUoZ2/TAL54cc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s4gMu-00Ewpn-6b; Wed, 08 May 2024 14:25:56 +0200 Date: Wed, 8 May 2024 14:25:56 +0200 From: Andrew Lunn To: Daniel Golle Cc: Sky Huang , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Qingfang Deng , Matthias Brugger , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Steven Liu Subject: Re: [PATCH 2/3] net: phy: mediatek: Add mtk phy lib for token ring access & LED/other manipulations Message-ID: References: <20240425023325.15586-1-SkyLake.Huang@mediatek.com> <20240425023325.15586-3-SkyLake.Huang@mediatek.com> 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-Disposition: inline In-Reply-To: On Tue, May 07, 2024 at 03:40:09PM +0100, Daniel Golle wrote: > > +/* Registers on MDIO_MMD_VEND2 */ > > +#define MTK_PHY_LED0_ON_CTRL 0x24 > > +#define MTK_PHY_LED1_ON_CTRL 0x26 > > +#define MTK_PHY_LED_ON_MASK GENMASK(6, 0) > > Shouldn't this be > GENMASK(6, 0) | BIT(7) > > to include the MTK_PHY_LED_ON_LINK2500 bit as well? > > I also noticed that this bit is the only difference between the LED > controller of the internal 2.5G PHY in MT7988 and the Airoha EN8811H > (driver air_en8811h.c, present in net-next). The EN8811H seems to use > BIT(8) for LED_ON_LINK2500. > > Could you create this helper library in a way that it would be useful > also for the otherwise identical LED controller of the Airoha EN8811H, > ie. supporting both variants with LED_ON_LINK2500 at BIT(7) as well as > BIT(8) would be worth it imho as all the rest could be shared. Please trim the email when replying to just what is relevant. If i need to page down lots of time to find a comment it is possible i will skip write passed a comment... Andrew