Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6511258imu; Mon, 21 Jan 2019 10:08:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN4im6gStd59RTrmuPQDbGHAbUkM5zg9/6tjnnrLPBFTgWj1tYB+bLLEl2sXx+D91blGfKRa X-Received: by 2002:a17:902:442:: with SMTP id 60mr29614809ple.73.1548094087252; Mon, 21 Jan 2019 10:08:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548094087; cv=none; d=google.com; s=arc-20160816; b=TYyJD3u8+vyNADAZT6gbqm0AjNJ+ZN/VEpkC2xrjgpHKmKnu5IgWwOvxW6WGzbz408 lqW0To7UslHsj/FVeOwP+vFNL1hYEblqNswvW9u7/P9IjDWvRRTA5WwZk66nVsVkQQUT bpJy71oQ5/d/0iv9QL8KJtEZRDgPEAhtVCef3DIfoBsgAh/4+tRIVmQaWCRlI+ejbGwi YZRObvGCKQ+WvUJDM3rbTIgHG5y597iEco61HRNcBstE0eMdb0NtDgDXQrkTAjt4Rpx5 AjYcdNzvvjGaJN1NVPMI8UUa0EYzHCM9oQv+Tb7SelvR2iPpbV24OK/+rELkM9GzdHVU pJRA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=hd2TMB/DwkIuZRhtvIPpdv06Z0oqupmA7/OMc1YMeEI=; b=fXsh2nopuqz8RVTn1SYQVoYjSQdeX73vvaKpgU84wZvKaAbWZreQOkqFOpDugGNmnV J1pC32X6OUpQAY3qSmTKy7MCD44QtEaNmCwpzv2rWn2xobMxa/QQDZ4Ec5UPeh31nqu0 9noAlP8QFpMrY2c821kCmDXmSFrxNUydDSthGj0PshJZWemedkBnNtXrA4w4U/l4nFvN XhTiskElwShU81bDtolXwIdjefFw0emfYkvcG6zPc3UWgaG165M/ynAs6QMbGIyk32TH ZxLnMm0YlATpUBMasiZUudJnbHtLUbkjkVXXdHtaPWEIkYxhWVX0uZ8owx7hF7qlskCI KWDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7si12914579plz.118.2019.01.21.10.07.51; Mon, 21 Jan 2019 10:08:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727752AbfAUSGm (ORCPT + 99 others); Mon, 21 Jan 2019 13:06:42 -0500 Received: from mx1.emlix.com ([46.4.235.150]:55384 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725996AbfAUSGl (ORCPT ); Mon, 21 Jan 2019 13:06:41 -0500 X-Greylist: delayed 527 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Jan 2019 13:06:40 EST Received: from mailer.emlix.com (unknown [81.20.119.6]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 134AA25F0A8; Mon, 21 Jan 2019 18:57:52 +0100 (CET) Subject: Re: [PATCH v2,2/2] usb: chipidea: imx: set power polarity To: Sergei Shtylyov , Philipp Puschmann , gregkh@linuxfoundation.org Cc: robh+dt@kernel.org, mark.rutland@arm.com, Peter.Chen@nxp.com, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190115123113.20577-1-philipp.puschmann@emlix.com> <20190116105103.28842-1-philipp.puschmann@emlix.com> <20190116105103.28842-2-philipp.puschmann@emlix.com> <22968f8c-0a62-7046-c46f-ce7dc8981499@cogentembedded.com> From: Philipp Puschmann Openpgp: preference=signencrypt Message-ID: Date: Mon, 21 Jan 2019 18:57:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <22968f8c-0a62-7046-c46f-ce7dc8981499@cogentembedded.com> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! Am 16.01.19 um 17:32 schrieb Sergei Shtylyov: > Hello! > > On 01/16/2019 01:51 PM, Philipp Puschmann wrote: > >> This patch adds support to set the power line polarity for i.MX6q/dl. >> >> To let the USB controller control the power it may be necessary to configure >> the polarity of the power line. So far the polarity was configured >> by Bootloader or alternatively the power line was muxed as gpio and >> driven by a regulator. >> >> Signed-off-by: Philipp Puschmann >> --- >> >> V2: fixed wrong variable name ... >> >> --- >> drivers/usb/chipidea/ci_hdrc_imx.c | 3 +++ >> drivers/usb/chipidea/ci_hdrc_imx.h | 1 + >> drivers/usb/chipidea/usbmisc_imx.c | 4 ++++ >> 3 files changed, 8 insertions(+) >> >> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c >> index e81de9ca8729..32dc120680fa 100644 >> --- a/drivers/usb/chipidea/ci_hdrc_imx.c >> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c >> @@ -152,6 +152,9 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev) >> dev_warn(dev, "No over current polarity defined\n"); >> } >> >> + if (of_find_property(np, "power-active-high", NULL)) > > How about of_property_read_bool()? Good idea. I will send a patch v4 in next days. > >> + data->pwr_pol = 1; >> + >> if (of_find_property(np, "external-vbus-divider", NULL)) >> data->evdo = 1; >> > [...] > > MBR, Sergei >