aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>2026-07-21 11:36:20 +0200
committerStephen Boyd <sboyd@kernel.org>2026-10-14 20:03:57 -0700
commit939e80cef9a757ca3a08cd1c8665726837405c0f (patch)
tree58067e07a6c2892245f9b194de876f2e594a69c8 /scripts/Makefile.thinlto
parentspmi: Implement spmi_subdevice_alloc_and_add() and devm variant (diff)
spmi: Add helper to get a parent SPMI device
Drivers that register a SPMI sub-device as a platform_driver are not guaranteed to have a SPMI device as their parent: add a new helper `spmi_get_parent_spmi_device()` that takes a struct device and checks if there's a parent, and if that parent is actually a SPMI device by checking if its device type matches with SPMI: if so, returns a pointer to the relative struct spmi_device without incrementing any refcount. As a note, in the specific case of using this helper to retrieve a SPMI subdevice's parent, the spmi_subdevice_alloc_and_add() function does actually call device_add(), which will already take care of raising the refcount of the associated parent device. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions