Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5929200ybi; Wed, 31 Jul 2019 05:38:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIkfh+jE/4y9bbLxmJu8sZb0dleJJVLPm3iAyNVk63dU1dlO5SM1eQjss7IVUJ5V1cZB5a X-Received: by 2002:a62:e716:: with SMTP id s22mr47041257pfh.250.1564576731919; Wed, 31 Jul 2019 05:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564576731; cv=none; d=google.com; s=arc-20160816; b=kmMLYhoU1Hdu1goe70g9Hv7nGv/ZSwtEAauMGnEfnyk816p9XhyMWXcw8QyPvNHH+5 nSr+IA9Cfcx/9Wvbhe45RDOywylEMBiRijo/7MRfqqn5u76eQ+jL6P94bBneUBmI8asv w+CQgqlJWXmG7yBtBdX3vRoWGqwKsTm1pC55VhkNtw9vcUowF0H5TbZyNo0doVrCujPH 4pZHnV/xH0gK0Rii15/0PqH6sqiFtY9DRb5EP4OPL6VjlDIIHvmPQOSKaaZSQqmY0oIn zoCkTCIweTWswov8vcolDmZVplk88i5KPYaYZokxjIxiFoVT4btgVtNUSiFbLAM0XN2G GLZg== 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=RQGFkwgFaLnGGoQ1NvDOCDLZIEZUzuJI5zevIe71AxU=; b=kQIV/U70+t8UdBsqG+LDoLiMSKGi8UwmHsJuESorspPvTQItXvfiVJZBs3FZdOpcGK HJdCnLfF9IVJAPYrozOERTYbOTpmFfpJmIaP1uegkLwGOBiPfRX2MgrCUk/6TmrlJhga eaoZzTlJeDYN3n4aPgx4ujIvIKmC77J5rWZHX09GPVXLaKaOU92A8ASBRJBvvfkpPuqD c8/jJygjeTs6+y40sR0u547LuhlBLtmn1Lj/JOMGo6CGqmqoWYBAYwjlOFmMuRtKkdVk QYf9bEMV2PLAfn004U8fpQv/Vq85KVfnK5u0mMukE05x3iyWzX922ZmVHYV0lUKlDCFl DxLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=DTXJINGX; 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 k72si35457810pge.95.2019.07.31.05.38.35; Wed, 31 Jul 2019 05:38:51 -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=DTXJINGX; 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 S1728406AbfGaKU3 (ORCPT + 99 others); Wed, 31 Jul 2019 06:20:29 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:32944 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728210AbfGaKUY (ORCPT ); Wed, 31 Jul 2019 06:20:24 -0400 Received: by mail-pl1-f194.google.com with SMTP id c14so30217877plo.0 for ; Wed, 31 Jul 2019 03:20:23 -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=RQGFkwgFaLnGGoQ1NvDOCDLZIEZUzuJI5zevIe71AxU=; b=DTXJINGXVoTql1fXQHHPFsg3EipbEhbHQzDr6FeRofUSP/OzviQIKQg+49YLikdEqQ YjNM5/uykn2qAyF0kVd/+4V/lByaAjL4OlR1muQrRUKLmQ3xs48e9VAQruzJToarL/XU 3YIZuGVXB1XvgHJh22L/KCNzYkMI96K7Qz0es= 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=RQGFkwgFaLnGGoQ1NvDOCDLZIEZUzuJI5zevIe71AxU=; b=I9Zrx6DHye6bg8+yAEO8rtTTlAGdL8tG84K/9Lc9RMLgJa/PNbxO3c5utajxm8QMMA gShOYJccYDqBE+gL9dq5tnn/ReRonjicbBL+WqPpaIrMgl7op/fkY2cKorokseX/4KrP R4iEMsFEBON7kQewkH+6fjRom627OVNLe82jhEMZJmR8v1Tjnu/oua/GQA3eYWnrmrtQ +jo/Qdo3c08fYPuSayrSsDwKXl3U4rkCRihwULHGEILd9UUelf1BTTBxJnav4vUCKiXq KkJFF8Sssu5mac5HTa3SL1mIU2bzw9iTbZk7aPC1a1e6m6hzlV1nNGi1OJOvXJCQuIAy xuAw== X-Gm-Message-State: APjAAAUSwBZC1o9PKOw3sGfe9i9auTw+AEIXM/XRXjc/96MvZ1OQbImu LrdWiCZkhfBMC1kAoh9qVtjTEw== X-Received: by 2002:a17:902:2926:: with SMTP id g35mr119247923plb.269.1564568423495; Wed, 31 Jul 2019 03:20:23 -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.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Jul 2019 03:20:22 -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 3/5] phy: sr-usb: Set phy ports Date: Wed, 31 Jul 2019 15:49:53 +0530 Message-Id: <1564568395-9980-4-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 set phy ports value in xlate handler which is taken from second argument of PHY phandle. Signed-off-by: Srinath Mannam --- drivers/phy/broadcom/phy-bcm-sr-usb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/phy/broadcom/phy-bcm-sr-usb.c b/drivers/phy/broadcom/phy-bcm-sr-usb.c index fe6c589..5274e45 100644 --- a/drivers/phy/broadcom/phy-bcm-sr-usb.c +++ b/drivers/phy/broadcom/phy-bcm-sr-usb.c @@ -278,9 +278,16 @@ static struct phy *bcm_usb_phy_xlate(struct device *dev, if (WARN_ON(phy_idx > 1)) return ERR_PTR(-ENODEV); + if (args->args[1]) + phy_set_phy_ports(phy_cfg[phy_idx].phy, args->args[1]); + return phy_cfg[phy_idx].phy; - } else + } else { + if (args->args[0]) + phy_set_phy_ports(phy_cfg->phy, args->args[0]); + return phy_cfg->phy; + } } static int bcm_usb_phy_create(struct device *dev, struct device_node *node, -- 2.7.4