All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Puschmann <pp@emlix.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Philipp Puschmann <philipp.puschmann@emlix.com>,
	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
Subject: Re: [PATCH v2,2/2] usb: chipidea: imx: set power polarity
Date: Mon, 21 Jan 2019 18:57:51 +0100	[thread overview]
Message-ID: <b95de83f-b0fe-b31f-22c9-a0dfdc2ff078@emlix.com> (raw)
In-Reply-To: <22968f8c-0a62-7046-c46f-ce7dc8981499@cogentembedded.com>

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 <philipp.puschmann@emlix.com>
>> ---
>>
>> 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
> 

WARNING: multiple messages have this Message-ID (diff)
From: Philipp Puschmann <pp@emlix.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Philipp Puschmann <philipp.puschmann@emlix.com>,
	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
Subject: [v2,2/2] usb: chipidea: imx: set power polarity
Date: Mon, 21 Jan 2019 18:57:51 +0100	[thread overview]
Message-ID: <b95de83f-b0fe-b31f-22c9-a0dfdc2ff078@emlix.com> (raw)

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 <philipp.puschmann@emlix.com>
>> ---
>>
>> 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
>

  reply	other threads:[~2019-01-21 18:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 12:31 [PATCH 1/2] dt-bindings: usb: ci-hdrc-usb2: add property power-active-high Philipp Puschmann
2019-01-15 12:31 ` [1/2] " Philipp Puschmann
2019-01-15 12:31 ` [PATCH 2/2] usb: chipidea: imx: set power polarity Philipp Puschmann
2019-01-15 12:31   ` [2/2] " Philipp Puschmann
2019-01-16 10:51 ` [PATCH v2,1/2] dt-bindings: usb: ci-hdrc-usb2: add property power-active-high Philipp Puschmann
2019-01-16 10:51   ` [v2,1/2] " Philipp Puschmann
2019-01-16 10:51   ` [PATCH v2,2/2] usb: chipidea: imx: set power polarity Philipp Puschmann
2019-01-16 10:51     ` [v2,2/2] " Philipp Puschmann
2019-01-16 11:11     ` [PATCH v3 1/2] dt-bindings: usb: ci-hdrc-usb2: add property power-active-high Philipp Puschmann
2019-01-16 11:11       ` [v3,1/2] " Philipp Puschmann
2019-01-16 11:11       ` [PATCH v3 2/2] usb: chipidea: imx: set power polarity Philipp Puschmann
2019-01-16 11:11         ` [v3,2/2] " Philipp Puschmann
2019-01-16 19:51       ` [PATCH v3 1/2] dt-bindings: usb: ci-hdrc-usb2: add property power-active-high Rob Herring
2019-01-16 19:51         ` [v3,1/2] " Rob Herring
2019-01-16 19:51         ` [PATCH v3 1/2] " Rob Herring
2019-01-17  7:01       ` Peter Chen
2019-01-17  7:01         ` [v3,1/2] " Peter Chen
2019-01-21 18:00         ` [PATCH v3 1/2] " Philipp Puschmann
2019-01-21 18:00           ` [v3,1/2] " Philipp Puschmann
2019-01-22  7:50           ` [PATCH v3 1/2] " Peter Chen
2019-01-22  7:50             ` [v3,1/2] " Peter Chen
2019-01-16 16:32     ` [PATCH v2,2/2] usb: chipidea: imx: set power polarity Sergei Shtylyov
2019-01-16 16:32       ` [v2,2/2] " Sergei Shtylyov
2019-01-21 17:57       ` Philipp Puschmann [this message]
2019-01-21 17:57         ` Philipp Puschmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b95de83f-b0fe-b31f-22c9-a0dfdc2ff078@emlix.com \
    --to=pp@emlix.com \
    --cc=Peter.Chen@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=philipp.puschmann@emlix.com \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.