Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp12448371ybl; Sat, 28 Dec 2019 12:37:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzT07nho13FlKA/a9KKdF4YcgvPZ3th5+tCsTcU03Tp9QEoiqJWF6O2oMoSY8y0CJfP0E9v X-Received: by 2002:a9d:5784:: with SMTP id q4mr8266855oth.278.1577565462020; Sat, 28 Dec 2019 12:37:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577565462; cv=none; d=google.com; s=arc-20160816; b=yWqdA3oFeBwH0B8EF7jzTqKNVpq1H8n2VciayaGX/cTZUzsJSGa503pLQHrgn8Rfcn 2ESuAcRqu4hZim0/f5rdK+KXyowPTlkVqLaUW6ATjV2Syr8qyotYlml81AeJnZWgXS3A kyRIF4A+TeV+FLDU9VrEfbpxmfE7OBSeOaKC78ILSBuSpbKrypChlvQMaKPbTWTqhVao G122jFeDnjpz/d/3Fd592JLQWNJ/jZjYJ0avukSOhGwz3bKoJjOnLSHS8gGM0v9ExQzf w2l7+wzu40VRYRL+V1GM66tckQ766qJ1k01oNwivD6h1n0/HN8n4COZAUAD8QlecI/3z g2qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=i7a3lxaMDdErpekYLxYZCSpGszEjiHMz9VIU/9b2FAA=; b=Idjem5QC65wnNkUiUnKN1X16R9LbajN6KikgYSzYIcwbk1TMa7FKyhr+tCe3zuemxf MOmtUVbyoHuSxZDsNyP4e3DG3ziDC+jl0+TGKmpvdFg6yKPoWi7y1LX37O4WuvyaEIzI zFXQxTaoedL/xONkQhsLAemYadp9QZY4X1BBuXvmcRh9hyHqLx+knMoOz5tsO5Vk/i7U MXE1rxfa4xWZeP/BQgxLCzcQa05q0hv6dtTASlOu/aNrFUGTMBlwE0rl93vpAjLR+zYh S2E2R7Ul4dJErtR4Ip/5BKhYnCWztKLV1yJE+xU5+C2vziXtK6NSW0UJEQZ+bvvDmgaE vObg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rOIFu5q2; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si20815492otq.23.2019.12.28.12.37.31; Sat, 28 Dec 2019 12:37:42 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=rOIFu5q2; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbfL1Ugh (ORCPT + 99 others); Sat, 28 Dec 2019 15:36:37 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37941 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727066AbfL1UgP (ORCPT ); Sat, 28 Dec 2019 15:36:15 -0500 Received: by mail-lj1-f196.google.com with SMTP id w1so7881714ljh.5; Sat, 28 Dec 2019 12:36:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i7a3lxaMDdErpekYLxYZCSpGszEjiHMz9VIU/9b2FAA=; b=rOIFu5q20h6pfPTi2R/Hgf5zEf9HXzEYD8z6XRgs/pHcP7CZeujybQP4MbqLAPoimW 8P40MW0B1iW0bgOptXotu1Z/P1JX7E5LHvKR3Y5RyPU6oAATbCgntODNQz17e0j0/DK9 hVvqOn+3pvaxxxFpLNTOZXD6cAvfReJWyouidlIaw5B53w7ql3VekIrvF03sxl2kLkEE lBgP36kRDTBvK5meACUWnQWN6uXP1FXsrCQcqTBI5MWMKrnqtrgBtZCIPuVnNrAQaDqJ iXqcqBYYw4Lq13Kmbugpnx5aELzmA3Akmbi3BB/yJEi8NtL4912Sj9V3o9YMCRLeb3TQ sRdw== 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:mime-version:content-transfer-encoding; bh=i7a3lxaMDdErpekYLxYZCSpGszEjiHMz9VIU/9b2FAA=; b=b6FioKl5c5Z01tuqPQkUeSBPe6Y2t3RQ1Evt0ayiQst2ts57itcFb2xOTrHVjaKUth phqkZIhVtbfYuK1kmAC1nCJ6Lc1z/5Kkg8p5p5LM4V+QWjRfOCMnc30i90BdmeGCY3rS t4rePl40fuz6KlVkSXBp9Eg4SqbTVVAmDiHFZSDS6ZSKvIlMQycMxRHM4s+zgBxOTG2L PCGW89ng01uGyfnWBHp/QFW0oKesEhApekmHSBPrBQ7smWH/B0oWkcjZtRgUjIj/W+Lf rQqPBW1gLcQYFlxxO4EfEXfLC2AX+u/90nroc50oqfj5duCxbnRz/IaVdVhl7WS+2gTW tVdA== X-Gm-Message-State: APjAAAUsP74wlwq9SKHeuJw6HeJTyzR1J5dXhPFB333uxFc/6oQSKqZb m2M08ggG2BZ1qeCiy3P3fB4= X-Received: by 2002:a05:651c:1b3:: with SMTP id c19mr27544546ljn.115.1577565372641; Sat, 28 Dec 2019 12:36:12 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id d9sm15162614lja.73.2019.12.28.12.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2019 12:36:12 -0800 (PST) From: Dmitry Osipenko To: Rob Herring , Greg Kroah-Hartman , Peter Chen , Thierry Reding , Jonathan Hunter , Felipe Balbi Cc: devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 15/16] usb: chipidea: tegra: Add USB_TEGRA_PHY to driver's dependencies Date: Sat, 28 Dec 2019 23:33:57 +0300 Message-Id: <20191228203358.23490-16-digetx@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191228203358.23490-1-digetx@gmail.com> References: <20191228203358.23490-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now, when ci_hdrc_tegra kernel module is loaded, the phy_tegra_usb module is loaded too regardless of kernel's configuration. Previously this problem was masked because Tegra's EHCI driver is usually enabled in kernel's config and thus PHY driver was getting loaded because of it, but now I was making some more thorough testing and noticed that PHY's module isn't getting auto-loaded without the host driver. Note that ChipIdea's driver doesn't use any of the exported functions of phy_tegra_usb module and thus the module needs to be requested explicitly. Signed-off-by: Dmitry Osipenko --- drivers/usb/chipidea/Kconfig | 1 + drivers/usb/chipidea/ci_hdrc_tegra.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig index ae850b3fddf2..d53db520e209 100644 --- a/drivers/usb/chipidea/Kconfig +++ b/drivers/usb/chipidea/Kconfig @@ -7,6 +7,7 @@ config USB_CHIPIDEA select RESET_CONTROLLER select USB_ULPI_BUS select USB_ROLE_SWITCH + select USB_TEGRA_PHY if ARCH_TEGRA help Say Y here if your system has a dual role high speed USB controller based on ChipIdea silicon IP. It supports: diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c index 7455df0ede49..8bc11100245d 100644 --- a/drivers/usb/chipidea/ci_hdrc_tegra.c +++ b/drivers/usb/chipidea/ci_hdrc_tegra.c @@ -53,6 +53,12 @@ static int tegra_udc_probe(struct platform_device *pdev) struct tegra_udc *udc; int err; + if (IS_MODULE(CONFIG_USB_TEGRA_PHY)) { + err = request_module("phy_tegra_usb"); + if (err) + return err; + } + udc = devm_kzalloc(&pdev->dev, sizeof(*udc), GFP_KERNEL); if (!udc) return -ENOMEM; -- 2.24.0