diff --git a/drivers/staging/greybus/control.c b/drivers/staging/greybus/control.c index 37a30b3075ce..a08a79da45d7 100644 --- a/drivers/staging/greybus/control.c +++ b/drivers/staging/greybus/control.c @@ -329,6 +329,9 @@ int gb_control_bundle_activate(struct gb_control *control, u8 bundle_id) struct gb_control_bundle_pm_response response; int ret; + if (!control->has_bundle_activate) + return 0; + request.bundle_id = bundle_id; ret = gb_operation_sync(control->connection, GB_CONTROL_TYPE_BUNDLE_ACTIVATE, &request, @@ -528,6 +531,10 @@ int gb_control_enable(struct gb_control *control) if (control->protocol_major > 0 || control->protocol_minor > 1) control->has_bundle_version = true; + /* FIXME: use protocol version instead */ + if (!(control->intf->quirks & GB_INTERFACE_QUIRK_NO_PM)) + control->has_bundle_activate = true; + return 0; err_disable_connection: diff --git a/drivers/staging/greybus/control.h b/drivers/staging/greybus/control.h index f73ec3e297ba..f9a60daf9a72 100644 --- a/drivers/staging/greybus/control.h +++ b/drivers/staging/greybus/control.h @@ -19,6 +19,7 @@ struct gb_control { u8 protocol_major; u8 protocol_minor; + bool has_bundle_activate; bool has_bundle_version; char *vendor_string; diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c index 6abe1311058f..74fa298f5fe7 100644 --- a/drivers/staging/greybus/interface.c +++ b/drivers/staging/greybus/interface.c @@ -411,7 +411,8 @@ static int gb_interface_read_and_clear_init_status(struct gb_interface *intf) */ bootrom_quirks = GB_INTERFACE_QUIRK_NO_CPORT_FEATURES | GB_INTERFACE_QUIRK_FORCED_DISABLE | - GB_INTERFACE_QUIRK_LEGACY_MODE_SWITCH; + GB_INTERFACE_QUIRK_LEGACY_MODE_SWITCH | + GB_INTERFACE_QUIRK_NO_PM; switch (init_status) { case GB_INIT_BOOTROM_UNIPRO_BOOT_STARTED: case GB_INIT_BOOTROM_FALLBACK_UNIPRO_BOOT_STARTED: diff --git a/drivers/staging/greybus/interface.h b/drivers/staging/greybus/interface.h index daa9759149a5..a08d10480654 100644 --- a/drivers/staging/greybus/interface.h +++ b/drivers/staging/greybus/interface.h @@ -23,6 +23,7 @@ enum gb_interface_type { #define GB_INTERFACE_QUIRK_NO_ARA_IDS BIT(2) #define GB_INTERFACE_QUIRK_FORCED_DISABLE BIT(3) #define GB_INTERFACE_QUIRK_LEGACY_MODE_SWITCH BIT(4) +#define GB_INTERFACE_QUIRK_NO_PM BIT(5) struct gb_interface { struct device dev;