Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5920168ybi; Wed, 31 Jul 2019 05:30:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxe6XBioIxYsMn6QveEqbWNP8F2Ye0rI/bVpG6drpbtivc/XeohqYqmHdzoGOGRCfPOpaLc X-Received: by 2002:a62:5c01:: with SMTP id q1mr24902785pfb.53.1564576214239; Wed, 31 Jul 2019 05:30:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564576214; cv=none; d=google.com; s=arc-20160816; b=GFL00mTDP3foufiDfH61AvVNOnGtenIMWkRNzW67vZ7Y1XewDkdQaKFa2b/GgEuHdI lJwbp7zlQji2rgsW3SY9rGSPN8CuyThPICqNaunfM4TPPaPEFOBrPAXYgtRkBdwkaajt 2Qvvzi2UHDxaGXohoZ/HRpgUuz4SPTnfQYPRshSmTFAW7XTyS8t4FM45SsztgXkB0vPb F9ZJ+JeMwesttZ/goHfKOhdvp7dXzOLQXsFjiZmGSc/WZY+8gz1j5AGlWXXD20Lzdzoc Fo0cLwCDcwycbqLtp9G3caLHZlc4SnnRUCrlbTF29TkIWmp6m1hKFPIbok8pUnca7O/t Z8Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=2O775qpjwYqwjNNK1jAWRm9r82jKhpePG9GnlR7OY0Q=; b=Nax/u2AY8edmvncX7lhklh7asH6b5RzHkWb9UgQy9CX7rldqV9CrryLr0H5MmA83Ou LO/4TjRNZuuxUbJ0O5Cbe2TrZWa0jSBjw0DfN8dUg+4IYnTDgb03PiBLID1fetManeVp n4QM4czUxt4ysgnKFD2Ss03R2didOQCGKMVAgggpAPOSVzSTCNSmf7OQjt7KolXV0aq+ jBrs/w0sAjHi0uVs/nqSXYY0zWVBR28RhMH5ZG8rVyxXkRA1wE0n23tODetYwWZYD22C 36CWHAl74pzPV6+duMuQlB9lhu8aVPS3CPo/7VtoChYV6d+MC5Xc698tODEsOR4hiIyo kGpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Yyn7RWwA; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g94si56461596plb.142.2019.07.31.05.29.59; Wed, 31 Jul 2019 05:30:14 -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=@broadcom.com header.s=google header.b=Yyn7RWwA; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728034AbfGaKUS (ORCPT + 99 others); Wed, 31 Jul 2019 06:20:18 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43518 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727946AbfGaKUR (ORCPT ); Wed, 31 Jul 2019 06:20:17 -0400 Received: by mail-pf1-f193.google.com with SMTP id i189so31617029pfg.10 for ; Wed, 31 Jul 2019 03:20:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2O775qpjwYqwjNNK1jAWRm9r82jKhpePG9GnlR7OY0Q=; b=Yyn7RWwAm3JMCXDcDeGBxlaI8XMQIA7FHvASa9guSVH5L7xlXw0b2zl5bASLjFlBrD BNq04z6h80T08oj9ruwe1tr4he/+Y8CcouibUt5l4M07hNrarc/BzT45M+ohvaQ35kyI 8kyE/kbWoHb31fZ5jKIxodukMPslx+uW3psTo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2O775qpjwYqwjNNK1jAWRm9r82jKhpePG9GnlR7OY0Q=; b=JRrV34qrDPP+1061HejNtw0DCozykAGdP3YVoh/CWE1CqGSRMvTTBOcMCJNapFulZn Af8MPNZA54B2BY+4MAa4m5YFxq5AAa0e3E4CluMElowHZZMycKxr7yOZYt9B+pEi3swc vwfWNWM6GgLjcc8ZQ7eMd5GWnofSuHPMw21NTjRA1FFnkF63mZBNP4o5VL1VUogqflQW /nUV2/g1VL1fhqvLZShI0IZZJMGRu5W8PVFKjiO0qD8eDSFhGjlPJIkNg5c5xd0JV2Vi Qeq8/EIRcBv7yVYPxbZMSqDmCYlGx6jfO6OrhJG37I+NMv2tHlm6jruFyCSd4Or+y2rD z6Bw== X-Gm-Message-State: APjAAAUzmZl8r5eBOVlPJ6MnBoAzTpBFAQZX5VtYTO2quZkuAh01CId8 NaKXh7O8qqDtR566IjpQFscqUQ== X-Received: by 2002:a17:90b:949:: with SMTP id dw9mr2190902pjb.49.1564568416276; Wed, 31 Jul 2019 03:20:16 -0700 (PDT) Received: from mannams-OptiPlex-7010.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 3sm71161776pfg.186.2019.07.31.03.20.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Jul 2019 03:20:15 -0700 (PDT) From: Srinath Mannam To: Greg Kroah-Hartman , Mathias Nyman , Rob Herring , Kishon Vijay Abraham I , Mark Rutland Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Srinath Mannam Subject: [PATCH v2 1/5] phy: Add phy ports in attrs Date: Wed, 31 Jul 2019 15:49:51 +0530 Message-Id: <1564568395-9980-2-git-send-email-srinath.mannam@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564568395-9980-1-git-send-email-srinath.mannam@broadcom.com> References: <1564568395-9980-1-git-send-email-srinath.mannam@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add phy ports bitmask to contain enabled PHY ports. set and get APIs added to set and get phy ports value. Signed-off-by: Srinath Mannam --- include/linux/phy/phy.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 15032f14..b8bca1d 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -109,10 +109,12 @@ struct phy_ops { /** * struct phy_attrs - represents phy attributes * @bus_width: Data path width implemented by PHY + * @phy_ports: Bitmask of enabled ports * @mode: PHY mode */ struct phy_attrs { u32 bus_width; + u32 phy_ports; enum phy_mode mode; }; @@ -225,6 +227,14 @@ static inline void phy_set_bus_width(struct phy *phy, int bus_width) { phy->attrs.bus_width = bus_width; } +static inline int phy_get_phy_ports(struct phy *phy) +{ + return phy->attrs.phy_ports; +} +static inline void phy_set_phy_ports(struct phy *phy, int phy_ports) +{ + phy->attrs.phy_ports |= phy_ports; +} struct phy *phy_get(struct device *dev, const char *string); struct phy *phy_optional_get(struct device *dev, const char *string); struct phy *devm_phy_get(struct device *dev, const char *string); -- 2.7.4