lkml.org 
[lkml]   [2015]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] extcon: add driver for Intel USB mux
Hi David,

<snip>

> > +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
> registering.

True. You already pointed that out in our off-list thread, but I
forgot. Sorry about that.

> 2) When unregistering, you need to clear the bit CFG0_SW_IDPIN_EN to
> set mux to automatic mode again. Or maybe you could save CFG0's initial
> value and set it again here. Anyway, when unregistering the mux driver
> you need to make sure the mux goes back to its original configuration.

This one is already been taken care of..

> > + extcon_unregister_notifier(&mux->edev, EXTCON_USB_HOST, &mux->nb);
> > + extcon_dev_unregister(&mux->edev);
> > + writel(mux->cfg0_ctx, mux->regs + INTEL_MUX_CFG0);

^^^^^^^^^^^^^^^^^^^^


Thanks,

--
heikki


\
 
 \ /
  Last update: 2015-12-02 12:01    [W:0.095 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site