On 10/18/26 9:36 PM, Mehmet Fide wrote:
Hi Marek,
On 2026-10-16, Marek Vasut wrote:
Please split this into two patches:
- First - only the macro replacements
- Second - any additional clean ups
Will do in v7: the first patch only replaces the private enum and the
strcmp() chain with usb_get_dr_mode(), the second moves the ID detect
gpio request to the device.
This has to check return value, gpio_request_by_name() can return
negative error.
This has to check return value, dm_gpio_get_value() can return negative
error.
Both checked in v7; only -ENOENT from the request is tolerated, as the
property is optional, and keeps the port in device mode as before.
Thus far, USB_DR_MODE_UNKNOWN or equivalent undecodable dr_mode made
this function return -EINVAL ...
... Now it seems to be handled as host ?
Yes, v6 changed that by mistake. v7 keeps the old behaviour: a missing
property means host, a value the driver does not know fails with
-EINVAL.
Thank you.