/* Let drivers register callback in order to get notified when there is an interrupt on the gpio pin  */
int gpio_register_callback(unsigned gpio, int(*func)(void *arg), void *data)
/* Let drivers register callback in order to get notified when there is an interrupt on the gpio pin  */
int gpio_register_callback(unsigned gpio, int(*func)(void *arg), void *data)
{
	if (gpio_pin[gpio].callback)
		dev_warn(gpiodev, "%s: WARNING: callback already "
			 "registered for gpio pin#%d\n", __func__, gpio);
	gpio_pin[gpio].callback = func;
	gpio_pin[gpio].data = data;
	return 0;
}