From: Aurelien Jacobs Date: Wed, 19 Nov 2014 22:53:35 +0000 (+0100) Subject: motech-lps-30x: Publish driver options. X-Git-Tag: libsigrok-0.4.0~733 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=413f1944d166ae4f8f400b01a9467460620ccf8e;p=libsigrok.git motech-lps-30x: Publish driver options. --- diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index 40bb2d95..c2abb1fe 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -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;