diff options
author | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-06-02 13:09:29 +0200 |
---|---|---|
committer | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-06-02 13:09:29 +0200 |
commit | c6da2cfeb05178a11c6d062a06f8078150ee492f (patch) | |
tree | f3b4021d252c52d6463a9b3c1bb7245e399b009c /include/linux/host_notify.h | |
parent | c6d7c4dbff353eac7919342ae6b3299a378160a6 (diff) | |
download | kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.zip kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.gz kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.bz2 |
samsung update 1
Diffstat (limited to 'include/linux/host_notify.h')
-rw-r--r-- | include/linux/host_notify.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/include/linux/host_notify.h b/include/linux/host_notify.h new file mode 100644 index 0000000..2b7ac18 --- /dev/null +++ b/include/linux/host_notify.h @@ -0,0 +1,64 @@ +/* + * Host notify class driver + * + * Copyright (C) 2011 Samsung, Inc. + * Author: Dongrak Shin <dongrak.shin@samsung.com> + * +*/ + +#ifndef __LINUX_HOST_NOTIFY_H__ +#define __LINUX_HOST_NOTIFY_H__ + +enum host_uevent_state { + NOTIFY_HOST_NONE, + NOTIFY_HOST_ADD, + NOTIFY_HOST_REMOVE, + NOTIFY_HOST_OVERCURRENT, + NOTIFY_HOST_LOWBATT, + NOTIFY_HOST_UNKNOWN, +}; + +enum otg_mode { + NOTIFY_NONE_MODE, + NOTIFY_HOST_MODE, + NOTIFY_PERIPHERAL_MODE, + NOTIFY_TEST_MODE, +}; + +enum booster_power { + NOTIFY_POWER_OFF, + NOTIFY_POWER_ON, +}; + +enum set_command { + NOTIFY_SET_OFF, + NOTIFY_SET_ON, +}; + +struct host_notify_dev { + const char *name; + struct device *dev; + int index; + int state; + int mode; + int booster; + void (*set_mode)(int); + void (*set_booster)(int); +}; + +struct host_notifier_platform_data { + struct host_notify_dev ndev; + int gpio; + void (*booster)(int); + void (*powered_booster)(int); + int (*usbhostd_start)(void); + int (*usbhostd_stop)(void); + int thread_enable; + int irq_enable; +}; + +extern void host_state_notify(struct host_notify_dev *ndev, int state); +extern int host_notify_dev_register(struct host_notify_dev *ndev); +extern void host_notify_dev_unregister(struct host_notify_dev *ndev); + +#endif /* __LINUX_HOST_NOTIFY_H__ */ |