From patchwork Sun Dec 2 21:33:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 10708383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E79F17F0 for ; Sun, 2 Dec 2018 21:33:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C8CD2A724 for ; Sun, 2 Dec 2018 21:33:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CD6D2A72A; Sun, 2 Dec 2018 21:33:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D68182A730 for ; Sun, 2 Dec 2018 21:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725791AbeLBVdx (ORCPT ); Sun, 2 Dec 2018 16:33:53 -0500 Received: from antares.kleine-koenig.org ([94.130.110.236]:38794 "EHLO antares.kleine-koenig.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbeLBVdw (ORCPT ); Sun, 2 Dec 2018 16:33:52 -0500 Received: by antares.kleine-koenig.org (Postfix, from userid 1000) id D8BB04B7A93; Sun, 2 Dec 2018 22:33:47 +0100 (CET) From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Peter Chen , Shawn Guo Cc: Fabio Estevam , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, Matthew Starr Subject: [PATCH v2 2/3] usb: chipidea: imx: Warn if oc polarity isn't specified Date: Sun, 2 Dec 2018 22:33:24 +0100 Message-Id: <20181202213325.26017-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181202213325.26017-1-u.kleine-koenig@pengutronix.de> References: <20181202213325.26017-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The polarity of the over current detection pin isn't configured on i.MX6/7 if it's unspecified in the device tree. So the actual configuration depends on bootloader behavior which is bad. So encourage users to fix their device tree by issuing a warning in this case. Signed-off-by: Uwe Kleine-König --- drivers/usb/chipidea/ci_hdrc_imx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index 80b4e4ef9b68..3dcfd0d97f94 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -141,6 +141,8 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev) } else if (of_find_property(np, "over-current-active-low", NULL)) { data->oc_pol_active_low = 1; data->oc_pol_configured = 1; + } else { + dev_warn(dev, "No over current polarity defined\n"); } if (of_find_property(np, "external-vbus-divider", NULL))