dev: core: added API calls to lock a device.

dev_lock:
Lock the device mutex of a given device.

dev_unlock:
Unlock the device mutex of a given device.

Signed-off-by: Michel Megens <dev@michelmegens.net>
kern: sem: added semaphore interface.

Added an interface for semaphore locks:

	* sem_init
	* sem_wait
	* sem_signal
	* sem_try_wait

Signed-off-by: Michel Megens <dev@michelmegens.net>
Merge branch 'master' into sched

Signed-off-by: Michel Megens <dev@michelmegens.net>

Conflicts:
	kernel/Makefile
kern: sem: fixed some build warnings in semaphores

Added semaphore API functions to the semaphore header.

Signed-off-by: Michel Megens <dev@michelmegens.net>
ETA/OS 0.2.0-rc1

Signed-off-by: Michel Megens <dev@michelmegens.net>
kern: sem: added documentation to semaphores.

 * Added a module to doxygen for semaphores.
 * Added doxygen comments to all sem functions and data structures

Signed-off-by: Michel Megens <dev@michelmegens.net>
gpio: core: setup of an initial GPIO core.

Setup of an initial core GPIO driver. Added these two data structures:

	* gpio_pin
	* gpio_chip

A gpio_chip is a chip containing atleast 1 gpio_pin, and has the ability
to control its I/O pins.

Implemented these API functions:

extern struct gpio_pin *gpio_chip_to_pin(struct gpio_chip *chip, uint16_t nr);
extern int gpio_pin_request(struct gpio_pin *pin);
extern int gpio_pin_write(struct gpio_pin *pin, int val);
extern int gpio_pin_read(struct gpio_pin *pin);
extern int gpio_direction_input(struct gpio_pin *pin);
extern int gpio_direction_output(struct gpio_pin *pin, int value);
extern int raw_gpio_direction_ouput(struct gpio_pin *pin, int value);
extern int raw_gpio_pin_write(struct gpio_pin *pin, int val);
extern int raw_gpio_read_pin(struct gpio_pin *pin);

Signed-off-by: Michel Megens <dev@michelmegens.net>
Merge branch 'sched'
kbuild: fixed a kbuild error in kernel/kconfig.

There was a dependency error in the Kconfig file of the kernel/
subsystem. Fixed by added a depends on.

Signed-off-by: Michel Megens <dev@michelmegens.net>