]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
greybus: Revert "interface: Fetch and expose version of interface's firmware"
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 5 May 2016 03:19:58 +0000 (08:49 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 5 May 2016 20:33:20 +0000 (13:33 -0700)
This reverts commit b957ade7b3e4ab8c149c53346dbf02e977b7f3a7.

The interface version is now managed as part of the firmware-management
protocol. This operation is already removed from the greybus
specifications.

Drop interface version support from greybus.

Tested with gbsim (sysfs file not available after this patch).

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Acked-by: Sandeep Patil <sspatil@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/Documentation/sysfs-bus-greybus
drivers/staging/greybus/control.c
drivers/staging/greybus/control.h
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/interface.c
drivers/staging/greybus/interface.h

index 0e1c2a37b24f2ad9180d0cb2c0cf0677ee494fce..3740173e3cd0056f80584b3cef0d6353c15856a3 100644 (file)
@@ -111,14 +111,6 @@ Contact:   Greg Kroah-Hartman <greg@kroah.com>
 Description:
                Vendor ID of a Greybus interface.
 
-What:          /sys/bus/greybus/devices/N-M.I/version
-Date:          October 2015
-KernelVersion: 4.XX
-Contact:       Greg Kroah-Hartman <greg@kroah.com>
-Description:
-               Interface version represented as <16 bit major number>.<16 bit
-               minor number>.
-
 What:          /sys/bus/greybus/devices/N-M.I/voltage_now
 Date:          March 2016
 KernelVersion: 4.XX
index 1b28899cd3366f9e8eda469a2eb4b943d418f17c..13c68f3f01debc645d904e08a9f789d3d78dc879 100644 (file)
@@ -156,34 +156,6 @@ int gb_control_mode_switch_operation(struct gb_control *control)
                                                NULL, 0);
 }
 
-int gb_control_get_interface_version_operation(struct gb_interface *intf)
-{
-       struct gb_control_interface_version_response response;
-       struct gb_connection *connection = intf->control->connection;
-       int ret;
-
-       if (intf->quirks & GB_INTERFACE_QUIRK_NO_INTERFACE_VERSION)
-               return 0;
-
-       ret = gb_operation_sync(connection, GB_CONTROL_TYPE_INTERFACE_VERSION,
-                               NULL, 0, &response, sizeof(response));
-       if (ret) {
-               dev_err(&connection->intf->dev,
-                       "failed to get interface version: %d\n", ret);
-               /*
-                * FIXME: Return success until the time we bump version of
-                * control protocol. The interface-version is already set to
-                * 0.0, so no need to update that.
-                */
-               return 0;
-       }
-
-       intf->version_major = le16_to_cpu(response.major);
-       intf->version_minor = le16_to_cpu(response.minor);
-
-       return 0;
-}
-
 int gb_control_timesync_enable(struct gb_control *control, u8 count,
                               u64 frame_time, u32 strobe_delay, u32 refclk)
 {
index f108bcc2e0590dc1306a67e94d051e830bad497d..773cdde4dc44d0ad6ce8dae70cbfcaa9507912ae 100644 (file)
@@ -40,7 +40,6 @@ int gb_control_mode_switch_operation(struct gb_control *control);
 int gb_control_get_manifest_size_operation(struct gb_interface *intf);
 int gb_control_get_manifest_operation(struct gb_interface *intf, void *manifest,
                                      size_t size);
-int gb_control_get_interface_version_operation(struct gb_interface *intf);
 int gb_control_timesync_enable(struct gb_control *control, u8 count,
                               u64 frame_time, u32 strobe_delay, u32 refclk);
 int gb_control_timesync_disable(struct gb_control *control);
index b73acc0c3ee582ceabcb089b8e2df018612f7520..5f5b92864ac29504b4701cadb28e169c5b6dd225 100644 (file)
@@ -121,7 +121,7 @@ struct gb_protocol_version_response {
 #define GB_CONTROL_TYPE_TIMESYNC_ENABLE                0x07
 #define GB_CONTROL_TYPE_TIMESYNC_DISABLE       0x08
 #define GB_CONTROL_TYPE_TIMESYNC_AUTHORITATIVE 0x09
-#define GB_CONTROL_TYPE_INTERFACE_VERSION      0x0a
+/*     Unused                                  0x0a */
 #define GB_CONTROL_TYPE_BUNDLE_VERSION         0x0b
 #define GB_CONTROL_TYPE_MODE_SWITCH            0x0e
 
@@ -164,12 +164,6 @@ struct gb_control_disconnected_request {
 } __packed;
 /* Control protocol [dis]connected response has no payload */
 
-/* Control protocol interface version request has no payload */
-struct gb_control_interface_version_response {
-       __le16                  major;
-       __le16                  minor;
-} __packed;
-
 #define GB_TIMESYNC_MAX_STROBES                        0x04
 
 struct gb_control_timesync_enable_request {
index b5ad1ac9d3dfd2d1fd7c37cad5481baaea37bbe5..aed45bcef376abe531b9d3d0a54272c565937d65 100644 (file)
@@ -254,16 +254,6 @@ gb_interface_attr(vendor_id, "0x%08x");
 gb_interface_attr(product_id, "0x%08x");
 gb_interface_attr(serial_number, "0x%016llx");
 
-static ssize_t version_show(struct device *dev, struct device_attribute *attr,
-                           char *buf)
-{
-       struct gb_interface *intf = to_gb_interface(dev);
-
-       return scnprintf(buf, PAGE_SIZE, "%u.%u\n", intf->version_major,
-                        intf->version_minor);
-}
-static DEVICE_ATTR_RO(version);
-
 static ssize_t voltage_now_show(struct device *dev,
                                struct device_attribute *attr, char *buf)
 {
@@ -328,7 +318,6 @@ static struct attribute *interface_attrs[] = {
        &dev_attr_vendor_id.attr,
        &dev_attr_product_id.attr,
        &dev_attr_serial_number.attr,
-       &dev_attr_version.attr,
        &dev_attr_voltage_now.attr,
        &dev_attr_current_now.attr,
        &dev_attr_power_now.attr,
@@ -621,10 +610,6 @@ int gb_interface_enable(struct gb_interface *intf)
                goto err_destroy_bundles;
        }
 
-       ret = gb_control_get_interface_version_operation(intf);
-       if (ret)
-               goto err_destroy_bundles;
-
        ret = gb_control_get_bundle_versions(intf->control);
        if (ret)
                goto err_destroy_bundles;
index 7a0366d08e325d6ea0af6af26798c6a4c5ba24a3..7a2162a89f05a4a3a17d0f0f70abf648bff1db5f 100644 (file)
@@ -31,9 +31,6 @@ struct gb_interface {
        u32 product_id;
        u64 serial_number;
 
-       u16 version_major;
-       u16 version_minor;
-
        struct gb_host_device *hd;
        struct gb_module *module;