Re: [PATCH v4] usb: ohci-omap: implement overcurrent handling for GPIO-based power control

From: Muhammad Mahdi Amirpour

Date: Mon Oct 19 2026 - 15:10:42 EST


[resending to the full list as requested]

Dear Mr. Kroah-Hartman,

You are right, I apologize. I should have replied to your v3 review
before sending v4. I was not familiar with the mailing list workflow
and will make sure to reply to review comments before sending new
versions in the future.

To address your v3 review points:

1. Lock: You were right that the spinlock was unnecessary. It was
actually harmful — gpiod_set_value_cansleep() sleeps during the
I2C transfer to the TPS65010, so calling it under
spin_lock_irqsave() was a bug. v4 removes the lock entirely and
uses READ_ONCE/WRITE_ONCE instead.

2. Naming: Renamed overcurrent_status to overcurrent_active and
overcurrent_changed to overcurrent_change_pending.

3. Include order: Fixed to be alphabetical.

4. Regarding the code origin: I did use an AI assistant to help me
understand some of the kernel APIs (especially the OHCI hub status
register layout and the gpiod subsystem) and to review my earlier
versions for bugs. The code is mine, but I want to be transparent
about the assistance.

I do not have the hardware to test this patch, so I cannot verify it
at runtime. Given that this is a legacy driver, I am happy to drop
this patch and work on something else if you think that would be
better. Otherwise, I can send a v5 addressing the Sashiko bot findings
(the IRQ handler ordering and the probe falling-edge race).

Please let me know how you would like to proceed.

Best regards,
Muhammad Mahdi Amirpour