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 0CAAAC433EF for ; Tue, 14 Jun 2022 18:59:51 +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: 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=jkjyc9YtxxWdcrrB8/ETF+buW1jizUbUqX4YBH9JeRo=; b=Z9AwI9P8CHOYjw yGv4MIO5oQcbGUYvDN5mRUQvjzR9B4pxEDnO6BZM4jHAsmQkgYuvqfVwiISmksUFOthxgkrn4flVy msSJsZJoe9cnZ88vYpsJTuhyoIV9/2rS4/hsd0/x074Ll+Ho6qWGDNB95Qzqn9Zb0FtsjK8pF4xIx ODi4b8HviUcb3Ljna/N+T9Uj1u+QfVq9mhuun/QCyBmgXrd+Bcti6hTQR3DP5+dStbrb/UUZ3GblP /UU9QNIUG0sOF/eEOh+uuX9Evs1DYXlISu3f51VqtM2w4Auh1QaU5Qc0PKrRahyz8dzfqLURta2gI KKVdyXK1K9/2s0feX2/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1BkI-00AqbV-2z; Tue, 14 Jun 2022 18:58:34 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1BkF-00Aqag-UC for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 18:58:33 +0000 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=IX+klwzAQQ1z7rE9HiAxH5Ct3Iw/kApUkoCb4QjaGFM=; b=SYiH0cCXRGuuwK6ZPC52upau/s dvoOTx/1gHnsIFDJU1fwwGzQmwewiDO58Mco275hgLsQzPVMHZZucOXKxUChjQMS3ip4FiO9BuSH9 mThWpbvD030Rya/sFROCX4GqTxtHWq+AnVZc136uSUDMXkn7WhBRA27KtHdqgg+by+AE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1o1Bjd-006vCV-6E; Tue, 14 Jun 2022 20:57:53 +0200 Date: Tue, 14 Jun 2022 20:57:53 +0200 From: Andrew Lunn To: Ong Boon Leong Cc: Alexandre Torgue , Jose Abreu , Heiner Kallweit , Russell King , Paolo Abeni , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Vladimir Oltean , Vivien Didelot , Florian Fainelli , Maxime Coquelin , Giuseppe Cavallaro , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Emilio Riva Subject: Re: [PATCH net-next v4 4/5] stmmac: intel: add phy-mode and fixed-link ACPI _DSD setting support Message-ID: References: <20220614030030.1249850-1-boon.leong.ong@intel.com> <20220614030030.1249850-5-boon.leong.ong@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220614030030.1249850-5-boon.leong.ong@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220614_115832_012778_DC468521 X-CRM114-Status: UNSURE ( 7.20 ) X-CRM114-Notice: Please train this message. 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 > + /* For fixed-link setup, we allow phy-mode setting */ > + fwnode = dev_fwnode(&pdev->dev); > + if (fwnode) { > + const char *phy_mode; > + > + if (!fwnode_property_read_string(fwnode, "phy-mode", > + &phy_mode)) { > + if (!strcmp(phy_mode, "sgmii")) > + plat->phy_interface = PHY_INTERFACE_MODE_SGMII; > + if (!strcmp(phy_mode, "1000base-x")) > + plat->phy_interface = PHY_INTERFACE_MODE_1000BASEX; > + } fwnode_get_phy_mode() and then validate the value afterwards. Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel