All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Karoly Pados" <pados@pados.hu>
To: "Oliver Neukum" <oneukum@suse.com>, "Johan Hovold" <johan@kernel.org>
Cc: "Loic Poulain" <loic.poulain@linaro.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] USB: serial: cp210x: Fix GPIO in autosuspend
Date: Tue, 19 Mar 2019 17:12:25 +0000	[thread overview]
Message-ID: <c936ea8404f192276e0a42d9da0b7863@pados.hu> (raw)
In-Reply-To: <1552994106.14757.34.camel@suse.com>

Hi Oliver,

USB suspend does not turn off power. Your concerns about the situations you list
are valid, but my patch is for another problem. Not for what happens
when power is lost, but because the user couldn't use the GPIO lines even if
power was on and continous, due to the kernel automatically putting the device into
suspend and then all usb messages failed in this case.

Karoly

March 19, 2019 12:26 PM, "Oliver Neukum" <oneukum@suse.com> wrote:

> On Di, 2019-03-19 at 11:36 +0100, Johan Hovold wrote:
> 
>> On Mon, Feb 18, 2019 at 10:17:12AM +0100, Oliver Neukum wrote:
>> On So, 2019-02-17 at 18:59 +0100, Karoly Pados wrote:
>>> Current GPIO code in cp210x fails to take USB autosuspend into account,
>>> making it practically impossible to use GPIOs with autosuspend enabled
>>> without user configuration. Fix this like for ftdi_sio in a previous patch.
>>> Tested on a CP2102N.
>> your patch is looking good to me, but I am afraid there are issues.
>> How do the GPIO lines on the device interact with USB reset and system
>> suspend?
>> 
>> What was your concern here, Oliver?
> 
> If you have a device resetting or losing power (for reset_resume) the
> GPIO lines will revert to the default. But that change is not reported
> to user space, is it?
> So the original patch is correct, but there are more situations rather
> than suspend which could trigger the problem.
> 
> Regards
> Oliver

WARNING: multiple messages have this Message-ID (diff)
From: Karoly Pados <pados@pados.hu>
To: Oliver Neukum <oneukum@suse.com>, Johan Hovold <johan@kernel.org>
Cc: Loic Poulain <loic.poulain@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: [v2] USB: serial: cp210x: Fix GPIO in autosuspend
Date: Tue, 19 Mar 2019 17:12:25 +0000	[thread overview]
Message-ID: <c936ea8404f192276e0a42d9da0b7863@pados.hu> (raw)

Hi Oliver,

USB suspend does not turn off power. Your concerns about the situations you list
are valid, but my patch is for another problem. Not for what happens
when power is lost, but because the user couldn't use the GPIO lines even if
power was on and continous, due to the kernel automatically putting the device into
suspend and then all usb messages failed in this case.

Karoly

March 19, 2019 12:26 PM, "Oliver Neukum" <oneukum@suse.com> wrote:

> On Di, 2019-03-19 at 11:36 +0100, Johan Hovold wrote:
> 
>> On Mon, Feb 18, 2019 at 10:17:12AM +0100, Oliver Neukum wrote:
>> On So, 2019-02-17 at 18:59 +0100, Karoly Pados wrote:
>>> Current GPIO code in cp210x fails to take USB autosuspend into account,
>>> making it practically impossible to use GPIOs with autosuspend enabled
>>> without user configuration. Fix this like for ftdi_sio in a previous patch.
>>> Tested on a CP2102N.
>> your patch is looking good to me, but I am afraid there are issues.
>> How do the GPIO lines on the device interact with USB reset and system
>> suspend?
>> 
>> What was your concern here, Oliver?
> 
> If you have a device resetting or losing power (for reset_resume) the
> GPIO lines will revert to the default. But that change is not reported
> to user space, is it?
> So the original patch is correct, but there are more situations rather
> than suspend which could trigger the problem.
> 
> Regards
> Oliver

  parent reply	other threads:[~2019-03-19 17:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-17 17:59 [PATCH v2] USB: serial: cp210x: Fix GPIO in autosuspend Karoly Pados
2019-02-17 17:59 ` [v2] " Karoly Pados
2019-02-18  9:17 ` [PATCH v2] " Oliver Neukum
2019-02-18  9:17   ` [v2] " Oliver Neukum
2019-03-19 10:36   ` [PATCH v2] " Johan Hovold
2019-03-19 10:36     ` [v2] " Johan Hovold
2019-03-19 11:15     ` [PATCH v2] " Oliver Neukum
2019-03-19 11:15       ` [v2] " Oliver Neukum
2019-03-19 13:14       ` [PATCH v2] " Johan Hovold
2019-03-19 13:14         ` [v2] " Johan Hovold
2019-03-19 17:19       ` [PATCH v2] " Karoly Pados
2019-03-19 17:19         ` [v2] " Karoly Pados
2019-03-20  9:11         ` [PATCH v2] " Johan Hovold
2019-03-20  9:11           ` [v2] " Johan Hovold
2019-03-19 17:12     ` Karoly Pados [this message]
2019-03-19 17:12       ` Karoly Pados
2019-02-20  9:23 ` [PATCH v2] " Johan Hovold
2019-02-20  9:23   ` [v2] " Johan Hovold

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=c936ea8404f192276e0a42d9da0b7863@pados.hu \
    --to=pados@pados.hu \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=oneukum@suse.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.