greybus: interface: Prefix DDBL1 attributes with ddbl1_ instead of unipro_
The Device descriptor block Level 1 (DDBL1) attributes are specified by the MIPI standard and prefixing them with 'unipro_' isn't the best thing to do. They should be prefixed with DDBL1 instead. To make it more readable/clear: - rename macros and variable by prefixing them with ddbl1_. - write full names for mfg and prod ids as manufacturer and product ids. - replace mfg (manufacturing) with mfr (manufacturer) Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Родитель
a5a7723a0d
Коммит
b32a5c5346
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
#include "greybus.h"
|
#include "greybus.h"
|
||||||
|
|
||||||
#define ES2_UNIPRO_MFG_ID 0x00000126
|
#define ES2_DDBL1_MFR_ID 0x00000126
|
||||||
#define ES2_UNIPRO_PROD_ID 0x00001000
|
#define ES2_DDBL1_PROD_ID 0x00001000
|
||||||
|
|
||||||
struct gb_firmware {
|
struct gb_firmware {
|
||||||
struct gb_connection *connection;
|
struct gb_connection *connection;
|
||||||
|
@ -49,8 +49,8 @@ static void firmware_es2_fixup_vid_pid(struct gb_firmware *firmware)
|
||||||
* - Bridge ASIC chip isn't ES2
|
* - Bridge ASIC chip isn't ES2
|
||||||
* - Received non-zero Vendor/Product ids
|
* - Received non-zero Vendor/Product ids
|
||||||
*/
|
*/
|
||||||
if (intf->unipro_mfg_id != ES2_UNIPRO_MFG_ID ||
|
if (intf->ddbl1_manufacturer_id != ES2_DDBL1_MFR_ID ||
|
||||||
intf->unipro_prod_id != ES2_UNIPRO_PROD_ID ||
|
intf->ddbl1_product_id != ES2_DDBL1_PROD_ID ||
|
||||||
intf->vendor_id != 0 || intf->product_id != 0)
|
intf->vendor_id != 0 || intf->product_id != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ static int download_firmware(struct gb_firmware *firmware, u8 stage)
|
||||||
*/
|
*/
|
||||||
snprintf(firmware_name, sizeof(firmware_name),
|
snprintf(firmware_name, sizeof(firmware_name),
|
||||||
"ara:%08x:%08x:%08x:%08x:%02x.tftf",
|
"ara:%08x:%08x:%08x:%08x:%02x.tftf",
|
||||||
intf->unipro_mfg_id, intf->unipro_prod_id,
|
intf->ddbl1_manufacturer_id, intf->ddbl1_product_id,
|
||||||
firmware->vendor_id, firmware->product_id, stage);
|
firmware->vendor_id, firmware->product_id, stage);
|
||||||
|
|
||||||
return request_firmware(&firmware->fw, firmware_name,
|
return request_firmware(&firmware->fw, firmware_name,
|
||||||
|
|
|
@ -749,8 +749,8 @@ struct gb_svc_intf_device_id_request {
|
||||||
struct gb_svc_intf_hotplug_request {
|
struct gb_svc_intf_hotplug_request {
|
||||||
__u8 intf_id;
|
__u8 intf_id;
|
||||||
struct {
|
struct {
|
||||||
__le32 unipro_mfg_id;
|
__le32 ddbl1_mfr_id;
|
||||||
__le32 unipro_prod_id;
|
__le32 ddbl1_prod_id;
|
||||||
__le32 ara_vend_id;
|
__le32 ara_vend_id;
|
||||||
__le32 ara_prod_id;
|
__le32 ara_prod_id;
|
||||||
} data;
|
} data;
|
||||||
|
|
|
@ -26,8 +26,8 @@ struct gb_interface {
|
||||||
char *product_string;
|
char *product_string;
|
||||||
|
|
||||||
/* Information taken from the hotplug event */
|
/* Information taken from the hotplug event */
|
||||||
u32 unipro_mfg_id;
|
u32 ddbl1_manufacturer_id;
|
||||||
u32 unipro_prod_id;
|
u32 ddbl1_product_id;
|
||||||
u32 vendor_id;
|
u32 vendor_id;
|
||||||
u32 product_id;
|
u32 product_id;
|
||||||
|
|
||||||
|
|
|
@ -417,8 +417,8 @@ static void gb_svc_process_intf_hotplug(struct gb_operation *operation)
|
||||||
goto destroy_interface;
|
goto destroy_interface;
|
||||||
}
|
}
|
||||||
|
|
||||||
intf->unipro_mfg_id = le32_to_cpu(request->data.unipro_mfg_id);
|
intf->ddbl1_manufacturer_id = le32_to_cpu(request->data.ddbl1_mfr_id);
|
||||||
intf->unipro_prod_id = le32_to_cpu(request->data.unipro_prod_id);
|
intf->ddbl1_product_id = le32_to_cpu(request->data.ddbl1_prod_id);
|
||||||
intf->vendor_id = le32_to_cpu(request->data.ara_vend_id);
|
intf->vendor_id = le32_to_cpu(request->data.ara_vend_id);
|
||||||
intf->product_id = le32_to_cpu(request->data.ara_prod_id);
|
intf->product_id = le32_to_cpu(request->data.ara_prod_id);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче