]> sigrok.org Git - libsigrok.git/commitdiff
motech-lps-30x: Publish driver options.
authorAurelien Jacobs <redacted>
Wed, 19 Nov 2014 22:53:35 +0000 (23:53 +0100)
committerAurelien Jacobs <redacted>
Wed, 19 Nov 2014 22:53:35 +0000 (23:53 +0100)
src/hardware/motech-lps-30x/api.c

index 40bb2d9578873a0baa4f5708f714d07309d3eda6..c2abb1fe8208fb07b92a46332abf69968c623b29 100644 (file)
@@ -43,6 +43,12 @@ SR_PRIV int lps_query_status(struct sr_dev_inst* sdi);
 
 #define VENDOR_MOTECH "Motech"
 
+/** Driver capabilities generic. */
+static const uint32_t drvopts[] = {
+       /* Device class */
+       SR_CONF_POWER_SUPPLY,
+};
+
 /** Driver scanning options. */
 static const uint32_t scanopts[] = {
        SR_CONF_CONN,
@@ -738,6 +744,12 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
                                                  scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
                return SR_OK;
+       case SR_CONF_DEVICE_OPTIONS:
+               if (sdi != NULL)
+                       break;
+               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
+                               drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t));
+               return SR_OK;
        default:
                if (sdi == NULL)
                        return SR_ERR_ARG;