Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1122477ybg; Thu, 11 Jun 2020 01:17:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/ycvmukonFHkh/+RzxNpAH0b+BbUdMKtIMpQxWqC0O9gjYY797kVKZzMTyo8SZZuhWVs5 X-Received: by 2002:a05:6402:1285:: with SMTP id w5mr6080249edv.73.1591863431823; Thu, 11 Jun 2020 01:17:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591863431; cv=none; d=google.com; s=arc-20160816; b=xca5zbULGhQazALmUzjA45wojTfYv6VK5RFQcU0krkfMbJWVgtH6FqK4yf0bkRX6rn fU/IMVm+yxZiUJS2w3aQAkiUzfVCRQIDA0aeKVkUyKJ7f8sPJUQuMXqZ/2jCaZmFnra/ omLHcD42zljAUCKYoUJXSkeB4cPDVJopiWukUV7LQy9r8ctoexMeivdBFVrrhjCcJWNQ A/yzrKuKGtx3VogCVdrOv7dIYlNvqGoh5aUh/YqryOhRJ6lO2FlgYfeROqf0QMTcyTsG 4Ww+7YPe7RCCSvc7kyzMALDl3TktFTgGWgvvQ64Mtxb9XBnVCYrkgcfG/5K4hXgn6tPk lImQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=ArI9bZgOyq2hZGnOoYf2HZEMYPseRGsWMHW1tWLXVIM=; b=OlPXyEr8Dpo12GP35yr9mbv/fKtV8wZG36+mds3kH65XJW4rnybfPI8Aybbtxn7jDX IA02jHzCtoqyFoAboAkv8lAytv1cYD9ZkUuQ+dTSLPPFYHTjHwpMQqifkwv+mqLQvzmU A7GazrOfXkbGe1YuVCPyxIWjGgVExgKm1c/31gkrAgDFk46+UlQZ9uVBgx1rheBuEt2Q eDW6UHIiRe6K9XUQfLKlFuO8mgEdzMFnxP2jQQ4Kqt9/Tlk3nPu3JyQsUQ5WiVlUAxpU LeGVQlTeuRw43cLhZIzFSUIoRoJ4RI7kTVU5jQ9N0eJ+qvYrkoVaGYj7xj8yfprxDBQw hBkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn4si1433082ejb.124.2020.06.11.01.16.48; Thu, 11 Jun 2020 01:17:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726790AbgFKIM5 (ORCPT + 99 others); Thu, 11 Jun 2020 04:12:57 -0400 Received: from mga06.intel.com ([134.134.136.31]:37101 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726626AbgFKIM4 (ORCPT ); Thu, 11 Jun 2020 04:12:56 -0400 IronPort-SDR: EzcRdxcBb3j0v8WYfR/dZrEcwkFUjz/RZ2B2/PQ+7B7LyY/GgZH37/ngRSVdozuUTruPrQWbGk 0E2fKPKv8Ovw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2020 01:12:55 -0700 IronPort-SDR: WU+un76Q4SR2mxZ2hVUP87EHbCpgbHM1YQB+V4UZ7GoQ4Vh+DrugYRjRXu5t7nLe/bA4nQyNHE fvEzdvppBlXA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,499,1583222400"; d="scan'208";a="447838730" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga005.jf.intel.com with ESMTP; 11 Jun 2020 01:12:52 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jjIKU-00CJMC-OH; Thu, 11 Jun 2020 11:12:54 +0300 Date: Thu, 11 Jun 2020 11:12:54 +0300 From: Andy Shevchenko To: "Ramuthevar,Vadivel MuruganX" Cc: linux-kernel@vger.kernel.org, balbi@kernel.org, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, robh@kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, cheol.yong.kim@intel.com, qi-ming.wu@intel.com, yin1.li@intel.com Subject: Re: [PATCH v2 2/2] usb: phy: Add USB3 PHY support for Intel LGM SoC Message-ID: <20200611081254.GR2428291@smile.fi.intel.com> References: <20200611021246.3250-1-vadivel.muruganx.ramuthevar@linux.intel.com> <20200611021246.3250-3-vadivel.muruganx.ramuthevar@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200611021246.3250-3-vadivel.muruganx.ramuthevar@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 11, 2020 at 10:12:46AM +0800, Ramuthevar,Vadivel MuruganX wrote: > From: Ramuthevar Vadivel Murugan > > Add support for USB PHY on Intel LGM SoC. ... > +static int get_flipped(struct tca_apb *ta, bool *flipped) > +{ > + union extcon_property_value property; > + int ret; > + > + ret = extcon_get_property(ta->phy.edev, EXTCON_USB_HOST, > + EXTCON_PROP_USB_TYPEC_POLARITY, &property); > + if (ret) { > + dev_err(ta->phy.dev, "no polarity property from extcon\n"); > + return false; return ret; > + } > + > + *flipped = property.intval; > + > + return *flipped; return 0; > +} ...I suppose it should be as above. ... > + ret = readl_poll_timeout(ctrl1, val, val & SRAM_INIT_DONE, > + 10, 10 * 1000); On one line easier to read. > + if (ret) { > + dev_err(ta->phy.dev, "SRAM init failed, 0x%x\n", val); > + return ret; > + } ... > +static int phy_set_vbus(struct usb_phy *phy, int on) > +{ > + struct tca_apb *ta = container_of(phy, struct tca_apb, phy); > + int ret = 0; Assignment is redundant. > + > + if (on) { > + ret = regulator_enable(ta->vbus); > + if (ret) > + dev_err(ta->phy.dev, "regulator not enabled\n"); > + } else { > + ret = regulator_disable(ta->vbus); > + if (ret) > + dev_err(ta->phy.dev, "regulator not disabled\n"); > + } > + > + return ret; > +} ... > + ret = get_flipped(ta, &flipped); > + if (!ret) > + dev_err(ta->phy.dev, "no polarity property from extcon\n"); This should be fixed accordingly. ... > + dev_info(ta->phy.dev, "connected%s\n", > + flipped ? " flipped" : ""); One line. -- With Best Regards, Andy Shevchenko