Home
last modified time | relevance | path

Searched refs:opts (Results 1 – 25 of 128) sorted by relevance

123456

/drivers/usb/gadget/
Dandroid_configfs_uevent.c20 struct android_uevent_opts *opts = container_of(data, in android_work() local
46 if (!opts->dev) { in android_work()
59 dev = opts->dev; in android_work()
61 if (opts->connected != opts->sw_connected) { in android_work()
62 if (opts->connected) in android_work()
66 opts->sw_connected = opts->connected; in android_work()
68 if (opts->configured) in android_work()
130 struct android_uevent_opts *opts = dev_get_drvdata(pdev); in state_show() local
133 if (opts->configured) in state_show()
135 else if (opts->connected) in state_show()
[all …]
Dandroid_configfs_uevent.h45 int android_device_create(struct android_uevent_opts *opts);
52 void android_device_destroy(struct android_uevent_opts *opts);
67 void android_set_connected(struct android_uevent_opts *opts);
82 void android_set_disconnected(struct android_uevent_opts *opts);
97 void android_set_configured(struct android_uevent_opts *opts);
112 void android_set_unconfigured(struct android_uevent_opts *opts);
125 static inline int android_device_create(struct android_uevent_opts *opts) in android_device_create() argument
130 static inline void android_device_destroy(struct android_uevent_opts *opts) in android_device_destroy() argument
134 static inline void android_set_connected(struct android_uevent_opts *opts) in android_set_connected() argument
138 static inline void android_set_disconnected(struct android_uevent_opts *opts) in android_set_disconnected() argument
[all …]
/drivers/usb/gadget/function/
Du_ether_configfs.h19 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
21 usb_put_function_instance(&opts->func_inst); \
32 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
35 mutex_lock(&opts->lock); \
36 result = gether_get_dev_addr(opts->net, page, PAGE_SIZE); \
37 mutex_unlock(&opts->lock); \
45 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
48 mutex_lock(&opts->lock); \
49 if (opts->refcnt) { \
50 mutex_unlock(&opts->lock); \
[all …]
Duvc_configfs.c191 struct f_uvc_opts *opts; \
199 opts = to_f_uvc_opts(opts_item); \
201 mutex_lock(&opts->lock); \
203 mutex_unlock(&opts->lock); \
214 struct f_uvc_opts *opts; \
223 opts = to_f_uvc_opts(opts_item); \
225 mutex_lock(&opts->lock); \
226 if (ch->linked || opts->refcnt) { \
242 mutex_unlock(&opts->lock); \
309 struct f_uvc_opts *opts; \
[all …]
Df_uac1.c434 struct f_uac1_opts *opts = g_audio_to_uac1_opts(audio); in in_rq_cur() local
442 if ((FUIN_EN(opts) && (entity_id == USB_IN_FU_ID)) || in in_rq_cur()
443 (FUOUT_EN(opts) && (entity_id == USB_OUT_FU_ID))) { in in_rq_cur()
446 if (FUIN_EN(opts) && (entity_id == USB_IN_FU_ID)) in in_rq_cur()
485 struct f_uac1_opts *opts = g_audio_to_uac1_opts(audio); in in_rq_min() local
493 if ((FUIN_EN(opts) && (entity_id == USB_IN_FU_ID)) || in in_rq_min()
494 (FUOUT_EN(opts) && (entity_id == USB_OUT_FU_ID))) { in in_rq_min()
497 if (FUIN_EN(opts) && (entity_id == USB_IN_FU_ID)) in in_rq_min()
505 min_db = opts->p_volume_min; in in_rq_min()
507 min_db = opts->c_volume_min; in in_rq_min()
[all …]
Df_uvc.c651 struct f_uvc_opts *opts; in uvc_function_bind() local
656 opts = fi_to_f_uvc_opts(f->fi); in uvc_function_bind()
658 opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U); in uvc_function_bind()
659 opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); in uvc_function_bind()
660 opts->streaming_maxburst = min(opts->streaming_maxburst, 15U); in uvc_function_bind()
663 if (opts->streaming_maxburst && in uvc_function_bind()
664 (opts->streaming_maxpacket % 1024) != 0) { in uvc_function_bind()
665 opts->streaming_maxpacket = roundup(opts->streaming_maxpacket, 1024); in uvc_function_bind()
667 opts->streaming_maxpacket); in uvc_function_bind()
677 if (opts->streaming_maxpacket <= 1024) { in uvc_function_bind()
[all …]
Df_uac2.c803 static void setup_headers(struct f_uac2_opts *opts, in setup_headers() argument
845 if (EPIN_EN(opts)) in setup_headers()
847 if (EPOUT_EN(opts)) { in setup_headers()
851 if (FUOUT_EN(opts)) in setup_headers()
855 if (EPIN_EN(opts)) { in setup_headers()
858 if (FUIN_EN(opts)) in setup_headers()
864 if (EPOUT_EN(opts)) in setup_headers()
867 if (FUOUT_EN(opts) || FUIN_EN(opts)) { in setup_headers()
873 if (EPOUT_EN(opts)) { in setup_headers()
884 if (EPOUT_FBACK_IN_EN(opts)) { in setup_headers()
[all …]
Df_midi.c792 struct f_midi_opts *opts; in f_midi_unregister_card() local
794 opts = container_of(midi->func.fi, struct f_midi_opts, in f_midi_unregister_card()
796 android_clear_midi_device_info(&opts->android_midi_info); in f_midi_unregister_card()
805 struct f_midi_opts *opts; in f_midi_register_card() local
863 opts = container_of(midi->func.fi, struct f_midi_opts, func_inst); in f_midi_register_card()
864 err = android_set_midi_device_info(&opts->android_midi_info, card->number, rmidi->device); in f_midi_register_card()
1087 struct f_midi_opts *opts = to_f_midi_opts(item); in midi_attr_release() local
1089 usb_put_function_instance(&opts->func_inst); in midi_attr_release()
1099 struct f_midi_opts *opts = to_f_midi_opts(item); \
1102 mutex_lock(&opts->lock); \
[all …]
Df_uac1_legacy.c326 struct f_uac1_legacy_opts *opts; in f_audio_out_ep_complete() local
330 opts = container_of(audio->card.func.fi, struct f_uac1_legacy_opts, in f_audio_out_ep_complete()
332 audio_buf_size = opts->audio_buf_size; in f_audio_out_ep_complete()
580 struct f_uac1_legacy_opts *opts; in f_audio_set_alt() local
586 opts = container_of(f->fi, struct f_uac1_legacy_opts, func_inst); in f_audio_set_alt()
587 req_buf_size = opts->req_buf_size; in f_audio_set_alt()
588 req_count = opts->req_count; in f_audio_set_alt()
589 audio_buf_size = opts->audio_buf_size; in f_audio_set_alt()
810 struct f_uac1_legacy_opts *opts = to_f_uac1_opts(item); in f_uac1_attr_release() local
812 usb_put_function_instance(&opts->func_inst); in f_uac1_attr_release()
[all …]
Df_sourcesink.c449 struct f_ss_opts *opts; in sourcesink_free_func() local
451 opts = container_of(f->fi, struct f_ss_opts, func_inst); in sourcesink_free_func()
453 mutex_lock(&opts->lock); in sourcesink_free_func()
454 opts->refcnt--; in sourcesink_free_func()
455 mutex_unlock(&opts->lock); in sourcesink_free_func()
891 struct f_ss_opts *opts = to_f_ss_opts(item); in f_ss_opts_pattern_show() local
894 mutex_lock(&opts->lock); in f_ss_opts_pattern_show()
895 result = sprintf(page, "%u\n", opts->pattern); in f_ss_opts_pattern_show()
896 mutex_unlock(&opts->lock); in f_ss_opts_pattern_show()
904 struct f_ss_opts *opts = to_f_ss_opts(item); in f_ss_opts_pattern_store() local
[all …]
Df_rndis.c824 struct f_rndis_opts *opts; in rndis_borrow_net() local
826 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_borrow_net()
827 if (opts->bound) in rndis_borrow_net()
828 gether_cleanup(netdev_priv(opts->net)); in rndis_borrow_net()
830 free_netdev(opts->net); in rndis_borrow_net()
831 opts->borrowed_net = opts->bound = true; in rndis_borrow_net()
832 opts->net = net; in rndis_borrow_net()
885 struct f_rndis_opts *opts; in rndis_free_inst() local
887 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_free_inst()
888 if (!opts->borrowed_net) { in rndis_free_inst()
[all …]
Df_ncm.c945 const struct ndp_parser_opts *opts = ncm->parser_opts; in package_for_tx() local
947 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in package_for_tx()
961 put_ncm(&ntb_iter, opts->block_length, new_len); in package_for_tx()
962 put_ncm(&ntb_iter, opts->ndp_index, ndp_index); in package_for_tx()
965 new_len = opts->ndp_size + in package_for_tx()
1007 const struct ndp_parser_opts *opts = ncm->parser_opts; in ncm_wrap_ntb() local
1011 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in ncm_wrap_ntb()
1042 ncb_len = opts->nth_size; in ncm_wrap_ntb()
1054 put_unaligned_le32(opts->nth_sign, ntb_data); in ncm_wrap_ntb()
1057 put_unaligned_le16(opts->nth_size, ntb_data++); in ncm_wrap_ntb()
[all …]
Df_subset.c417 struct f_gether_opts *opts; in geth_free_inst() local
419 opts = container_of(f, struct f_gether_opts, func_inst); in geth_free_inst()
420 if (opts->bound) in geth_free_inst()
421 gether_cleanup(netdev_priv(opts->net)); in geth_free_inst()
423 free_netdev(opts->net); in geth_free_inst()
424 kfree(opts); in geth_free_inst()
429 struct f_gether_opts *opts; in geth_alloc_inst() local
431 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in geth_alloc_inst()
432 if (!opts) in geth_alloc_inst()
434 mutex_init(&opts->lock); in geth_alloc_inst()
[all …]
Df_midi2.c2107 static ssize_t f_midi2_opts_uint_show(struct f_midi2_opts *opts, in f_midi2_opts_uint_show() argument
2112 mutex_lock(&opts->lock); in f_midi2_opts_uint_show()
2114 mutex_unlock(&opts->lock); in f_midi2_opts_uint_show()
2118 static ssize_t f_midi2_opts_uint_store(struct f_midi2_opts *opts, in f_midi2_opts_uint_store() argument
2125 mutex_lock(&opts->lock); in f_midi2_opts_uint_store()
2126 if (opts->refcnt) { in f_midi2_opts_uint_store()
2143 mutex_unlock(&opts->lock); in f_midi2_opts_uint_store()
2148 static ssize_t f_midi2_opts_bool_store(struct f_midi2_opts *opts, in f_midi2_opts_bool_store() argument
2154 mutex_lock(&opts->lock); in f_midi2_opts_bool_store()
2155 if (opts->refcnt) { in f_midi2_opts_bool_store()
[all …]
Df_hid.c1049 struct f_hid_opts *opts = to_f_hid_opts(item); in hid_attr_release() local
1051 usb_put_function_instance(&opts->func_inst); in hid_attr_release()
1061 struct f_hid_opts *opts = to_f_hid_opts(item); \
1064 mutex_lock(&opts->lock); \
1065 result = sprintf(page, "%d\n", opts->name); \
1066 mutex_unlock(&opts->lock); \
1074 struct f_hid_opts *opts = to_f_hid_opts(item); \
1078 mutex_lock(&opts->lock); \
1079 if (opts->refcnt) { \
1092 opts->name = num; \
[all …]
Df_eem.c592 struct f_eem_opts *opts; in eem_free_inst() local
594 opts = container_of(f, struct f_eem_opts, func_inst); in eem_free_inst()
595 if (opts->bound) in eem_free_inst()
596 gether_cleanup(netdev_priv(opts->net)); in eem_free_inst()
598 free_netdev(opts->net); in eem_free_inst()
599 kfree(opts); in eem_free_inst()
604 struct f_eem_opts *opts; in eem_alloc_inst() local
606 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in eem_alloc_inst()
607 if (!opts) in eem_alloc_inst()
609 mutex_init(&opts->lock); in eem_alloc_inst()
[all …]
Df_printer.c1218 struct f_printer_opts *opts = to_f_printer_opts(item); in printer_attr_release() local
1220 usb_put_function_instance(&opts->func_inst); in printer_attr_release()
1230 struct f_printer_opts *opts = to_f_printer_opts(item); in f_printer_opts_pnp_string_show() local
1233 mutex_lock(&opts->lock); in f_printer_opts_pnp_string_show()
1234 if (!opts->pnp_string) in f_printer_opts_pnp_string_show()
1237 result = strscpy(page, opts->pnp_string, PAGE_SIZE); in f_printer_opts_pnp_string_show()
1246 mutex_unlock(&opts->lock); in f_printer_opts_pnp_string_show()
1254 struct f_printer_opts *opts = to_f_printer_opts(item); in f_printer_opts_pnp_string_store() local
1258 mutex_lock(&opts->lock); in f_printer_opts_pnp_string_store()
1266 if (opts->pnp_string_allocated) in f_printer_opts_pnp_string_store()
[all …]
Df_serial.c258 struct f_serial_opts *opts = to_f_serial_opts(item); in serial_attr_release() local
260 usb_put_function_instance(&opts->func_inst); in serial_attr_release()
308 struct f_serial_opts *opts; in gser_free_inst() local
310 opts = container_of(f, struct f_serial_opts, func_inst); in gser_free_inst()
311 gserial_free_line(opts->port_num); in gser_free_inst()
312 kfree(opts); in gser_free_inst()
317 struct f_serial_opts *opts; in gser_alloc_inst() local
320 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in gser_alloc_inst()
321 if (!opts) in gser_alloc_inst()
324 opts->func_inst.free_func_inst = gser_free_inst; in gser_alloc_inst()
[all …]
Df_loopback.c221 struct f_lb_opts *opts; in lb_free_func() local
223 opts = container_of(f->fi, struct f_lb_opts, func_inst); in lb_free_func()
225 mutex_lock(&opts->lock); in lb_free_func()
226 opts->refcnt--; in lb_free_func()
227 mutex_unlock(&opts->lock); in lb_free_func()
473 struct f_lb_opts *opts = to_f_lb_opts(item); in f_lb_opts_qlen_show() local
476 mutex_lock(&opts->lock); in f_lb_opts_qlen_show()
477 result = sprintf(page, "%d\n", opts->qlen); in f_lb_opts_qlen_show()
478 mutex_unlock(&opts->lock); in f_lb_opts_qlen_show()
486 struct f_lb_opts *opts = to_f_lb_opts(item); in f_lb_opts_qlen_store() local
[all …]
/drivers/nvme/host/
Dfabrics.c133 if (ctrl->opts->mask & NVMF_OPT_TRADDR) in nvmf_get_address()
134 len += scnprintf(buf, size, "traddr=%s", ctrl->opts->traddr); in nvmf_get_address()
135 if (ctrl->opts->mask & NVMF_OPT_TRSVCID) in nvmf_get_address()
137 (len) ? "," : "", ctrl->opts->trsvcid); in nvmf_get_address()
138 if (ctrl->opts->mask & NVMF_OPT_HOST_TRADDR) in nvmf_get_address()
140 (len) ? "," : "", ctrl->opts->host_traddr); in nvmf_get_address()
141 if (ctrl->opts->mask & NVMF_OPT_HOST_IFACE) in nvmf_get_address()
143 (len) ? "," : "", ctrl->opts->host_iface); in nvmf_get_address()
387 uuid_copy(&data->hostid, &ctrl->opts->host->id); in nvmf_connect_data_prep()
389 strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); in nvmf_connect_data_prep()
[all …]
Dfabrics.h165 struct nvmf_ctrl_options *opts);
170 struct nvmf_ctrl_options *opts) in nvmf_ctlr_matches_baseopts() argument
175 strcmp(opts->subsysnqn, ctrl->opts->subsysnqn) || in nvmf_ctlr_matches_baseopts()
176 strcmp(opts->host->nqn, ctrl->opts->host->nqn) || in nvmf_ctlr_matches_baseopts()
177 !uuid_equal(&opts->host->id, &ctrl->opts->host->id)) in nvmf_ctlr_matches_baseopts()
186 !strcmp(ctrl->opts->subsysnqn, NVME_DISC_SUBSYS_NAME)) in nvmf_ctrl_subsysnqn()
187 return ctrl->opts->subsysnqn; in nvmf_ctrl_subsysnqn()
199 static inline unsigned int nvmf_nr_io_queues(struct nvmf_ctrl_options *opts) in nvmf_nr_io_queues() argument
201 return min(opts->nr_io_queues, num_online_cpus()) + in nvmf_nr_io_queues()
202 min(opts->nr_write_queues, num_online_cpus()) + in nvmf_nr_io_queues()
[all …]
Dsysfs.c264 return sysfs_emit(buf, "%s\n", ctrl->opts->host->nqn); in nvme_sysfs_show_hostnqn()
274 return sysfs_emit(buf, "%pU\n", &ctrl->opts->host->id); in nvme_sysfs_show_hostid()
292 struct nvmf_ctrl_options *opts = ctrl->opts; in nvme_ctrl_loss_tmo_show() local
294 if (ctrl->opts->max_reconnects == -1) in nvme_ctrl_loss_tmo_show()
297 opts->max_reconnects * opts->reconnect_delay); in nvme_ctrl_loss_tmo_show()
304 struct nvmf_ctrl_options *opts = ctrl->opts; in nvme_ctrl_loss_tmo_store() local
312 opts->max_reconnects = -1; in nvme_ctrl_loss_tmo_store()
314 opts->max_reconnects = DIV_ROUND_UP(ctrl_loss_tmo, in nvme_ctrl_loss_tmo_store()
315 opts->reconnect_delay); in nvme_ctrl_loss_tmo_store()
326 if (ctrl->opts->reconnect_delay == -1) in nvme_ctrl_reconnect_delay_show()
[all …]
/drivers/net/ppp/
Dppp_mppe.h34 #define MPPE_OPTS_TO_CI(opts, ci) \ argument
39 if (opts & MPPE_OPT_STATEFUL) \
48 if (opts & MPPE_OPT_128) \
50 if (opts & MPPE_OPT_40) \
56 #define MPPE_CI_TO_OPTS(ci, opts) \ argument
60 opts = 0; \
64 opts |= MPPE_OPT_STATEFUL; \
68 opts |= MPPE_OPT_128; \
70 opts |= MPPE_OPT_40; \
74 opts |= MPPE_OPT_56; \
[all …]
/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
Dxtlv.c14 static int brcmf_xtlv_header_size(u16 opts) in brcmf_xtlv_header_size() argument
18 if (opts & BRCMF_XTLV_OPTION_IDU8) in brcmf_xtlv_header_size()
20 if (opts & BRCMF_XTLV_OPTION_LENU8) in brcmf_xtlv_header_size()
26 int brcmf_xtlv_data_size(int dlen, u16 opts) in brcmf_xtlv_data_size() argument
30 hsz = brcmf_xtlv_header_size(opts); in brcmf_xtlv_data_size()
31 if (opts & BRCMF_XTLV_OPTION_ALIGN32) in brcmf_xtlv_data_size()
38 const u8 *data, u16 opts) in brcmf_xtlv_pack_header() argument
43 if (!(opts & mask)) { in brcmf_xtlv_pack_header()
50 } else if ((opts & mask) == mask) { /* u8 id and u8 len */ in brcmf_xtlv_pack_header()
57 } else if (opts & BRCMF_XTLV_OPTION_IDU8) { /* u8 id, u16 len */ in brcmf_xtlv_pack_header()
[all …]
/drivers/crypto/caam/
Dqi.c182 struct qm_mcc_initfq opts; in create_caam_req_fq() local
198 memset(&opts, 0, sizeof(opts)); in create_caam_req_fq()
199 opts.we_mask = cpu_to_be16(QM_INITFQ_WE_FQCTRL | QM_INITFQ_WE_DESTWQ | in create_caam_req_fq()
202 opts.fqd.fq_ctrl = cpu_to_be16(QM_FQCTRL_CPCSTASH | QM_FQCTRL_CGE); in create_caam_req_fq()
203 qm_fqd_set_destwq(&opts.fqd, qm_channel_caam, 2); in create_caam_req_fq()
204 opts.fqd.context_b = cpu_to_be32(qman_fq_fqid(rsp_fq)); in create_caam_req_fq()
205 qm_fqd_context_a_set64(&opts.fqd, hwdesc); in create_caam_req_fq()
206 opts.fqd.cgid = qipriv.cgr.cgrid; in create_caam_req_fq()
208 ret = qman_init_fq(req_fq, fq_sched_flag, &opts); in create_caam_req_fq()
620 struct qm_mcc_initfq opts; in alloc_rsp_fq_cpu() local
[all …]

123456