lkml.org 
[lkml]   [2019]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/8] usb: typec: Rationalize the API for the muxes
On Mon, Jan 28, 2019 at 11:50:31AM +0200, Andy Shevchenko wrote:
> On Fri, Jan 25, 2019 at 3:18 PM Heikki Krogerus
> <heikki.krogerus@linux.intel.com> wrote:
> >
> > We can replace the second parameter that is passed to the
> > typec_mux_get() function with alt mode description
> > structure, and simply pass NULL with accessory modes.
> >
> > With accessory modes there is no need for additional
> > identification (in practice the accessory mode can only be
> > Audio Accessory if muxing is needed), only with alternate
> > modes we need to identify the exact alternate mode.
>
> > +struct typec_mux *typec_mux_get(struct device *dev,
> > + const struct typec_altmode_desc *desc)
> > {
> > struct typec_mux *mux;
> >
> > mutex_lock(&mux_lock);
> > - mux = device_connection_find_match(dev, name, NULL, typec_mux_match);
> > + mux = device_connection_find_match(dev, "typec-mux", (void *)desc,
> > + typec_mux_match);
>
> Not related to this series, but shouldn't
> device_connection_find_match() be improved to avoid dropping const
> qualifier?

I'll see if we can do that already.

thanks,

--
heikki

\
 
 \ /
  Last update: 2019-01-28 16:29    [W:0.049 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site