Hi Martin,

On 25-11-19, Martin Kepplinger wrote:
> hi,
> 
> When there's a panel/touchscreen combination that is sold as a combinded
> module (with the reset line shared even), how would I connect the 2
> drivers and make sure the touchscreen driver probes after the panel is ready?
> 
> I have the feeling there is 
> https://docs.kernel.org/driver-api/device_link.html
> for such cases. Can you show me examples of 2 "random" drivers connected
> in this case?

are you aware of the "struct drm_panel_follower" API? This doesn't
ensure that the touchscreen driver is probed after the panel driver, but
it ensures that the touchscreen power-state follows the panel
power-state.

> In the past I also played with CONFIG_RESET_GPIO using the reset-controller
> logic, but I *think* this is more for 2+ of the *same* devices connected.

Unfortunately sharing the same reset line for different devices is not
uncommon. We saw this on NXP IW61x WiFi/BT chips as well. In that
particular case, the API was changed to the reset API which you linked
above, to gain refcount support. This works very well.

> Might there be yet a different way in devicetree I'm not aware of?

You an check for the 'panel' property within the
Documentation/devicetree/bindings/input/.

Regards,
  Marco

> 
> The below patches - for completeness - are only the workaround for what I'd
> like to do, exposing the state of the panel so that the touchscreen can query
> it.
> 
> thank you very much for any hints,
> 
>                                martin
> 
> 
> 
> Guido Günther (2):
>   hack: drm: panel: mantix: Allow to query enabled state
>   hack: Input: edt-ft5x06: hackery to probe after panel
> 
> Martin Kepplinger (2):
>   hack: edt-ft5x06 / panel-mantix-mlaf057we51: declare
>     mantix_panel_prepared() in drm_panel.h
>   hack: arm64: dts: imx8mq-librem5: add purism,panel-librem5-workaround
> 
>  .../boot/dts/freescale/imx8mq-librem5.dtsi    |  1 +
>  .../gpu/drm/panel/panel-mantix-mlaf057we51.c  | 12 ++++++++++
>  drivers/input/touchscreen/edt-ft5x06.c        | 22 +++++++++++++++++++
>  include/drm/drm_panel.h                       |  2 ++
>  4 files changed, 37 insertions(+)
> 
> -- 
> 2.47.3
> 
> 
> 

-- 
#gernperDu 
#CallMeByMyFirstName

Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |

Reply via email to