Hi,
On Mon, Apr 18, 2022 at 4:10 PM Doug Anderson dianders@chromium.org wrote:
So I guess where does that leave us? Maybe:
- I'll add a WARN_ON() in of_dp_aux_populate_ep_devices() if there is
more than one DP AUX endpoint with a comment explaining why we assume one DP AUX endpoint.
- I'll create this new structure in drm_dp_aux_bus.h:
struct dp_aux_populate_callbacks { int (*done_probing)(struct drm_dp_aux *aux); void (*pre_remove)(struct drm_dp_aux *aux); };
- I'll add a second version of the populate functions that AUX bus
providers can use if they want callbacks:
int of_dp_aux_populate_ep_devices_cb(struct drm_dp_aux *aux, struct dp_aux_populate_callbacks *cb); int devm_of_dp_aux_populate_ep_devices_cb(struct drm_dp_aux *aux, struct dp_aux_populate_callbacks *cb);
The old functions will just be changed to wrap the above and pass NULL for the callbacks. To me, this seems better/simpler than notifiers or any other scheme, but yell if you disagree.
- I'll call the callsbacks in dp_aux_ep_probe() after a successful
probe. I'll add a second callback and will call it in dp_aux_ep_remove() before passing the remove through to the panel.
If that sounds peachy then I think it should be pretty doable.
I never heard any response about whether people liked the above, but I went ahead and did something similar to it. It can be found at:
https://lore.kernel.org/r/20220503224029.3195306-1-dianders@chromium.org