Re: [PATCH 1/2] extcon: add driver for Intel USB mux

2015-12-02 Thread David Cohen
Hi Heikki, On Wed, Dec 02, 2015 at 12:27:10PM +0200, Heikki Krogerus wrote: > Hi David, > > > > > > +void intel_usb_mux_unregister(struct intel_usb_mux *mux) > > > +{ > > > > There are still 2 pending comments for this unregister function: > > > > 1) How about a protection against unbalanced

Re: [PATCH 1/2] extcon: add driver for Intel USB mux

2015-12-02 Thread Heikki Krogerus
Hi David, > > +void intel_usb_mux_unregister(struct intel_usb_mux *mux) > > +{ > > There are still 2 pending comments for this unregister function: > > 1) How about a protection against unbalanced unregistering? In case an > user mistakenly unregisters twice or unregisters without a previous >

Re: [PATCH 1/2] extcon: add driver for Intel USB mux

2015-12-01 Thread Felipe Balbi
Hi, David Cohen writes: > Hi Felipe, > > On Tue, Dec 01, 2015 at 02:34:34PM -0600, Felipe Balbi wrote: > > [snip] > >> > +EXPORT_SYMBOL_GPL(intel_usb_mux_register); >> > + >> > +void intel_usb_mux_unregister(struct intel_usb_mux *mux) >> > +{ >> > + extcon_unregister_notifier(&mux->edev, EXTCON

Re: [PATCH 1/2] extcon: add driver for Intel USB mux

2015-12-01 Thread David Cohen
Hi Felipe, On Tue, Dec 01, 2015 at 02:34:34PM -0600, Felipe Balbi wrote: [snip] > > +EXPORT_SYMBOL_GPL(intel_usb_mux_register); > > + > > +void intel_usb_mux_unregister(struct intel_usb_mux *mux) > > +{ > > + extcon_unregister_notifier(&mux->edev, EXTCON_USB_HOST, &mux->nb); > > + extcon_dev

Re: [PATCH 1/2] extcon: add driver for Intel USB mux

2015-12-01 Thread Felipe Balbi
Hi, Heikki Krogerus writes: > Several Intel PCHs and SOCs have an internal mux that is > used to share one USB port between USB Device Controller and > xHCI. The mux is normally handled by System FW/BIOS, but not > always. For those platforms where the FW does not take care > of the mux, this dr

Re: [PATCH 1/2] extcon: add driver for Intel USB mux

2015-12-01 Thread David Cohen
Hi Heikki, Follow my comments below. On Tue, Dec 01, 2015 at 03:32:37PM +0200, Heikki Krogerus wrote: > Several Intel PCHs and SOCs have an internal mux that is > used to share one USB port between USB Device Controller and > xHCI. The mux is normally handled by System FW/BIOS, but not > always.

[PATCH 1/2] extcon: add driver for Intel USB mux

2015-12-01 Thread Heikki Krogerus
Several Intel PCHs and SOCs have an internal mux that is used to share one USB port between USB Device Controller and xHCI. The mux is normally handled by System FW/BIOS, but not always. For those platforms where the FW does not take care of the mux, this driver is needed. Signed-off-by: Heikki Kr