[PATCH v3 6/6] usb: gadget: udc: crg: Add core driver and build integration

Petar Stepanovic pstepanovic at axiado.com
Wed Oct 28 05:42:39 PDT 2026


On 10/22/2026 11:36 AM, Philipp Zabel wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> On Di, 2026-10-20 at 00:19 -0700, Petar Stepanovic wrote:
>> This patch introduces the core probe/remove functions for the Axiado
>> AX3000/AX3005 UDC driver, and wires up the directory into the build
>> system via Kconfig and Makefile.
>>
>> Co-developed-by: Naveen Kumar Rajgiri Bassappa <rbnaveenkumar at axiado.com>
>> Signed-off-by: Naveen Kumar Rajgiri Bassappa <rbnaveenkumar at axiado.com>
>> Co-developed-by: Krutik Shah <krutikshah at axiado.com>
>> Signed-off-by: Krutik Shah <krutikshah at axiado.com>
>> Signed-off-by: Petar Stepanovic <pstepanovic at axiado.com>
>> ---
>>  MAINTAINERS                               |   1 +
>>  drivers/usb/gadget/udc/Kconfig            |   2 +
>>  drivers/usb/gadget/udc/Makefile           |   1 +
>>  drivers/usb/gadget/udc/crg/Kconfig        |  16 +
>>  drivers/usb/gadget/udc/crg/Makefile       |   9 +
>>  drivers/usb/gadget/udc/crg/crg-udc-core.c | 706 ++++++++++++++++++++++++++++++
>>  6 files changed, 735 insertions(+)
>>
> [...]
>> diff --git a/drivers/usb/gadget/udc/crg/crg-udc-core.c b/drivers/usb/gadget/udc/crg/crg-udc-core.c
>> new file mode 100644
>> index 000000000000..80a4fc6a61e8
>> --- /dev/null
>> +++ b/drivers/usb/gadget/udc/crg/crg-udc-core.c
>> @@ -0,0 +1,706 @@
> [...]
>> +static int crg_udc_init_hw(struct crg_gadget_dev *crg_udc)
>> +{
>> +     struct device *dev = crg_udc->dev;
>> +     int ret;
>> +
>> +     crg_udc->clk = devm_clk_get_optional(dev, NULL);
>> +     if (IS_ERR(crg_udc->clk))
>> +             return dev_err_probe(dev, PTR_ERR(crg_udc->clk),
>> +                                  "failed to get clock\n");
>> +
>> +     ret = clk_prepare_enable(crg_udc->clk);
>> +     if (ret)
>> +             return dev_err_probe(dev, ret, "failed to enable clock\n");
>> +
>> +     ret = devm_add_action_or_reset(dev, crg_udc_clk_disable, crg_udc->clk);
>> +     if (ret)
>> +             return ret;
>> +
>> +     crg_udc->rst =
>> +             devm_reset_control_get_optional_exclusive_deasserted(dev, NULL);
> Why is this stored in struct crg_gadget_dev? It's not used anywhere
> that I can see. The struct reset_control could be a local variable.
>
Agreed. The reset control is not used after initialization, so I'll make it a local variable and remove it from |struct crg_gadget_dev|in the next revision.

Best Regards,
Petar




More information about the linux-arm-kernel mailing list