/openbmc/linux/drivers/leds/simple/ |
H A D | simatic-ipc-leds.c | 28 struct led_classdev cdev; member 48 return container_of(led_cd, struct simatic_ipc_led, cdev); in cdev_to_led() 81 struct led_classdev *cdev; in simatic_ipc_leds_probe() local 108 cdev = &ipcled->cdev; in simatic_ipc_leds_probe() 109 cdev->brightness_set = simatic_ipc_led_set_io; in simatic_ipc_leds_probe() 110 cdev->brightness_get = simatic_ipc_led_get_io; in simatic_ipc_leds_probe() 111 cdev->max_brightness = LED_ON; in simatic_ipc_leds_probe() 112 cdev->name = ipcled->name; in simatic_ipc_leds_probe() 114 err = devm_led_classdev_register(dev, cdev); in simatic_ipc_leds_probe()
|
/openbmc/linux/drivers/usb/gadget/function/ |
H A D | f_ncm.c | 529 struct usb_composite_dev *cdev = ncm->port.func.config->cdev; in ncm_do_notify() local 567 DBG(cdev, "notify speed %u\n", gether_bitrate(cdev->gadget)); in ncm_do_notify() 612 struct usb_composite_dev *cdev = ncm->port.func.config->cdev; in ncm_notify_complete() local 643 struct usb_composite_dev *cdev = f->config->cdev; in ncm_ep0out_complete() local 670 struct usb_composite_dev *cdev = f->config->cdev; in ncm_setup() local 850 struct usb_composite_dev *cdev = f->config->cdev; in ncm_set_alt() local 873 DBG(cdev, "reset ncm\n"); in ncm_set_alt() 1353 struct usb_composite_dev *cdev = f->config->cdev; in ncm_disable() local 1418 struct usb_composite_dev *cdev = c->cdev; in ncm_bind() local 1430 if (cdev->use_os_string) { in ncm_bind() [all …]
|
H A D | f_rndis.c | 376 struct usb_composite_dev *cdev = rndis->port.func.config->cdev; in rndis_response_available() local 401 struct usb_composite_dev *cdev = rndis->port.func.config->cdev; in rndis_response_complete() local 455 struct usb_composite_dev *cdev = f->config->cdev; in rndis_setup() local 529 struct usb_composite_dev *cdev = f->config->cdev; in rndis_set_alt() local 553 DBG(cdev, "init rndis\n"); in rndis_set_alt() 599 struct usb_composite_dev *cdev = f->config->cdev; in rndis_disable() local 625 struct usb_composite_dev *cdev = geth->func.config->cdev; in rndis_open() local 627 DBG(cdev, "%s\n", __func__); in rndis_open() 658 struct usb_composite_dev *cdev = c->cdev; in rndis_bind() local 671 if (cdev->use_os_string) { in rndis_bind() [all …]
|
/openbmc/linux/drivers/leds/ |
H A D | leds-max8997.c | 40 struct led_classdev cdev; member 152 container_of(led_cdev, struct max8997_led, cdev); in max8997_led_brightness_set() 168 container_of(led_cdev, struct max8997_led, cdev); in mode_show() 202 container_of(led_cdev, struct max8997_led, cdev); in mode_store() 248 led->cdev.name = name; in max8997_led_probe() 250 led->cdev.flags |= LED_CORE_SUSPENDRESUME; in max8997_led_probe() 251 led->cdev.brightness = 0; in max8997_led_probe() 252 led->cdev.groups = max8997_groups; in max8997_led_probe() 264 if (brightness > led->cdev.max_brightness) in max8997_led_probe() 265 brightness = led->cdev.max_brightness; in max8997_led_probe() [all …]
|
H A D | leds-nic78bx.c | 36 struct led_classdev cdev; member 39 static inline struct nic78bx_led *to_nic78bx_led(struct led_classdev *cdev) in to_nic78bx_led() argument 41 return container_of(cdev, struct nic78bx_led, cdev); in to_nic78bx_led() 44 static void nic78bx_brightness_set(struct led_classdev *cdev, in nic78bx_brightness_set() argument 47 struct nic78bx_led *nled = to_nic78bx_led(cdev); in nic78bx_brightness_set() 67 struct nic78bx_led *nled = to_nic78bx_led(cdev); in nic78bx_brightness_get() 82 .cdev = { 92 .cdev = { 102 .cdev = { 112 .cdev = { [all …]
|
H A D | leds-ip30.c | 16 struct led_classdev cdev; member 23 struct ip30_led *led = container_of(led_cdev, struct ip30_led, cdev); in ip30led_set() 42 data->cdev.name = "white:power"; in ip30led_create() 45 data->cdev.name = "red:fault"; in ip30led_create() 51 data->cdev.brightness = readl(data->reg); in ip30led_create() 52 data->cdev.max_brightness = 1; in ip30led_create() 53 data->cdev.brightness_set = ip30led_set; in ip30led_create() 55 return devm_led_classdev_register(&pdev->dev, &data->cdev); in ip30led_create()
|
H A D | leds-wm8350.c | 86 container_of(led_cdev, struct wm8350_led, cdev) 97 dev_err(led->cdev.dev, "Failed to enable ISINK: %d\n", ret); in wm8350_led_enable() 103 dev_err(led->cdev.dev, "Failed to enable DCDC: %d\n", ret); in wm8350_led_enable() 131 dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n", in wm8350_led_disable() 170 dev_err(led->cdev.dev, "Failed to set %duA: %d\n", in wm8350_led_set() 220 led->cdev.brightness_set_blocking = wm8350_led_set; in wm8350_led_probe() 221 led->cdev.default_trigger = pdata->default_trigger; in wm8350_led_probe() 222 led->cdev.name = pdata->name; in wm8350_led_probe() 223 led->cdev.flags |= LED_CORE_SUSPENDRESUME; in wm8350_led_probe() 242 return led_classdev_register(&pdev->dev, &led->cdev); in wm8350_led_probe() [all …]
|
H A D | leds-gpio.c | 23 struct led_classdev cdev; member 87 led_dat->cdev.brightness_set = gpio_led_set; in create_gpio_led() 93 led_dat->cdev.blink_set = gpio_blink_set; in create_gpio_led() 102 led_dat->cdev.brightness = state; in create_gpio_led() 103 led_dat->cdev.max_brightness = 1; in create_gpio_led() 105 led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME; in create_gpio_led() 107 led_dat->cdev.flags |= LED_PANIC_INDICATOR; in create_gpio_led() 116 led_dat->cdev.name = template->name; in create_gpio_led() 131 dev_warn(led_dat->cdev.dev, in create_gpio_led() 197 led_dat->cdev.dev->kobj.name); in gpio_leds_create() [all …]
|
/openbmc/linux/drivers/s390/char/ |
H A D | raw3270.c | 38 struct ccw_device *cdev; member 779 rp->cdev = cdev; in raw3270_setup_device() 800 struct ccw_device *cdev; in raw3270_setup_console() local 807 if (IS_ERR(cdev)) in raw3270_setup_console() 808 return ERR_CAST(cdev); in raw3270_setup_console() 870 get_device(&cdev->dev); in raw3270_create_device() 1099 cdev = rp->cdev; in raw3270_delete_device() 1100 rp->cdev = NULL; in raw3270_delete_device() 1102 cdev->handler = NULL; in raw3270_delete_device() 1105 put_device(&cdev->dev); in raw3270_delete_device() [all …]
|
H A D | tape_core.c | 237 dev_name(&device->cdev->dev)); in tape_med_state_work_handler() 442 device = dev_get_drvdata(&cdev->dev); in tape_generic_offline() 581 dev_set_drvdata(&cdev->dev, device); in tape_generic_probe() 582 cdev->handler = __tape_do_irq; in tape_generic_probe() 583 device->cdev = cdev; in tape_generic_probe() 584 ccw_device_get_id(cdev, &dev_id); in tape_generic_probe() 621 device = dev_get_drvdata(&cdev->dev); in tape_generic_remove() 655 dev_name(&device->cdev->dev)); in tape_generic_remove() 662 device = dev_get_drvdata(&cdev->dev); in tape_generic_remove() 665 dev_set_drvdata(&cdev->dev, NULL); in tape_generic_remove() [all …]
|
H A D | con3215.c | 355 raw = dev_get_drvdata(&cdev->dev); in raw3215_irq() 495 ccw_device_wait_idle(raw->cdev); in raw3215_make_room() 712 raw->cdev = cdev; in raw3215_probe() 713 dev_set_drvdata(&cdev->dev, raw); in raw3215_probe() 714 cdev->handler = raw3215_irq; in raw3215_probe() 737 ccw_device_set_offline(cdev); in raw3215_remove() 902 struct ccw_device *cdev; in con3215_init() local 928 if (IS_ERR(cdev)) in con3215_init() 932 raw->cdev = cdev; in con3215_init() 933 dev_set_drvdata(&cdev->dev, raw); in con3215_init() [all …]
|
H A D | tape_34xx.c | 266 dev_err(&device->cdev->dev, "An unexpected condition %d " in tape_34xx_erp_bug() 425 dev_warn (&device->cdev->dev, "A read error occurred " in tape_34xx_unit_check() 439 dev_warn (&device->cdev->dev, "A write error on the " in tape_34xx_unit_check() 447 dev_warn (&device->cdev->dev, "Writing the ID-mark " in tape_34xx_unit_check() 457 dev_warn (&device->cdev->dev, "The tape contains an " in tape_34xx_unit_check() 464 if (device->cdev->id.driver_info == tape_3480) in tape_34xx_unit_check() 598 if (device->cdev->id.driver_info == tape_3490) in tape_34xx_unit_check() 714 if (device->cdev->id.driver_info == tape_3490) in tape_34xx_unit_check() 724 if (device->cdev->id.driver_info == tape_3490) { in tape_34xx_unit_check() 1176 tape_34xx_online(struct ccw_device *cdev) in tape_34xx_online() argument [all …]
|
/openbmc/linux/drivers/net/can/m_can/ |
H A D | m_can_platform.c | 15 struct m_can_classdev cdev; member 23 return container_of(cdev, struct m_can_plat_priv, cdev); in cdev_to_priv() 26 static u32 iomap_read_reg(struct m_can_classdev *cdev, int reg) in iomap_read_reg() argument 28 struct m_can_plat_priv *priv = cdev_to_priv(cdev); in iomap_read_reg() 35 struct m_can_plat_priv *priv = cdev_to_priv(cdev); in iomap_read_fifo() 49 struct m_can_plat_priv *priv = cdev_to_priv(cdev); in iomap_write_reg() 56 static int iomap_write_fifo(struct m_can_classdev *cdev, int offset, in iomap_write_fifo() argument 59 struct m_can_plat_priv *priv = cdev_to_priv(cdev); in iomap_write_fifo() 183 struct m_can_classdev *mcan_class = &priv->cdev; in m_can_plat_remove() 193 struct m_can_classdev *mcan_class = &priv->cdev; in m_can_runtime_suspend() [all …]
|
H A D | m_can_pci.c | 25 struct m_can_classdev cdev; member 30 static inline struct m_can_pci_priv *cdev_to_priv(struct m_can_classdev *cdev) in cdev_to_priv() argument 32 return container_of(cdev, struct m_can_pci_priv, cdev); in cdev_to_priv() 35 static u32 iomap_read_reg(struct m_can_classdev *cdev, int reg) in iomap_read_reg() argument 37 struct m_can_pci_priv *priv = cdev_to_priv(cdev); in iomap_read_reg() 42 static int iomap_read_fifo(struct m_can_classdev *cdev, int offset, void *val, size_t val_count) in iomap_read_fifo() argument 44 struct m_can_pci_priv *priv = cdev_to_priv(cdev); in iomap_read_fifo() 56 static int iomap_write_reg(struct m_can_classdev *cdev, int reg, int val) in iomap_write_reg() argument 58 struct m_can_pci_priv *priv = cdev_to_priv(cdev); in iomap_write_reg() 65 static int iomap_write_fifo(struct m_can_classdev *cdev, int offset, in iomap_write_fifo() argument [all …]
|
/openbmc/linux/drivers/s390/cio/ |
H A D | qdio_main.c | 768 wake_up(&cdev->private->wait_q); in qdio_int_handler() 812 wake_up(&cdev->private->wait_q); in qdio_int_handler() 828 if (!cdev || !cdev->private) in qdio_get_ssqd_desc() 831 ccw_device_get_schid(cdev, &schid); in qdio_get_ssqd_desc() 839 struct ccw_device *cdev = irq->cdev; in qdio_cancel_ccw() local 882 ccw_device_get_schid(cdev, &schid); in qdio_shutdown() 926 ccw_device_get_schid(cdev, &schid); in qdio_free() 932 cdev->private->qdio_data = NULL; in qdio_free() 957 ccw_device_get_schid(cdev, &schid); in qdio_allocate() 975 irq_ptr->cdev = cdev; in qdio_allocate() [all …]
|
/openbmc/linux/sound/soc/sof/ |
H A D | sof-client-probes-ipc3.c | 79 ret = sof_client_ipc_tx_message_no_reply(cdev, msg); in ipc3_probes_init() 92 static int ipc3_probes_deinit(struct sof_client_dev *cdev) in ipc3_probes_deinit() argument 99 return sof_client_ipc_tx_message_no_reply(cdev, &msg); in ipc3_probes_deinit() 105 size_t max_msg_size = sof_client_get_ipc_max_payload_size(cdev); in ipc3_probes_info() 120 ret = sof_client_ipc_tx_message(cdev, &msg, reply, max_msg_size); in ipc3_probes_info() 154 static int ipc3_probes_points_info(struct sof_client_dev *cdev, in ipc3_probes_points_info() argument 158 return ipc3_probes_info(cdev, SOF_IPC_PROBE_POINT_INFO, in ipc3_probes_points_info() 175 static int ipc3_probes_points_add(struct sof_client_dev *cdev, in ipc3_probes_points_add() argument 191 ret = sof_client_ipc_tx_message_no_reply(cdev, msg); in ipc3_probes_points_add() 205 static int ipc3_probes_points_remove(struct sof_client_dev *cdev, in ipc3_probes_points_remove() argument [all …]
|
H A D | sof-client-ipc-kernel-injector.c | 43 struct sof_client_dev *cdev = file->private_data; in sof_kernel_msg_inject_dfs_write() local 44 struct sof_msg_inject_priv *priv = cdev->data; in sof_kernel_msg_inject_dfs_write() 46 struct device *dev = &cdev->auxdev.dev; in sof_kernel_msg_inject_dfs_write() 66 sof_client_ipc_rx_message(cdev, hdr, priv->kernel_buffer); in sof_kernel_msg_inject_dfs_write() 94 struct sof_client_dev *cdev = auxiliary_dev_to_sof_client_dev(auxdev); in sof_msg_inject_probe() local 95 struct dentry *debugfs_root = sof_client_get_debugfs_root(cdev); in sof_msg_inject_probe() 105 priv->max_msg_size = sof_client_get_ipc_max_payload_size(cdev); in sof_msg_inject_probe() 112 cdev->data = priv; in sof_msg_inject_probe() 115 debugfs_root, cdev, in sof_msg_inject_probe() 131 struct sof_client_dev *cdev = auxiliary_dev_to_sof_client_dev(auxdev); in sof_msg_inject_remove() local [all …]
|
/openbmc/linux/drivers/leds/rgb/ |
H A D | leds-group-multicolor.c | 28 static int leds_gmc_set(struct led_classdev *cdev, enum led_brightness brightness) in leds_gmc_set() argument 30 struct led_classdev_mc *mc_cdev = lcdev_to_mccdev(cdev); in leds_gmc_set() 68 struct led_classdev *cdev; in leds_gmc_probe() local 116 cdev = &priv->mc_cdev.led_cdev; in leds_gmc_probe() 117 cdev->flags = LED_CORE_SUSPENDRESUME; in leds_gmc_probe() 118 cdev->brightness_set_blocking = leds_gmc_set; in leds_gmc_probe() 119 cdev->max_brightness = max_brightness; in leds_gmc_probe() 120 cdev->color = LED_COLOR_ID_MULTI; in leds_gmc_probe() 127 cdev->name); in leds_gmc_probe() 129 ret = leds_gmc_set(cdev, cdev->brightness); in leds_gmc_probe() [all …]
|
/openbmc/linux/drivers/net/ethernet/qlogic/qed/ |
H A D | qed_sriov.h | 17 #define IS_VF(cdev) ((cdev)->b_is_vf) argument 18 #define IS_PF(cdev) (!((cdev)->b_is_vf)) argument 19 #define IS_PF_SRIOV(p_hwfn) (!!((p_hwfn)->cdev->p_iov_info)) 21 #define IS_VF(cdev) (0) argument 22 #define IS_PF(cdev) (1) argument 377 void qed_iov_free_hw_info(struct qed_dev *cdev); 402 int qed_iov_wq_start(struct qed_dev *cdev); 405 void qed_vf_start_iov_wq(struct qed_dev *cdev); 446 static inline void qed_iov_free_hw_info(struct qed_dev *cdev) in qed_iov_free_hw_info() argument 460 static inline int qed_iov_wq_start(struct qed_dev *cdev) in qed_iov_wq_start() argument [all …]
|
H A D | qed.h | 95 ~((1 << (p_hwfn->cdev->cache_shift)) - 1)) 97 #define for_each_hwfn(cdev, i) for (i = 0; i < (cdev)->num_hwfns; i++) argument 524 struct qed_dev *cdev; member 782 #define IS_QED_SRIOV(cdev) (!!(cdev)->p_iov_info) argument 814 #define IS_QED_ETH_IF(cdev) ((cdev)->protocol == QED_PROTOCOL_ETH) argument 815 #define IS_QED_FCOE_IF(cdev) ((cdev)->protocol == QED_PROTOCOL_FCOE) argument 955 #define DP_NAME(cdev) ((cdev)->name) argument 958 ((cdev)->regview) + \ 961 #define REG_RD(cdev, offset) readl(REG_ADDR(cdev, offset)) argument 962 #define REG_WR(cdev, offset, val) writel((u32)val, REG_ADDR(cdev, offset)) argument [all …]
|
/openbmc/linux/include/linux/qed/ |
H A D | qed_fcoe_if.h | 121 int (*fill_dev_info)(struct qed_dev *cdev, 124 void (*register_ops)(struct qed_dev *cdev, 129 int (*start)(struct qed_dev *cdev, struct qed_fcoe_tid *tasks); 131 int (*stop)(struct qed_dev *cdev); 133 int (*acquire_conn)(struct qed_dev *cdev, 137 int (*release_conn)(struct qed_dev *cdev, u32 handle); 139 int (*offload_conn)(struct qed_dev *cdev, 142 int (*destroy_conn)(struct qed_dev *cdev, 145 int (*get_stats)(struct qed_dev *cdev, struct qed_fcoe_stats *stats);
|
H A D | qed_iscsi_if.h | 196 int (*fill_dev_info)(struct qed_dev *cdev, 199 void (*register_ops)(struct qed_dev *cdev, 202 int (*start)(struct qed_dev *cdev, 206 int (*stop)(struct qed_dev *cdev); 208 int (*acquire_conn)(struct qed_dev *cdev, 212 int (*release_conn)(struct qed_dev *cdev, u32 handle); 214 int (*offload_conn)(struct qed_dev *cdev, 218 int (*update_conn)(struct qed_dev *cdev, 224 int (*clear_sq)(struct qed_dev *cdev, u32 handle); 226 int (*get_stats)(struct qed_dev *cdev, [all …]
|
/openbmc/linux/drivers/usb/gadget/ |
H A D | configfs.c | 86 return container_of(cfg->c.cdev, struct gadget_info, cdev); in cfg_to_gadget_info() 1214 struct usb_composite_dev *cdev = &gi->cdev; in os_desc_link() local 1248 struct usb_composite_dev *cdev = &gi->cdev; in os_desc_unlink() local 1681 struct usb_composite_dev *cdev = &gi->cdev; in configfs_composite_bind() local 1827 gi = container_of(cdev, struct gadget_info, cdev); in configfs_composite_unbind() 1854 if (!cdev) in configfs_composite_setup() 1857 gi = container_of(cdev, struct gadget_info, cdev); in configfs_composite_setup() 1880 gi = container_of(cdev, struct gadget_info, cdev); in configfs_composite_disconnect() 1902 gi = container_of(cdev, struct gadget_info, cdev); in configfs_composite_reset() 1924 gi = container_of(cdev, struct gadget_info, cdev); in configfs_composite_suspend() [all …]
|
/openbmc/linux/drivers/thermal/ |
H A D | gov_step_wise.c | 33 struct thermal_cooling_device *cdev = instance->cdev; in get_target_state() local 42 cdev->ops->get_cur_state(cdev, &cur_state); in get_target_state() 44 dev_dbg(&cdev->device, "cur_state=%ld\n", cur_state); in get_target_state() 106 dev_dbg(&instance->cdev->device, "old_target=%d, target=%d\n", in thermal_zone_trip_update() 122 mutex_lock(&instance->cdev->lock); in thermal_zone_trip_update() 123 instance->cdev->updated = false; /* cdev needs update */ in thermal_zone_trip_update() 124 mutex_unlock(&instance->cdev->lock); in thermal_zone_trip_update() 148 thermal_cdev_update(instance->cdev); in step_wise_throttle()
|
H A D | gov_fair_share.c | 44 struct thermal_cooling_device *cdev, int percentage, int level) in get_target_state() argument 46 return (long)(percentage * level * cdev->max_state) / (100 * tz->num_trips); in get_target_state() 88 struct thermal_cooling_device *cdev = instance->cdev; in fair_share_throttle() local 98 instance->target = get_target_state(tz, cdev, percentage, in fair_share_throttle() 101 mutex_lock(&cdev->lock); in fair_share_throttle() 102 __thermal_cdev_update(cdev); in fair_share_throttle() 103 mutex_unlock(&cdev->lock); in fair_share_throttle()
|