Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp280014ybm; Wed, 22 May 2019 03:04:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/7oxSDZ2XQfAA6HioH0e65aLyUJUo8K8Tsp6O2l4k5FRUPKoVHQJzjc6ypY3pZYeKqCxO X-Received: by 2002:a17:902:ca4:: with SMTP id 33mr52156827plt.107.1558519470405; Wed, 22 May 2019 03:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558519470; cv=none; d=google.com; s=arc-20160816; b=th4/PykSLPJ3zEUyRxFqUUfEWXo75SbwV+9LFpPMa7rvKQhafk0xxvzYjsihG6mlyL Xouyd2xiFczX7tFxUboJknBaLxBjNZ0eyFjiH9nbJk587MVHnPpMnFtEdlme5pa5IGM/ NLWJfHT2x3c+OQ7CShNUm3RniLY6kQ5MNfSmMmSxYkZnyI51nnR1Q1CSF/P4LGFv/sHz 1yZKZaKWwZq6e/HFXx3SN88KZqd/PdQUWDz4abuCci5s6NzVDxJP7KIVnNTNJp/4RalU +qzumMzdj9Feimb28QFyqYe/qUrW1UMXlQbeoqjt971IIVA6iG2bRdEO04O1n6ZaiQ/8 lCbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=pOJgHp/KMoeYEIwsOCZddIB2aTQYV+vwh0CSHycpDpI=; b=R+9Fnx1FZ/cgGfL7t5K85vZ1BCBtMxGCSJI9vjPwamSf26DXFe+/bcFU7UljFDGAdQ lmDF6tiFZdwgFRh+Kc022vp/WH4CrmTraTlhZ2P5GjyAwAa09zIhdhJAF0PjYwHvqIiV JCcRomfRraEb3Us+HlZzZQlruNjRy9+5y4aZAv7b8aSRdBldCIINn+0BzedNMe0GHAOn U0AwyZ6LL12HIyrK4I6L+Qr9VX1zjF3v6xfvnWkZrGM2czdM3jvq0xxiNMyW2Z7GaRC6 +G14Wy+llt27gjOQg/Lap8ksvBDNaACdYQx9zTPhn+VZGEb2wL8CoT9XdmhEDf5j4I5v O8Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=qqOlTXMN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r14si24415904pgf.45.2019.05.22.03.04.13; Wed, 22 May 2019 03:04:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=qqOlTXMN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729387AbfEVKBJ (ORCPT + 99 others); Wed, 22 May 2019 06:01:09 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:23941 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728406AbfEVKBJ (ORCPT ); Wed, 22 May 2019 06:01:09 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4587SL4VkZz9v2M2; Wed, 22 May 2019 12:01:06 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=qqOlTXMN; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id htw2hqspO0bf; Wed, 22 May 2019 12:01:06 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4587SL3TkDz9v2M1; Wed, 22 May 2019 12:01:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1558519266; bh=pOJgHp/KMoeYEIwsOCZddIB2aTQYV+vwh0CSHycpDpI=; h=From:Subject:To:Cc:Date:From; b=qqOlTXMNNHJOMdk1N0HS5Hzpjr/2y4ypZNow5W/PI1QnLs7xTU5AODc1lbH+yW2YQ 4sE+CEJBwutOJwezWalBSKhSPl0OETTs8Qdl/cHuf7CvaUOTtcsf5OQ3d+mF1hdRn5 mbkCkumtsx09O8bpHrNBhw6w1FgIKFul1ZKY43uU= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 932128B82C; Wed, 22 May 2019 12:01:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id g2u_VzR4Vwh9; Wed, 22 May 2019 12:01:07 +0200 (CEST) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 644268B823; Wed, 22 May 2019 12:01:07 +0200 (CEST) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 2B677684F2; Wed, 22 May 2019 10:01:07 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH] net: phy: lxt: Add suspend/resume support to LXT971 and LXT973. To: Andrew Lunn , Florian Fainelli , Heiner Kallweit , "David S. Miller" Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Date: Wed, 22 May 2019 10:01:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All LXT PHYs implement the standard "power down" bit 11 of BMCR, so this patch adds support using the generic genphy_{suspend,resume} functions. LXT970 is left aside because all registers get cleared upon "power down" exit. Fixes: 0f0ca340e57b ("phy: power management support") Signed-off-by: Christophe Leroy --- drivers/net/phy/lxt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c index 314486288119..356bd6472f49 100644 --- a/drivers/net/phy/lxt.c +++ b/drivers/net/phy/lxt.c @@ -262,6 +262,8 @@ static struct phy_driver lxt97x_driver[] = { /* PHY_BASIC_FEATURES */ .ack_interrupt = lxt971_ack_interrupt, .config_intr = lxt971_config_intr, + .suspend = genphy_suspend, + .resume = genphy_resume, }, { .phy_id = 0x00137a10, .name = "LXT973-A2", @@ -271,6 +273,8 @@ static struct phy_driver lxt97x_driver[] = { .probe = lxt973_probe, .config_aneg = lxt973_config_aneg, .read_status = lxt973a2_read_status, + .suspend = genphy_suspend, + .resume = genphy_resume, }, { .phy_id = 0x00137a10, .name = "LXT973", @@ -279,6 +283,8 @@ static struct phy_driver lxt97x_driver[] = { .flags = 0, .probe = lxt973_probe, .config_aneg = lxt973_config_aneg, + .suspend = genphy_suspend, + .resume = genphy_resume, } }; module_phy_driver(lxt97x_driver); -- 2.13.3