lkml.org 
[lkml]   [2022]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 1/3] mfd: ch341: add core driver for the WCH CH341 in I2C/SPI/GPIO mode
From
Hi Lee,

>> + dev->ep_in = endpoints[0].desc.bEndpointAddress;
>> + dev->ep_out = endpoints[1].desc.bEndpointAddress;
>> + dev->ep_intr = endpoints[2].desc.bEndpointAddress;
>> + dev->ep_intr_interval = endpoints[2].desc.bInterval;
>> +
>> + usb_set_intfdata(iface, dev);
>> +
>> + rc = mfd_add_hotplug_devices(&iface->dev, ch341_devs,
>
> Why are you using 'hotplug' here?

I replaced with mfd_add_devices, however I'm not sure what the difference
is since mfd_add_hotplug_devices() is just a helper with less parameters.
That's what the viperboard driver does; I just copied since both devices
are similar in functionality.

>
> ch341_devs is empty right?
>
> So no child devices are registered.
>
> In which case this is not (yet) an MFD and cannot be accepted.
>
> Please add the children.
>
>> + ARRAY_SIZE(ch341_devs));
>> + if (rc) {
>> + rc = dev_err_probe(&iface->dev, rc,
>> + "Failed to add mfd devices to core\n");
>
> I'm not even sure what this means. Should be:
>
> "Failed to register child devices\n"

Changed. The original string was also from the viperboard driver.

>
>> +MODULE_DESCRIPTION("CH341 USB to I2C/SPI/GPIO adapter");
>
> Is it? What makes it one of those?

That's what this chip does, in addition to UART and printer modes. See patch 4.

Frank.

\
 
 \ /
  Last update: 2022-06-16 03:20    [W:0.143 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site