]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: usb251xb: support usage case without I2C control
authorJisheng Zhang <jszhang@kernel.org>
Mon, 25 Aug 2025 23:45:09 +0000 (07:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:23:29 +0000 (15:23 +0200)
commit2cf8ecd0ae650c1f0e551326bb7f060abf1560d3
tree3876778258df9d83bd18cd5af93ec77daabce97c
parent22fbedf9d9c2d219339620a95a0611c9ddfc397b
usb: usb251xb: support usage case without I2C control

Currently, the usb251xb assumes i2c control. But from HW point of
view, the hub supports usage case without any i2c, we only want the
gpio controls.

Refactor the code so that register writes for configuration are only
performed if the device has a i2c_client provided and also register as
a platform driver. This allows the driver to be used to manage GPIO
based control of the device.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://lore.kernel.org/r/20250825234509.1041-4-jszhang@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usb251xb.c