From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiner Kallweit Subject: [PATCH net-next 0/2] net: phy: improve PM handling of PHY/MDIO Date: Sat, 2 Jun 2018 22:33:36 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" To: Andrew Lunn , Florian Fainelli , David Miller Return-path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:36783 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbeFBUdp (ORCPT ); Sat, 2 Jun 2018 16:33:45 -0400 Received: by mail-wm0-f67.google.com with SMTP id v131-v6so7918639wma.1 for ; Sat, 02 Jun 2018 13:33:44 -0700 (PDT) Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: Current implementation of MDIO bus PM ops doesn't actually implement bus-specific PM ops but just calls PM ops defined on a device level what doesn't seem to be fully in line with the core PM model. When looking e.g. at __device_suspend() the PM core looks for PM ops of a device in a specific order: 1. device PM domain 2. device type 3. device class 4. device bus I think it has good reason that there's no PM ops on device level. The situation can be improved by modeling PHY's as device type of a MDIO device. If for some other type of MDIO device PM ops are needed, it could be modeled as struct device_type as well. Heiner Kallweit (2): net: phy: add struct device_type representation of a PHY net: phy: remove PM ops from MDIO bus drivers/net/phy/mdio_bus.c | 48 ------------------ drivers/net/phy/phy_device.c | 96 +++++++++++++++++++----------------- include/linux/mdio.h | 1 - 3 files changed, 50 insertions(+), 95 deletions(-) -- 2.17.1