diff mbox series

[08/32] usb: typec: tcpm: tcpm: Remove dangling unused 'struct tcpm_altmode_ops'

Message ID 20200706133341.476881-9-lee.jones@linaro.org (mailing list archive)
State New, archived
Headers show
Series Fix the final bunch of W=1 issues in USB | expand

Commit Message

Lee Jones July 6, 2020, 1:33 p.m. UTC
Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config
configuration mechanism") pulled out the only use of 'tcpm_altmode_ops'
last year.  No need to keep it around.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
 1551 | static const struct typec_altmode_ops tcpm_altmode_ops = {
 | ^~~~~~~~~~~~~~~~

Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/typec/tcpm/tcpm.c | 51 -----------------------------------
 1 file changed, 51 deletions(-)

Comments

Hans de Goede July 6, 2020, 2 p.m. UTC | #1
Hi,

On 7/6/20 3:33 PM, Lee Jones wrote:
> Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config
> configuration mechanism") pulled out the only use of 'tcpm_altmode_ops'
> last year.  No need to keep it around.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
>   1551 | static const struct typec_altmode_ops tcpm_altmode_ops = {
>   | ^~~~~~~~~~~~~~~~
> 
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

This is necessary for adding Display port over Type-C support
on devices using the tcpm code, rather then firmware, to do
the Type-C alt-mode negotiation.

I have a local patch in my tree which adds support for this.

But Heikki did not like my approach, so that patch
(which needs the bits you are removing) never landed
upstream:

https://patchwork.kernel.org/patch/11199517/

Which is somewhat old now.

Heikki said he would look into an approach to this more to
his liking. Heikki an progress on this area?

Regards,

Hans



> ---
>   drivers/usb/typec/tcpm/tcpm.c | 51 -----------------------------------
>   1 file changed, 51 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 82b19ebd7838e..d6913eb0ea54d 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -1503,57 +1503,6 @@ static int tcpm_validate_caps(struct tcpm_port *port, const u32 *pdo,
>   	return 0;
>   }
>   
> -static int tcpm_altmode_enter(struct typec_altmode *altmode, u32 *vdo)
> -{
> -	struct tcpm_port *port = typec_altmode_get_drvdata(altmode);
> -	u32 header;
> -
> -	mutex_lock(&port->lock);
> -	header = VDO(altmode->svid, vdo ? 2 : 1, CMD_ENTER_MODE);
> -	header |= VDO_OPOS(altmode->mode);
> -
> -	tcpm_queue_vdm(port, header, vdo, vdo ? 1 : 0);
> -	mod_delayed_work(port->wq, &port->vdm_state_machine, 0);
> -	mutex_unlock(&port->lock);
> -
> -	return 0;
> -}
> -
> -static int tcpm_altmode_exit(struct typec_altmode *altmode)
> -{
> -	struct tcpm_port *port = typec_altmode_get_drvdata(altmode);
> -	u32 header;
> -
> -	mutex_lock(&port->lock);
> -	header = VDO(altmode->svid, 1, CMD_EXIT_MODE);
> -	header |= VDO_OPOS(altmode->mode);
> -
> -	tcpm_queue_vdm(port, header, NULL, 0);
> -	mod_delayed_work(port->wq, &port->vdm_state_machine, 0);
> -	mutex_unlock(&port->lock);
> -
> -	return 0;
> -}
> -
> -static int tcpm_altmode_vdm(struct typec_altmode *altmode,
> -			    u32 header, const u32 *data, int count)
> -{
> -	struct tcpm_port *port = typec_altmode_get_drvdata(altmode);
> -
> -	mutex_lock(&port->lock);
> -	tcpm_queue_vdm(port, header, data, count - 1);
> -	mod_delayed_work(port->wq, &port->vdm_state_machine, 0);
> -	mutex_unlock(&port->lock);
> -
> -	return 0;
> -}
> -
> -static const struct typec_altmode_ops tcpm_altmode_ops = {
> -	.enter = tcpm_altmode_enter,
> -	.exit = tcpm_altmode_exit,
> -	.vdm = tcpm_altmode_vdm,
> -};
> -
>   /*
>    * PD (data, control) command handling functions
>    */
>
Lee Jones July 6, 2020, 2:20 p.m. UTC | #2
On Mon, 06 Jul 2020, Hans de Goede wrote:

> Hi,
> 
> On 7/6/20 3:33 PM, Lee Jones wrote:
> > Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config
> > configuration mechanism") pulled out the only use of 'tcpm_altmode_ops'
> > last year.  No need to keep it around.
> > 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
> >   1551 | static const struct typec_altmode_ops tcpm_altmode_ops = {
> >   | ^~~~~~~~~~~~~~~~
> > 
> > Cc: Guenter Roeck <linux@roeck-us.net>
> > Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > Cc: Hans de Goede <hdegoede@redhat.com>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> 
> This is necessary for adding Display port over Type-C support
> on devices using the tcpm code, rather then firmware, to do
> the Type-C alt-mode negotiation.
> 
> I have a local patch in my tree which adds support for this.
> 
> But Heikki did not like my approach, so that patch
> (which needs the bits you are removing) never landed
> upstream:
> 
> https://patchwork.kernel.org/patch/11199517/
> 
> Which is somewhat old now.

Yes, that's a just a little old now.

If it drags on for much longer, perhaps consider taking it out for the
time being and adding it back when you start to make use of it again?

> Heikki said he would look into an approach to this more to
> his liking. Heikki an progress on this area?
Hans de Goede July 9, 2020, 12:50 p.m. UTC | #3
Hi,

On 7/6/20 4:20 PM, Lee Jones wrote:
> On Mon, 06 Jul 2020, Hans de Goede wrote:
> 
>> Hi,
>>
>> On 7/6/20 3:33 PM, Lee Jones wrote:
>>> Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config
>>> configuration mechanism") pulled out the only use of 'tcpm_altmode_ops'
>>> last year.  No need to keep it around.
>>>
>>> Fixes the following W=1 kernel build warning(s):
>>>
>>>    drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
>>>    1551 | static const struct typec_altmode_ops tcpm_altmode_ops = {
>>>    | ^~~~~~~~~~~~~~~~
>>>
>>> Cc: Guenter Roeck <linux@roeck-us.net>
>>> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
>>> Cc: Hans de Goede <hdegoede@redhat.com>
>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>>
>> This is necessary for adding Display port over Type-C support
>> on devices using the tcpm code, rather then firmware, to do
>> the Type-C alt-mode negotiation.
>>
>> I have a local patch in my tree which adds support for this.
>>
>> But Heikki did not like my approach, so that patch
>> (which needs the bits you are removing) never landed
>> upstream:
>>
>> https://patchwork.kernel.org/patch/11199517/
>>
>> Which is somewhat old now.
> 
> Yes, that's a just a little old now.
> 
> If it drags on for much longer, perhaps consider taking it out for the
> time being and adding it back when you start to make use of it again?
> 
>> Heikki said he would look into an approach to this more to
>> his liking. Heikki an progress on this area?

Just a little headsup that I'm making some time now to take a look
at solving this in the previously discussed better way, with the hope
of that we can get that upstream. So hopefully I will have some
patches for this ready during the upcoming weekend.

Regards,

Hans
Lee Jones July 9, 2020, 1:04 p.m. UTC | #4
On Thu, 09 Jul 2020, Hans de Goede wrote:

> Hi,
> 
> On 7/6/20 4:20 PM, Lee Jones wrote:
> > On Mon, 06 Jul 2020, Hans de Goede wrote:
> > 
> > > Hi,
> > > 
> > > On 7/6/20 3:33 PM, Lee Jones wrote:
> > > > Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config
> > > > configuration mechanism") pulled out the only use of 'tcpm_altmode_ops'
> > > > last year.  No need to keep it around.
> > > > 
> > > > Fixes the following W=1 kernel build warning(s):
> > > > 
> > > >    drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
> > > >    1551 | static const struct typec_altmode_ops tcpm_altmode_ops = {
> > > >    | ^~~~~~~~~~~~~~~~
> > > > 
> > > > Cc: Guenter Roeck <linux@roeck-us.net>
> > > > Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > > > Cc: Hans de Goede <hdegoede@redhat.com>
> > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > 
> > > This is necessary for adding Display port over Type-C support
> > > on devices using the tcpm code, rather then firmware, to do
> > > the Type-C alt-mode negotiation.
> > > 
> > > I have a local patch in my tree which adds support for this.
> > > 
> > > But Heikki did not like my approach, so that patch
> > > (which needs the bits you are removing) never landed
> > > upstream:
> > > 
> > > https://patchwork.kernel.org/patch/11199517/
> > > 
> > > Which is somewhat old now.
> > 
> > Yes, that's a just a little old now.
> > 
> > If it drags on for much longer, perhaps consider taking it out for the
> > time being and adding it back when you start to make use of it again?
> > 
> > > Heikki said he would look into an approach to this more to
> > > his liking. Heikki an progress on this area?
> 
> Just a little headsup that I'm making some time now to take a look
> at solving this in the previously discussed better way, with the hope
> of that we can get that upstream. So hopefully I will have some
> patches for this ready during the upcoming weekend.

Sounds good.  Thanks for the update.
Hans de Goede July 14, 2020, 12:01 p.m. UTC | #5
Hi,

On 7/6/20 4:20 PM, Lee Jones wrote:
> On Mon, 06 Jul 2020, Hans de Goede wrote:
> 
>> Hi,
>>
>> On 7/6/20 3:33 PM, Lee Jones wrote:
>>> Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config
>>> configuration mechanism") pulled out the only use of 'tcpm_altmode_ops'
>>> last year.  No need to keep it around.
>>>
>>> Fixes the following W=1 kernel build warning(s):
>>>
>>>    drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
>>>    1551 | static const struct typec_altmode_ops tcpm_altmode_ops = {
>>>    | ^~~~~~~~~~~~~~~~
>>>
>>> Cc: Guenter Roeck <linux@roeck-us.net>
>>> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
>>> Cc: Hans de Goede <hdegoede@redhat.com>
>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>>
>> This is necessary for adding Display port over Type-C support
>> on devices using the tcpm code, rather then firmware, to do
>> the Type-C alt-mode negotiation.
>>
>> I have a local patch in my tree which adds support for this.
>>
>> But Heikki did not like my approach, so that patch
>> (which needs the bits you are removing) never landed
>> upstream:
>>
>> https://patchwork.kernel.org/patch/11199517/
>>
>> Which is somewhat old now.
> 
> Yes, that's a just a little old now.
> 
> If it drags on for much longer, perhaps consider taking it out for the
> time being and adding it back when you start to make use of it again?

Ok, I've just submitted a reworked patch-series upstream which
actually uses this code. So please drop this patch from your
patch-set.

Regards,

Hans


s
Lee Jones July 14, 2020, 1:54 p.m. UTC | #6
On Tue, 14 Jul 2020, Hans de Goede wrote:

> Hi,
> 
> On 7/6/20 4:20 PM, Lee Jones wrote:
> > On Mon, 06 Jul 2020, Hans de Goede wrote:
> > 
> > > Hi,
> > > 
> > > On 7/6/20 3:33 PM, Lee Jones wrote:
> > > > Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config
> > > > configuration mechanism") pulled out the only use of 'tcpm_altmode_ops'
> > > > last year.  No need to keep it around.
> > > > 
> > > > Fixes the following W=1 kernel build warning(s):
> > > > 
> > > >    drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
> > > >    1551 | static const struct typec_altmode_ops tcpm_altmode_ops = {
> > > >    | ^~~~~~~~~~~~~~~~
> > > > 
> > > > Cc: Guenter Roeck <linux@roeck-us.net>
> > > > Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > > > Cc: Hans de Goede <hdegoede@redhat.com>
> > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > 
> > > This is necessary for adding Display port over Type-C support
> > > on devices using the tcpm code, rather then firmware, to do
> > > the Type-C alt-mode negotiation.
> > > 
> > > I have a local patch in my tree which adds support for this.
> > > 
> > > But Heikki did not like my approach, so that patch
> > > (which needs the bits you are removing) never landed
> > > upstream:
> > > 
> > > https://patchwork.kernel.org/patch/11199517/
> > > 
> > > Which is somewhat old now.
> > 
> > Yes, that's a just a little old now.
> > 
> > If it drags on for much longer, perhaps consider taking it out for the
> > time being and adding it back when you start to make use of it again?
> 
> Ok, I've just submitted a reworked patch-series upstream which
> actually uses this code. So please drop this patch from your
> patch-set.

No problem.

Thanks Hans.
Badhri Jagan Sridharan Sept. 1, 2020, 2:32 a.m. UTC | #7
Hi Hans,

Kernel test robot is still reporting this issue. I have my repo synced
to ToT usb-next:
Output of git repo:
5fedf0d295d3 (origin/usb-testing, origin/usb-next) Merge 5.9-rc3 into usb-next
f75aef392f86 (tag: v5.9-rc3, origin/usb-linus, origin/main) Linux 5.9-rc3
e43327c706f2 Merge branch 'linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
dcc5c6f013d8 Merge tag 'x86-urgent-2020-08-30' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
d2283cdc18d3 Merge tag 'irq-urgent-2020-08-30' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
0063a82de937 Merge tag 'sched-urgent-2020-08-30' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Were you able to get your patch merged ?

Thanks,
Badhri


On Tue, Jul 14, 2020 at 6:55 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> On Tue, 14 Jul 2020, Hans de Goede wrote:
>
> > Hi,
> >
> > On 7/6/20 4:20 PM, Lee Jones wrote:
> > > On Mon, 06 Jul 2020, Hans de Goede wrote:
> > >
> > > > Hi,
> > > >
> > > > On 7/6/20 3:33 PM, Lee Jones wrote:
> > > > > Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config
> > > > > configuration mechanism") pulled out the only use of 'tcpm_altmode_ops'
> > > > > last year.  No need to keep it around.
> > > > >
> > > > > Fixes the following W=1 kernel build warning(s):
> > > > >
> > > > >    drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
> > > > >    1551 | static const struct typec_altmode_ops tcpm_altmode_ops = {
> > > > >    | ^~~~~~~~~~~~~~~~
> > > > >
> > > > > Cc: Guenter Roeck <linux@roeck-us.net>
> > > > > Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > > > > Cc: Hans de Goede <hdegoede@redhat.com>
> > > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > >
> > > > This is necessary for adding Display port over Type-C support
> > > > on devices using the tcpm code, rather then firmware, to do
> > > > the Type-C alt-mode negotiation.
> > > >
> > > > I have a local patch in my tree which adds support for this.
> > > >
> > > > But Heikki did not like my approach, so that patch
> > > > (which needs the bits you are removing) never landed
> > > > upstream:
> > > >
> > > > https://patchwork.kernel.org/patch/11199517/
> > > >
> > > > Which is somewhat old now.
> > >
> > > Yes, that's a just a little old now.
> > >
> > > If it drags on for much longer, perhaps consider taking it out for the
> > > time being and adding it back when you start to make use of it again?
> >
> > Ok, I've just submitted a reworked patch-series upstream which
> > actually uses this code. So please drop this patch from your
> > patch-set.
>
> No problem.
>
> Thanks Hans.
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
Hans de Goede Sept. 1, 2020, 7:20 a.m. UTC | #8
Hi,

On 9/1/20 4:32 AM, Badhri Jagan Sridharan wrote:
> Hi Hans,
> 
> Kernel test robot is still reporting this issue. I have my repo synced
> to ToT usb-next:
> Output of git repo:
> 5fedf0d295d3 (origin/usb-testing, origin/usb-next) Merge 5.9-rc3 into usb-next
> f75aef392f86 (tag: v5.9-rc3, origin/usb-linus, origin/main) Linux 5.9-rc3
> e43327c706f2 Merge branch 'linus' of
> git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
> dcc5c6f013d8 Merge tag 'x86-urgent-2020-08-30' of
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> d2283cdc18d3 Merge tag 'irq-urgent-2020-08-30' of
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> 0063a82de937 Merge tag 'sched-urgent-2020-08-30' of
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> 
> Were you able to get your patch merged ?

The patch is in the review process. It looks like it needs one more
revision and then it should be on its way.

Regards,

Hans



> 
> Thanks,
> Badhri
> 
> 
> On Tue, Jul 14, 2020 at 6:55 AM Lee Jones <lee.jones@linaro.org> wrote:
>>
>> On Tue, 14 Jul 2020, Hans de Goede wrote:
>>
>>> Hi,
>>>
>>> On 7/6/20 4:20 PM, Lee Jones wrote:
>>>> On Mon, 06 Jul 2020, Hans de Goede wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> On 7/6/20 3:33 PM, Lee Jones wrote:
>>>>>> Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config
>>>>>> configuration mechanism") pulled out the only use of 'tcpm_altmode_ops'
>>>>>> last year.  No need to keep it around.
>>>>>>
>>>>>> Fixes the following W=1 kernel build warning(s):
>>>>>>
>>>>>>     drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
>>>>>>     1551 | static const struct typec_altmode_ops tcpm_altmode_ops = {
>>>>>>     | ^~~~~~~~~~~~~~~~
>>>>>>
>>>>>> Cc: Guenter Roeck <linux@roeck-us.net>
>>>>>> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
>>>>>> Cc: Hans de Goede <hdegoede@redhat.com>
>>>>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>>>>>
>>>>> This is necessary for adding Display port over Type-C support
>>>>> on devices using the tcpm code, rather then firmware, to do
>>>>> the Type-C alt-mode negotiation.
>>>>>
>>>>> I have a local patch in my tree which adds support for this.
>>>>>
>>>>> But Heikki did not like my approach, so that patch
>>>>> (which needs the bits you are removing) never landed
>>>>> upstream:
>>>>>
>>>>> https://patchwork.kernel.org/patch/11199517/
>>>>>
>>>>> Which is somewhat old now.
>>>>
>>>> Yes, that's a just a little old now.
>>>>
>>>> If it drags on for much longer, perhaps consider taking it out for the
>>>> time being and adding it back when you start to make use of it again?
>>>
>>> Ok, I've just submitted a reworked patch-series upstream which
>>> actually uses this code. So please drop this patch from your
>>> patch-set.
>>
>> No problem.
>>
>> Thanks Hans.
>>
>> --
>> Lee Jones [李琼斯]
>> Senior Technical Lead - Developer Services
>> Linaro.org │ Open source software for Arm SoCs
>> Follow Linaro: Facebook | Twitter | Blog
>
diff mbox series

Patch

diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 82b19ebd7838e..d6913eb0ea54d 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -1503,57 +1503,6 @@  static int tcpm_validate_caps(struct tcpm_port *port, const u32 *pdo,
 	return 0;
 }
 
-static int tcpm_altmode_enter(struct typec_altmode *altmode, u32 *vdo)
-{
-	struct tcpm_port *port = typec_altmode_get_drvdata(altmode);
-	u32 header;
-
-	mutex_lock(&port->lock);
-	header = VDO(altmode->svid, vdo ? 2 : 1, CMD_ENTER_MODE);
-	header |= VDO_OPOS(altmode->mode);
-
-	tcpm_queue_vdm(port, header, vdo, vdo ? 1 : 0);
-	mod_delayed_work(port->wq, &port->vdm_state_machine, 0);
-	mutex_unlock(&port->lock);
-
-	return 0;
-}
-
-static int tcpm_altmode_exit(struct typec_altmode *altmode)
-{
-	struct tcpm_port *port = typec_altmode_get_drvdata(altmode);
-	u32 header;
-
-	mutex_lock(&port->lock);
-	header = VDO(altmode->svid, 1, CMD_EXIT_MODE);
-	header |= VDO_OPOS(altmode->mode);
-
-	tcpm_queue_vdm(port, header, NULL, 0);
-	mod_delayed_work(port->wq, &port->vdm_state_machine, 0);
-	mutex_unlock(&port->lock);
-
-	return 0;
-}
-
-static int tcpm_altmode_vdm(struct typec_altmode *altmode,
-			    u32 header, const u32 *data, int count)
-{
-	struct tcpm_port *port = typec_altmode_get_drvdata(altmode);
-
-	mutex_lock(&port->lock);
-	tcpm_queue_vdm(port, header, data, count - 1);
-	mod_delayed_work(port->wq, &port->vdm_state_machine, 0);
-	mutex_unlock(&port->lock);
-
-	return 0;
-}
-
-static const struct typec_altmode_ops tcpm_altmode_ops = {
-	.enter = tcpm_altmode_enter,
-	.exit = tcpm_altmode_exit,
-	.vdm = tcpm_altmode_vdm,
-};
-
 /*
  * PD (data, control) command handling functions
  */