manson-hcs-3xxx: Publish driver options.

This commit is contained in:
Aurelien Jacobs 2014-11-19 23:53:10 +01:00
parent 6ec3ef9b92
commit f3ba3c119c
1 changed files with 11 additions and 0 deletions

View File

@ -26,6 +26,11 @@
#include "protocol.h" #include "protocol.h"
static const uint32_t drvopts[] = {
/* Device class */
SR_CONF_POWER_SUPPLY,
};
static const uint32_t scanopts[] = { static const uint32_t scanopts[] = {
SR_CONF_CONN, SR_CONF_CONN,
SR_CONF_SERIALCOMM, SR_CONF_SERIALCOMM,
@ -329,6 +334,12 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
(void)cg; (void)cg;
if (key == SR_CONF_DEVICE_OPTIONS && !sdi) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t));
return SR_OK;
}
if (!sdi) if (!sdi)
return SR_ERR_ARG; return SR_ERR_ARG;
devc = sdi->priv; devc = sdi->priv;