Hello,
I have created few patches that aim to add abstraction for gpio
handling. First patch adds functions:
gpio_config - configure gpio as input/output
gpio_read - read state of gpio(s)
gpio_write - write/toggle state of gpio(s)
gpio_set_handler - enables interrupt on given gpio.
Also changes board init files to make them more sane :-)
Second patch adds interrupt demuxing and masking into keypad driver as
gpio and keypad are handled by the same peripheral.
It would make sense to split the keypad driver into calypso-specific
and generic stuff once there is support for other chipsets.
Also note that interrupt levels in datasheet are active low (p.120),
my testing shows otherwise.
Michal Demin
Show replies by date
Hello,
I have created few patches that aim to add abstraction for gpio
handling. First patch adds functions:
gpio_config - configure gpio as input/output
gpio_read - read state of gpio(s)
gpio_write - write/toggle state of gpio(s)
gpio_set_handler - enables interrupt on given gpio.
Also changes board init files to make them more sane :-)
Second patch adds interrupt demuxing and masking into keypad driver as
gpio and keypad are handled by the same peripheral.
It would make sense to split the keypad driver into calypso-specific
and generic stuff once there is support for other chipsets.
Also note that interrupt levels in datasheet are active low (p.120),
my testing shows otherwise.
Michal Demin