mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petar Stepanovic <pstepanovic@axiado.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
	Naveen Kumar Rajgiri Bassappa <rbnaveenkumar@axiado.com>,
	Krutik Shah <krutikshah@axiado.com>,
	Prasad Bolisetty <pbolisetty@axiado.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Tzu-Hao Wei <twei@axiado.com>,
	Karthikeyan Mitran <kmitran@axiado.com>
Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org
Subject: Re: [PATCH v2 2/2] usb: gadget: udc: add Axiado AX3000 and AX3005 UDC driver
Date: Thu, 15 Oct 2026 10:34:08 +0200	[thread overview]
Message-ID: <17eed43f-3fc9-47af-83f5-de7058830adf@axiado.com> (raw)
In-Reply-To: <699de61dc2bfebdf18cdb0e377d1ba63886b4e12.camel@pengutronix.de>


On 8/24/2026 5:33 PM, Philipp Zabel wrote:
> On Mo, 2026-08-17 at 22:57 -0700, Naveen Kumar Rajgiri Bassappa wrote:
>> Add a driver for the USB device controller integrated into the Axiado
>> AX3000 and AX3005 SoCs.
>>
>> The controller is based on the Corigine USB 3.1 device IP core and uses an
>> xHCI-like programming model with a command ring, an event ring, and
>> per-endpoint transfer rings composed of Transfer Request Blocks (TRBs).
>>
>> The driver implements the USB gadget and endpoint operations, including
>> endpoint enable and disable, request queue and dequeue, halt and wedge
>> handling, and standard endpoint 0 control requests.
>>
>> It supports High-Speed and SuperSpeed operation, control, bulk,
>> interrupt, and isochronous transfers, and scatter-gather requests.
>>
>> Signed-off-by: Naveen Kumar Rajgiri Bassappa <rbnaveenkumar@axiado.com>
>> ---
>>  MAINTAINERS                      |    2 +
>>  drivers/usb/gadget/udc/Kconfig   |   14 +
>>  drivers/usb/gadget/udc/Makefile  |    1 +
>>  drivers/usb/gadget/udc/crg_udc.c | 4491 ++++++++++++++++++++++++++++++++++++++
>>  drivers/usb/gadget/udc/crg_udc.h |  355 +++
>>  5 files changed, 4863 insertions(+)
>>
> [...]
>> diff --git a/drivers/usb/gadget/udc/crg_udc.c b/drivers/usb/gadget/udc/crg_udc.c
>> new file mode 100644
>> index 000000000000..bb3ed394d984
>> --- /dev/null
>> +++ b/drivers/usb/gadget/udc/crg_udc.c
>> @@ -0,0 +1,4491 @@
> [...]
>> +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(dev, NULL);
>> +	if (IS_ERR(crg_udc->rst))
>> +		return dev_err_probe(dev, PTR_ERR(crg_udc->rst),
>> +				     "failed to get reset\n");
>> +
>> +	ret = reset_control_deassert(crg_udc->rst);
>> +	if (ret)
>> +		return dev_err_probe(dev, ret, "failed to deassert reset\n");
>> +
>> +	ret = devm_add_action_or_reset(dev, crg_udc_reset_assert, crg_udc->rst);
>> +	if (ret)
>> +		return ret;
> This looks like it could be simplified with
> devm_reset_control_get_optional_exclusive_deasserted()
>
Agreed. We'll use devm_reset_control_get_optional_exclusive_deasserted() in the next revision.

Best regards,
Petar Stepanovic


      reply	other threads:[~2026-10-15  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  5:57 [PATCH v2 0/2] Axiado AX3000 and AX3005 USB Device Controller (UDC) Naveen Kumar Rajgiri Bassappa
2026-08-18  5:57 ` [PATCH v2 1/2] dt-bindings: usb: gadget: udc: add Axiado AX3000 and AX3005 UDC Naveen Kumar Rajgiri Bassappa
2026-08-21  7:41   ` Krzysztof Kozlowski
2026-10-15  8:32     ` Petar Stepanovic
2026-08-18  5:57 ` [PATCH v2 2/2] usb: gadget: udc: add Axiado AX3000 and AX3005 UDC driver Naveen Kumar Rajgiri Bassappa
2026-08-24 15:33   ` Philipp Zabel
2026-10-15  8:34     ` Petar Stepanovic [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17eed43f-3fc9-47af-83f5-de7058830adf@axiado.com \
    --to=pstepanovic@axiado.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kmitran@axiado.com \
    --cc=krutikshah@axiado.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pbolisetty@axiado.com \
    --cc=rbnaveenkumar@axiado.com \
    --cc=robh@kernel.org \
    --cc=twei@axiado.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®