pins to control screen rotation, which API for lin

2019-08-10 05:46发布

I have lcd screen connected to arm cpu, and there are two pins on this lcd screen to control where is left,top corner on the screen (2 pins = 4 variants).

And I don't know which API to use to control left,top corner from userspace?

The most simple one just export this pins via gpio sysfs interface, but I don't like this solution, because of user app should not know such details, as gpio number connected to lcd panel.

The another solution modify fbdev video driver and add paramter to control "left,top corner", good enough, but there are disadvantages: 1)require std video driver of my arm cpu modification 2)user space application should use such not standard interface

may there is common way to expose such functionality to userspace in linux kernel?

At now I expose this pins via leds interface: /sys/class/leds/lcd_dpsh

switch 1/0 is made via echo 255/0 > brightness

But don't like "leds" part of interface, and also "brightness" But may be there is something like "switcher" sysfs class?

0条回答
登录 后发表回答