Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1281599

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

From Heikki Krogerus <heikki.krogerus@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] extcon: add driver for Intel USB mux
Date 2015-12-02 11:30 +0100
Message-ID <qBcPE-5Tr-31@gated-at.bofh.it> (permalink)
References <qATjY-1Oq-9@gated-at.bofh.it> <qATjY-1Oq-19@gated-at.bofh.it> <qAZIK-5Y4-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] extcon: add driver for Intel USB mux Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-12-01 14:40 +0100
  Re: [PATCH 1/2] extcon: add driver for Intel USB mux David Cohen <david.a.cohen@linux.intel.com> - 2015-12-01 21:30 +0100
    Re: [PATCH 1/2] extcon: add driver for Intel USB mux Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-12-02 11:30 +0100
      Re: [PATCH 1/2] extcon: add driver for Intel USB mux David Cohen <david.a.cohen@linux.intel.com> - 2015-12-02 19:20 +0100
  Re: [PATCH 1/2] extcon: add driver for Intel USB mux Felipe Balbi <balbi@ti.com> - 2015-12-01 21:40 +0100
    Re: [PATCH 1/2] extcon: add driver for Intel USB mux David Cohen <david.a.cohen@linux.intel.com> - 2015-12-01 22:00 +0100
      Re: [PATCH 1/2] extcon: add driver for Intel USB mux Felipe Balbi <balbi@ti.com> - 2015-12-01 22:30 +0100

csiph-web