How to on/off lcd backlight through software?

I can controll brightness of lcd through software using /sys/class/backlight.
our requriment is to on/off lcd screen only(backlight) when on/off switch pressed.
i am unable to on/off lcd backlight through software.

Hi

If you want to control brightness and backlight on/off from Linux have a look here.

Should you have a GPIO input which signals the Apalis the currently needed state of backlight you will have to add functionality to your application which reacts on that GPIO’s state change and sets the file in /sys/class/backlight accordingly.

Max