On 11/9/26 10:35, Petr Oros wrote:
Add support for setting the state of input pins on the device.
Implement the state_on_dpll_set callback for input pins and advertise
the state-can-change capability for them, so that userspace can move a
pin between the states valid for the device mode. The core checks the
capability only, the states a mode allows are up to the driver: in
automatic mode a pin is selectable or disconnected, in manual mode
connected or disconnected, as Documentation/driver-api/dpll.rst
describes them. The device reports automatic mode, so connected is
refused with -EINVAL and an extack message. The check is written for
both modes already, so that manual mode has nothing to add to it when
it arrives. The driver stores the requested state and reports it back
unchanged, it does not act on it yet. Output pins keep reporting their
state only.
Signed-off-by: Petr Oros<redacted>
---
v3:
- refuse pin states that are not valid in the device mode, so that
connected is refused in automatic mode, the mode the device reports,
with an extack message (Ivan Vecera)
- the Acked-by of v2 is not carried over, the callback changed
LGTM...
Reviewed-by: Ivan Vecera <ivecera@redhat.com>