greybus: firmware: prefix char-device with 'gb-'
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 15 Jun 2016 10:28:22 +0000 (15:58 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 16 Jun 2016 17:13:20 +0000 (10:13 -0700)
This will make it consistent with any other character devices we have
for greybus and let us identify greybus character devices easily.

Compiled tested only.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/Documentation/firmware/firmware-management
drivers/staging/greybus/Documentation/firmware/firmware.c
drivers/staging/greybus/fw-management.c

index bafe700..7997739 100644 (file)
@@ -49,14 +49,14 @@ Sysfs Interfaces - Firmware Management
 
 The Firmware Management Protocol interacts with Userspace using the character
 device interface. The character device will be present in /dev/ directory
-and will be named fw-mgmt-<N>. The number <N> is assigned at runtime.
+and will be named gb-fw-mgmt-<N>. The number <N> is assigned at runtime.
 
 Identifying the Character Device
 ================================
 
-There can be multiple devices present in /dev/ directory with name fw-mgmt-N and
-user first needs to identify the character device used for firmware-management
-for a particular interface.
+There can be multiple devices present in /dev/ directory with name gb-fw-mgmt-N
+and user first needs to identify the character device used for
+firmware-management for a particular interface.
 
 The Firmware Management core creates a device of class 'gb_fw_mgmt', which shall
 be used by the user to identify the right character device for it. The class
@@ -64,17 +64,17 @@ device is created within the Bundle directory for a particular Interface.
 
 For example this is how the class-device can be present:
 
-/sys/bus/greybus/devices/1-1/1-1.1/1-1.1.1/gb_fw_mgmt/fw-mgmt-0
+/sys/bus/greybus/devices/1-1/1-1.1/1-1.1.1/gb_fw_mgmt/gb-fw-mgmt-0
 
-The last name in this path: fw-mgmt-0 is precisely the name of the char device
-and so the device in this case will be:
+The last name in this path: gb-fw-mgmt-0 is precisely the name of the char
+device and so the device in this case will be:
 
-/dev/fw-mgmt-0.
+/dev/gb-fw-mgmt-0.
 
 Operations on the Char device
 =============================
 
-The Character device (fw-mgmt-0 in example) can be opened by the userspace
+The Character device (gb-fw-mgmt-0 in example) can be opened by the userspace
 application and it can perform various 'ioctl' operations on the device. The
 device doesn't support any read/write operations.
 
index 4a3782e..3c305f7 100644 (file)
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
 
        /* Make sure arguments are correct */
        if (argc != 2) {
-               printf("\nUsage: ./firmware <Path of the fw-mgmt-X dev>\n");
+               printf("\nUsage: ./firmware <Path of the gb-fw-mgmt-X dev>\n");
                return 0;
        }
 
index c9c28fc..ccd9d7c 100644 (file)
@@ -599,7 +599,7 @@ int gb_fw_mgmt_connection_init(struct gb_connection *connection)
        /* Add a soft link to the previously added char-dev within the bundle */
        fw_mgmt->class_device = device_create(fw_mgmt_class, fw_mgmt->parent,
                                              fw_mgmt->dev_num, NULL,
-                                             "fw-mgmt-%d", minor);
+                                             "gb-fw-mgmt-%d", minor);
        if (IS_ERR(fw_mgmt->class_device)) {
                ret = PTR_ERR(fw_mgmt->class_device);
                goto err_del_cdev;