Commit 34c6507c authored by Matt Porter's avatar Matt Porter Committed by Greg Kroah-Hartman

greybus: add pwm protocol driver

Add a PWM driver that implements the Greybus PWM protocol.
Signed-off-by: default avatarMatt Porter <mporter@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 5d2207e7
...@@ -11,6 +11,7 @@ greybus-y := core.o \ ...@@ -11,6 +11,7 @@ greybus-y := core.o \
operation.o \ operation.o \
i2c-gb.o \ i2c-gb.o \
gpio-gb.o \ gpio-gb.o \
pwm-gb.o \
sdio-gb.o \ sdio-gb.o \
uart-gb.o \ uart-gb.o \
battery-gb.o battery-gb.o
......
...@@ -32,6 +32,7 @@ enum greybus_protocol { ...@@ -32,6 +32,7 @@ enum greybus_protocol {
GREYBUS_PROTOCOL_HID = 0x05, GREYBUS_PROTOCOL_HID = 0x05,
GREYBUS_PROTOCOL_SDIO = 0x06, GREYBUS_PROTOCOL_SDIO = 0x06,
GREYBUS_PROTOCOL_BATTERY = 0x08, GREYBUS_PROTOCOL_BATTERY = 0x08,
GREYBUS_PROTOCOL_PWM = 0x09,
GREYBUS_PROTOCOL_LED = 0x0e, GREYBUS_PROTOCOL_LED = 0x0e,
/* ... */ /* ... */
GREYBUS_PROTOCOL_VENDOR = 0xff, GREYBUS_PROTOCOL_VENDOR = 0xff,
......
...@@ -177,6 +177,10 @@ bool gb_protocol_init(void) ...@@ -177,6 +177,10 @@ bool gb_protocol_init(void)
pr_err("error initializing i2c protocol\n"); pr_err("error initializing i2c protocol\n");
ret = false; ret = false;
} }
if (!gb_pwm_protocol_init()) {
pr_err("error initializing pwm protocol\n");
ret = false;
}
if (!gb_uart_protocol_init()) { if (!gb_uart_protocol_init()) {
pr_err("error initializing uart protocol\n"); pr_err("error initializing uart protocol\n");
ret = false; ret = false;
......
...@@ -55,6 +55,9 @@ extern void gb_gpio_protocol_exit(void); ...@@ -55,6 +55,9 @@ extern void gb_gpio_protocol_exit(void);
extern bool gb_i2c_protocol_init(void); extern bool gb_i2c_protocol_init(void);
extern void gb_i2c_protocol_exit(void); extern void gb_i2c_protocol_exit(void);
extern bool gb_pwm_protocol_init(void);
extern void gb_pwm_protocol_exit(void);
extern bool gb_uart_protocol_init(void); extern bool gb_uart_protocol_init(void);
extern void gb_uart_protocol_exit(void); extern void gb_uart_protocol_exit(void);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment