[PATCH 0/2] driver: core: Allow drivers to opt out of driver_override

Thierry Reding posted 2 patches 2 days, 3 hours ago
drivers/pwm/pwm-tegra.c       |  1 +
include/linux/device.h        | 12 +++++++++---
include/linux/device/driver.h | 12 ++++++++++++
3 files changed, 22 insertions(+), 3 deletions(-)
[PATCH 0/2] driver: core: Allow drivers to opt out of driver_override
Posted by Thierry Reding 2 days, 3 hours ago
Overriding the driver to bind to may not make sense for some drivers.
One example of this is platform drivers that use device data obtained
through device ID matching (such as OF or ACPI) and they cannot work
without that device data.

Usually the device ID matching is the only way that such drivers can
match against a device, so drivers shouldn't need to check that their
device data is valid. For such drivers, driver_override is the only
corner case that can lead to a case where no device data is found.
Instead of requiring each and every driver to handle this case, move
handling into the core and let drivers opt out of this override
mechanism if it doesn't make any sense for them.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Thierry Reding (2):
      driver: core: Allow drivers to opt out of driver_override
      pwm: tegra: Opt out of driver_override

 drivers/pwm/pwm-tegra.c       |  1 +
 include/linux/device.h        | 12 +++++++++---
 include/linux/device/driver.h | 12 ++++++++++++
 3 files changed, 22 insertions(+), 3 deletions(-)
---
base-commit: 5c4d4169604b335c38bbc79bc1fc03042981fc6f
change-id: 20260922-driver-override-opt-out-470290f5d5c9

Best regards,
--  
Thierry Reding <treding@nvidia.com>