OSDN Git Service

greybus: endo: delete "0xXXXX" portion in sysfs "endo" directory
authorAlex Elder <elder@linaro.org>
Wed, 27 May 2015 16:17:53 +0000 (11:17 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 28 May 2015 21:45:56 +0000 (14:45 -0700)
With the Endo "id" attribute in place, there's no need to encode
the ID of an Endo in its sysfs path.  So get rid of it.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
22 files changed:
drivers/staging/greybus/Documentation/sysfs-bus-greybus
drivers/staging/greybus/Documentation/sysfs/endo/01/01/01/01/gpbridge00/gpio/.gitignore [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/01/gpbridge00/gpio/.gitignore with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/01/01/gpbridge00/i2c/.gitignore [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/01/gpbridge00/i2c/.gitignore with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/01/01/gpbridge00/usb/.gitignore [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/01/gpbridge00/usb/.gitignore with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/firmware [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/firmware with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/manifest [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/manifest with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/product_id [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/product_id with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/product_name [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/product_name with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/state [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/state with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/uid [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/uid with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/version_major [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/version_major with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/01/version_minor [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/version_minor with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/epm [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/epm with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/power [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/power with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/01/present [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/present with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/02/02/.gitignore [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/02/.gitignore with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/ap_intf_id [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/ap_intf_id with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/id [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/id with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/svc/svc/firmware [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/svc/firmware with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/svc/svc/serial_number [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/svc/serial_number with 100% similarity]
drivers/staging/greybus/Documentation/sysfs/endo/svc/svc/version [moved from drivers/staging/greybus/Documentation/sysfs/endo-TYPE/svc/version with 100% similarity]
drivers/staging/greybus/endo.c

index 9cd3e02..0268dd2 100644 (file)
@@ -1,4 +1,4 @@
-What:          /sys/bus/greybus/device/endo-0xXXXX
+What:          /sys/bus/greybus/device/endo
 Date:          October 2015
 KernelVersion: 4.XX
 Contact:       Greg Kroah-Hartman <greg@kroah.com>
@@ -7,7 +7,7 @@ Description:
                replaced with the numeric value of the endo layout
                scheme as documented in the ARA Module Developer Kit.
 
-What:          /sys/bus/greybus/device/endo-0xXXXX/id
+What:          /sys/bus/greybus/device/endo/id
 Date:          October 2015
 KernelVersion: 4.XX
 Contact:       Greg Kroah-Hartman <greg@kroah.com>
@@ -16,7 +16,7 @@ Description:
                defined by the the Endo layout scheme, documented in
                the ARA Module Developer Kit.
 
-What:          /sys/bus/greybus/device/endo-0xXXXX/ap_intf_id
+What:          /sys/bus/greybus/device/endo/ap_intf_id
 Date:          October 2015
 KernelVersion: 4.XX
 Contact:       Greg Kroah-Hartman <greg@kroah.com>
@@ -26,21 +26,21 @@ Description:
                The interface positions are defined in the ARA
                Module Developer Kit.
 
-What:          /sys/bus/greybus/device/endo-0xXXXX/svc/serial_number
+What:          /sys/bus/greybus/device/endo/svc/serial_number
 Date:          October 2015
 KernelVersion: 4.XX
 Contact:       Greg Kroah-Hartman <greg@kroah.com>
 Description:
                The serial number of the SVC device
 
-What:          /sys/bus/greybus/device/endo-0xXXXX/svc/version
+What:          /sys/bus/greybus/device/endo/svc/version
 Date:          October 2015
 KernelVersion: 4.XX
 Contact:       Greg Kroah-Hartman <greg@kroah.com>
 Description:
                The version number of the firmware in the SVC device.
 
-What:          /sys/bus/greybus/device/endo-0xXXXX/.../epm
+What:          /sys/bus/greybus/device/endo/../epm
 Date:          October 2015
 KernelVersion: 4.XX
 Contact:       Greg Kroah-Hartman <greg@kroah.com>
@@ -50,7 +50,7 @@ Description:
                Writing 1 to it turns it on, writing 0 to it turns it
                off.  Reading the value returns if it is on or off.
 
-What:          /sys/bus/greybus/device/endo-0xXXXX/.../power_control
+What:          /sys/bus/greybus/device/endo/.../power_control
 Date:          October 2015
 KernelVersion: 4.XX
 Contact:       Greg Kroah-Hartman <greg@kroah.com>
@@ -60,7 +60,7 @@ Description:
                to the module, writing 0 to it turns power off to the
                module.  Reading the value returns if it is on or off.
 
-What:          /sys/bus/greybus/device/endo-0xXXXX/.../present
+What:          /sys/bus/greybus/device/endo/.../present
 Date:          October 2015
 KernelVersion: 4.XX
 Contact:       Greg Kroah-Hartman <greg@kroah.com>
index aa89868..d71f328 100644 (file)
@@ -438,6 +438,7 @@ static int gb_endo_register(struct greybus_host_device *hd,
        int retval;
 
        endo->dev.parent = hd->parent;
+       endo->dev.init_name = "endo";
        endo->dev.bus = &greybus_bus_type;
        endo->dev.type = &greybus_endo_type;
        endo->dev.groups = endo_groups;
@@ -450,7 +451,6 @@ static int gb_endo_register(struct greybus_host_device *hd,
        strcpy(&endo->svc_info.serial_number[0], "042");
        strcpy(&endo->svc_info.version[0], "0.0");
 
-       dev_set_name(&endo->dev, "endo-0x%04x", endo->id);
        retval = device_add(&endo->dev);
        if (retval) {
                dev_err(hd->parent, "failed to add endo device of id 0x%04x\n",