Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp773361rwb; Thu, 1 Dec 2022 08:12:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf6V1gkfZxuf9zcpwtG7F3ZLwPNk2O+nM3kVTfBlApMkfqCUqvZsJM+hSEyV6bJODGCdWzVr X-Received: by 2002:aa7:c585:0:b0:46b:635a:ed8f with SMTP id g5-20020aa7c585000000b0046b635aed8fmr13815708edq.406.1669911148746; Thu, 01 Dec 2022 08:12:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669911148; cv=none; d=google.com; s=arc-20160816; b=s7pdjqTivNSMTPb++88p9S/kR/WApjSueuY61Znhxv6Jg6ArvJ829Srm1OWekNjBia is35Jt/o9DyyWh7/J8spejCU1EcIk4Jp8dhl1XA6Y7eimxxzSsQmJhnssRcoOcjKbPDm tDcoWwGZ1Maz2gox3Pi/o2YqHQr5mFGf/0tV3cR+/fALD0ycotLjE0SxesNagicd87RH r2J0tZsMO3DzZSmawoqVyr/3cbgNj7J7C+ytMkhKzAoS4xOld5BfmpOVS7LSacXmcpoE W57hj+CopfpLIbDcFCVWnUZd0U9BHxGMygXVedh1eMSu7nFrPk8ZJnpk2HTd2WoRhhZY YsRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yHPLxsl9MbDFA39XedT/fNFDaxz54nP8D2zOAb8sz/Y=; b=OkLkJnbxQTp+Sh8DYdDQb6G50gjpq00wvBELeJdr860mw8Iiz339Shdv0GGWhNOiv1 2XAlBhYOA8i4NtcyLmvlzH4fj/oAzL3flpHp1k5ArQqHyW9UIm/Gv4Qi8VKiIMuYCJxY LSsvBVuT1jo7NvCAzyyrVcKYnTOyInT9isUZkJA+rrlR0VugLpnlzLBGwt7tDy9/8kO7 /FUtHJwH5RUkb3WdvpSe2ifqFdwF18BzHyj8cFP5MhhxAK+C0KE3XHeqtMcHvnUgs3o8 EpnOGe5oZDxNdKoRisFCTlnH0b6qnHeIWY5vCWiVFndibVFAHVlJq2e+sFLwTJMS1pwt Gxcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=HOkEQsho; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a056402520700b0046baa297047si4680647edd.361.2022.12.01.08.12.07; Thu, 01 Dec 2022 08:12:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=HOkEQsho; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231787AbiLAPmM (ORCPT + 82 others); Thu, 1 Dec 2022 10:42:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231528AbiLAPlm (ORCPT ); Thu, 1 Dec 2022 10:41:42 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF0591F9; Thu, 1 Dec 2022 07:40:31 -0800 (PST) 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=yHPLxsl9MbDFA39XedT/fNFDaxz54nP8D2zOAb8sz/Y=; b=HOkEQshoMedf4HqS3Ukvmb7K+s gwW38/teWeetRQOOIhMYIOOiEtsrCxnUVbRM/Ut3foVLKH3itDFBBjT+VrD1hOYz5nA/3ZmKwT2Og 2BDROwc4BllYWFOQIo2R0/sqq72S6h8/P9lUZ+xMiTjv0oXtR/pSjYvej4dvISZ6Bcjw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p0lfh-0044fZ-7W; Thu, 01 Dec 2022 16:40:21 +0100 Date: Thu, 1 Dec 2022 16:40:21 +0100 From: Andrew Lunn To: Yanhong Wang Cc: linux-riscv@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Richard Cochran , Heiner Kallweit , Peter Geis Subject: Re: [PATCH v1 4/7] net: phy: motorcomm: Add YT8531 phy support Message-ID: References: <20221201090242.2381-1-yanhong.wang@starfivetech.com> <20221201090242.2381-5-yanhong.wang@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221201090242.2381-5-yanhong.wang@starfivetech.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static const struct ytphy_reg_field ytphy_rxtxd_grp[] = { > + { "rx_delay_sel", GENMASK(13, 10), 0x0 }, > + { "tx_delay_sel_fe", GENMASK(7, 4), 0xf }, > + { "tx_delay_sel", GENMASK(3, 0), 0x1 } > +}; > + > +static const struct ytphy_reg_field ytphy_txinver_grp[] = { > + { "tx_inverted_1000", BIT(14), 0x0 }, > + { "tx_inverted_100", BIT(14), 0x0 }, > + { "tx_inverted_10", BIT(14), 0x0 } > +}; > + > +static const struct ytphy_reg_field ytphy_rxden_grp[] = { > + { "rxc_dly_en", BIT(8), 0x1 } > +}; > + > +static int ytphy_config_init(struct phy_device *phydev) > +{ > + struct device_node *of_node; > + u32 val; > + u32 mask; > + u32 cfg; > + int ret; > + int i = 0; > + > + of_node = phydev->mdio.dev.of_node; > + if (of_node) { > + ret = of_property_read_u32(of_node, ytphy_rxden_grp[0].name, &cfg); You need to document the device tree binding. Frank Sae always gets the locking wrong in this driver. Have you tested your patch with lockdep enabled? Andrew