From: David Lechner <david@lechnology.com>
To: Axel Haslam <ahaslam@baylibre.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
Alan Stern <stern@rowland.harvard.edu>,
Kevin Hilman <khilman@kernel.org>,
kishon@ti.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [v5,3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS
Date: Mon, 21 Nov 2016 10:29:14 -0600 [thread overview]
Message-ID: <43bd46ae-cf13-a5c2-6483-ba759cdc9b3c@lechnology.com> (raw)
In-Reply-To: <CAKXjFTMFF=qRkJzOLkzGWgmFMd3tUeVqg6c0=Ocr3Z7eBq4NYQ@mail.gmail.com>
On 11/21/2016 04:22 AM, Axel Haslam wrote:
> Hi David,
>
> Thanks for the review,
>
You're welcome.
>>>
>>> @@ -160,15 +212,41 @@ static void ohci_da8xx_ocic_handler(struct
>>> da8xx_ohci_root_hub *hub,
>>> hub->set_power(port, 0);
>>> }
>>>
>>> +static int ohci_da8xx_regulator_event(struct notifier_block *nb,
>>> + unsigned long event, void *data)
>>> +{
>>> + struct da8xx_ohci_hcd *da8xx_ohci =
>>> + container_of(nb, struct da8xx_ohci_hcd,
>>> nb);
>>> + struct device *dev = da8xx_ohci->hcd->self.controller;
>>> +
>>> + if (event & REGULATOR_EVENT_OVER_CURRENT) {
>>> + dev_warn(dev, "over current event\n");
>>
>>
>> Won't this result in duplicate overcurrent warnings in the kernel log? It
>> seems like in previous version of this patch series, we would get an
>> overcurrent error from the core usb driver.
>
> you mean in the regulator driver? i did not make changes to core usb.
> but, no, i did not add a print in the fixed regulator driver itself. Since
> the regulator is a separate driver, and could be implemented with or without
> a trace, i think its better to leave this print. It shows that the usb driver
> has well received the notification.
>
No, I mean in drivers/usb/core/hub.c. There is
if (status & USB_PORT_STAT_OVERCURRENT)
dev_err(&port_dev->dev, "over-current condition\n");
and
if (status & HUB_STATUS_OVERCURRENT)
dev_err(hub_dev, "over-current condition\n");
In ohci_da8xx_hub_control(), we are setting RH_PS_POCI and RH_PS_OCIC,
so these messages will be printed via the core hub driver. We don't need
to print another message from the same event.
next prev parent reply other threads:[~2016-11-21 16:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 14:40 [PATCH v5 0/5] USB: ohci-da8xx: Add device tree support Axel Haslam
2016-11-14 14:40 ` [PATCH v5 1/5] USB: ohci: da8xx: use ohci priv data instead of globals Axel Haslam
2016-11-20 2:58 ` [v5,1/5] " David Lechner
2016-11-21 9:07 ` Axel Haslam
2016-11-14 14:41 ` [PATCH v5 2/5] USB: ohci: da8xx: Add wrappers for platform callbacks Axel Haslam
2016-11-14 14:41 ` [PATCH v5 3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS Axel Haslam
2016-11-20 3:31 ` [v5,3/5] " David Lechner
2016-11-20 3:37 ` David Lechner
2016-11-21 10:22 ` Axel Haslam
2016-11-21 16:29 ` David Lechner [this message]
2016-11-22 14:18 ` Axel Haslam
[not found] ` <20161114144103.12120-1-ahaslam-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2016-11-14 14:41 ` [PATCH v5 4/5] USB: ohci: da8xx: Add devicetree bindings Axel Haslam
2016-11-14 14:41 ` Axel Haslam
[not found] ` <20161114144103.12120-5-ahaslam-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2016-11-16 13:26 ` Rob Herring
2016-11-16 13:26 ` Rob Herring
2016-11-14 14:41 ` [PATCH v5 5/5] USB: ohci: da8xx: Allow probing from DT Axel Haslam
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=43bd46ae-cf13-a5c2-6483-ba759cdc9b3c@lechnology.com \
--to=david@lechnology.com \
--cc=ahaslam@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@kernel.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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.