Sysfs access from HAL

Hi

I want to control gpio pins from my HAL module.
So is it possible to read and write /sys/class/gpio/ from my HAL module ?

Thanks

HAL? Which OS are you targeting here?

android.
Hardware abstraction layer

So yes you can use gpio sysfs interface from our HAL. Take care of access rights and sepolicy (if enabled).

Hi Loic,

For sepolicy i am trying to use the tool audi2allow, but i am getting below error.

ERROR: ld.so: object ‘/lib64/libselinux.so’ from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
python: can’t open file ‘/external/selinux/python/audit2allow/audit2allow’: [Errno 2] No such file or directory

Ok. I’ve added the custom_board tag since there’s no Android builds for DB820C right now.

Can anyone help how to resolve the below error.

ERROR: ld.so: object ‘/lib64/libselinux.so’ from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

python: can’t open file ‘/external/selinux/python/audit2allow/audit2allow’: [Errno 2] No such file or directory
[/quote]