Re: [PATCH v1 2/3] driver core: Split device link data types and API to device/devlink.h

From: Rafael J. Wysocki

Date: Mon Feb 23 2026 - 16:00:17 EST


On Mon, Feb 23, 2026 at 9:44 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> device.h is a huge header which is hard to follow and easy to miss
> something. Improve that by splitting device link data types and API
> to device/devlink.h.
>
> In particular this helps to speedup the build of the code that includes
> device.h solely for a device link data types and/or API.
>
> Note, get_dev_from_fwnode() goes to include/linux/fwnode.h as it seems
> better to be there (it is on one hand related to device link, but it
> is a getter for struct fwnode_handle respective field).
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> include/linux/device.h | 86 +-----------------------------
> include/linux/device/devlink.h | 97 ++++++++++++++++++++++++++++++++++

The name "devlink" is somewhat ambiguous (see
Documentation/netlink/specs/devlink.yaml), so it would be better to
use a full device_link name here IMO.

The change itself looks reasonable to me though.