pinctrl: sx150x: Enable device links to consumers

A recent core change makes it possible to create device links
between a pin controller and its consumers. This is necessary
to ascertain the right suspend/resume order for the devices:
if a device is using a certain pin control state and want
to switch that before/after going to suspend, then the pin
controller may not be suspended already, and conversely
on the resume path.

Make sure any SX150X consumers are suspended before the
SX150X is suspended.

The SX150X does not implement suspend/resume callbacks,
but the device links are hierarchical, and this also makes
sure that the I2C master where the SX150X is in turn
connected will not suspend before any clients of the pin
control settings are suspended (and conversely for resume).

Cc: Peter Rosin <peda@axentia.se>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 file changed