[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af03596e-f06c-9c23-1904-34317e25620a@zago.net>
Date: Wed, 15 Jun 2022 20:18:47 -0500
From: Frank Zago <frank@...o.net>
To: Lee Jones <lee.jones@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Wolfram Sang <wsa@...nel.org>, Johan Hovold <johan@...nel.org>,
linux-usb@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org, linux-i2c@...r.kernel.org
Subject: Re: [PATCH v5 1/3] mfd: ch341: add core driver for the WCH CH341 in
I2C/SPI/GPIO mode
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.
Powered by blists - more mailing lists