/drivers/video/backlight/ |
D | backlight.c | 99 struct backlight_device *bd; in fb_notifier_callback() local 108 bd = container_of(self, struct backlight_device, fb_notif); in fb_notifier_callback() 109 mutex_lock(&bd->ops_lock); in fb_notifier_callback() 111 if (!bd->ops) in fb_notifier_callback() 113 if (bd->ops->check_fb && !bd->ops->check_fb(bd, evdata->info)) in fb_notifier_callback() 117 if (fb_blank == FB_BLANK_UNBLANK && !bd->fb_bl_on[node]) { in fb_notifier_callback() 118 bd->fb_bl_on[node] = true; in fb_notifier_callback() 119 if (!bd->use_count++) { in fb_notifier_callback() 120 bd->props.state &= ~BL_CORE_FBBLANK; in fb_notifier_callback() 121 bd->props.fb_blank = FB_BLANK_UNBLANK; in fb_notifier_callback() [all …]
|
D | aat2870_bl.c | 21 struct backlight_device *bd; member 31 struct backlight_device *bd = aat2870_bl->bd; in aat2870_brightness() local 35 val /= bd->props.max_brightness; in aat2870_brightness() 57 static int aat2870_bl_update_status(struct backlight_device *bd) in aat2870_bl_update_status() argument 59 struct aat2870_bl_driver_data *aat2870_bl = bl_get_data(bd); in aat2870_bl_update_status() 62 int brightness = bd->props.brightness; in aat2870_bl_update_status() 65 if ((brightness < 0) || (bd->props.max_brightness < brightness)) { in aat2870_bl_update_status() 66 dev_err(&bd->dev, "invalid brightness, %d\n", brightness); in aat2870_bl_update_status() 70 dev_dbg(&bd->dev, "brightness=%d, power=%d, state=%d\n", in aat2870_bl_update_status() 71 bd->props.brightness, bd->props.power, bd->props.state); in aat2870_bl_update_status() [all …]
|
D | hp680_bl.c | 32 static void hp680bl_send_intensity(struct backlight_device *bd) in hp680bl_send_intensity() argument 36 int intensity = backlight_get_brightness(bd); in hp680bl_send_intensity() 66 struct backlight_device *bd = dev_get_drvdata(dev); in hp680bl_suspend() local 69 hp680bl_send_intensity(bd); in hp680bl_suspend() 75 struct backlight_device *bd = dev_get_drvdata(dev); in hp680bl_resume() local 78 hp680bl_send_intensity(bd); in hp680bl_resume() 85 static int hp680bl_set_intensity(struct backlight_device *bd) in hp680bl_set_intensity() argument 87 hp680bl_send_intensity(bd); in hp680bl_set_intensity() 91 static int hp680bl_get_intensity(struct backlight_device *bd) in hp680bl_get_intensity() argument 104 struct backlight_device *bd; in hp680bl_probe() local [all …]
|
D | bd6107.c | 77 static int bd6107_write(struct bd6107 *bd, u8 reg, u8 data) in bd6107_write() argument 79 return i2c_smbus_write_byte_data(bd->client, reg, data); in bd6107_write() 84 struct bd6107 *bd = bl_get_data(backlight); in bd6107_backlight_update_status() local 88 bd6107_write(bd, BD6107_PORTSEL, BD6107_PORTSEL_LEDM(2) | in bd6107_backlight_update_status() 90 bd6107_write(bd, BD6107_MAINCNT1, brightness); in bd6107_backlight_update_status() 91 bd6107_write(bd, BD6107_LEDCNT1, BD6107_LEDCNT1_LEDONOFF1); in bd6107_backlight_update_status() 94 gpiod_set_value(bd->reset, 1); in bd6107_backlight_update_status() 96 gpiod_set_value(bd->reset, 0); in bd6107_backlight_update_status() 105 struct bd6107 *bd = bl_get_data(backlight); in bd6107_backlight_check_fb() local 107 return bd->pdata->fbdev == NULL || bd->pdata->fbdev == info->device; in bd6107_backlight_check_fb() [all …]
|
D | jornada720_bl.c | 23 static int jornada_bl_get_brightness(struct backlight_device *bd) in jornada_bl_get_brightness() argument 37 dev_err(&bd->dev, "get brightness timeout\n"); in jornada_bl_get_brightness() 50 static int jornada_bl_update_status(struct backlight_device *bd) in jornada_bl_update_status() argument 57 if (backlight_is_blank(bd)) { in jornada_bl_update_status() 60 dev_info(&bd->dev, "brightness off timeout\n"); in jornada_bl_update_status() 71 dev_info(&bd->dev, "failed to set brightness\n"); in jornada_bl_update_status() 83 if (jornada_ssp_byte(BL_MAX_BRIGHT - bd->props.brightness) in jornada_bl_update_status() 85 dev_err(&bd->dev, "set brightness failed\n"); in jornada_bl_update_status() 109 struct backlight_device *bd; in jornada_bl_probe() local 115 bd = devm_backlight_device_register(&pdev->dev, S1D_DEVICENAME, in jornada_bl_probe() [all …]
|
D | ipaq_micro_bl.c | 16 static int micro_bl_update_status(struct backlight_device *bd) in micro_bl_update_status() argument 18 struct ipaq_micro *micro = dev_get_drvdata(&bd->dev); in micro_bl_update_status() 19 int intensity = bd->props.brightness; in micro_bl_update_status() 25 if (bd->props.power != FB_BLANK_UNBLANK) in micro_bl_update_status() 27 if (bd->props.state & (BL_CORE_FBBLANK | BL_CORE_SUSPENDED)) in micro_bl_update_status() 56 struct backlight_device *bd; in micro_backlight_probe() local 59 bd = devm_backlight_device_register(&pdev->dev, "ipaq-micro-backlight", in micro_backlight_probe() 62 if (IS_ERR(bd)) in micro_backlight_probe() 63 return PTR_ERR(bd); in micro_backlight_probe() 65 platform_set_drvdata(pdev, bd); in micro_backlight_probe() [all …]
|
D | lm3533_bl.c | 29 struct backlight_device *bd; member 39 static int lm3533_bl_update_status(struct backlight_device *bd) in lm3533_bl_update_status() argument 41 struct lm3533_bl *bl = bl_get_data(bd); in lm3533_bl_update_status() 43 return lm3533_ctrlbank_set_brightness(&bl->cb, backlight_get_brightness(bd)); in lm3533_bl_update_status() 46 static int lm3533_bl_get_brightness(struct backlight_device *bd) in lm3533_bl_get_brightness() argument 48 struct lm3533_bl *bl = bl_get_data(bd); in lm3533_bl_get_brightness() 267 struct backlight_device *bd; in lm3533_bl_probe() local 303 bd = devm_backlight_device_register(&pdev->dev, pdata->name, in lm3533_bl_probe() 306 if (IS_ERR(bd)) { in lm3533_bl_probe() 308 return PTR_ERR(bd); in lm3533_bl_probe() [all …]
|
D | ams369fg06.c | 37 struct backlight_device *bd; member 310 struct backlight_device *bd; in ams369fg06_power_on() local 313 bd = lcd->bd; in ams369fg06_power_on() 341 ret = ams369fg06_gamma_ctl(lcd, bd->props.brightness); in ams369fg06_power_on() 408 static int ams369fg06_set_brightness(struct backlight_device *bd) in ams369fg06_set_brightness() argument 411 int brightness = bd->props.brightness; in ams369fg06_set_brightness() 412 struct ams369fg06 *lcd = bl_get_data(bd); in ams369fg06_set_brightness() 415 brightness > bd->props.max_brightness) { in ams369fg06_set_brightness() 416 dev_err(&bd->dev, "lcd brightness should be %d to %d.\n", in ams369fg06_set_brightness() 421 ret = ams369fg06_gamma_ctl(lcd, bd->props.brightness); in ams369fg06_set_brightness() [all …]
|
/drivers/power/supply/ |
D | bd99954-charger.c | 182 static int bd9995x_get_prop_batt_health(struct bd9995x_device *bd) in bd9995x_get_prop_batt_health() argument 186 ret = regmap_field_read(bd->rmap_fields[F_BATTEMP], &tmp); in bd9995x_get_prop_batt_health() 209 static int bd9995x_get_prop_charge_type(struct bd9995x_device *bd) in bd9995x_get_prop_charge_type() argument 213 ret = regmap_field_read(bd->rmap_fields[F_CHGSTM_STATE], &tmp); in bd9995x_get_prop_charge_type() 232 static bool bd9995x_get_prop_batt_present(struct bd9995x_device *bd) in bd9995x_get_prop_batt_present() argument 236 ret = regmap_field_read(bd->rmap_fields[F_BATTEMP], &tmp); in bd9995x_get_prop_batt_present() 243 static int bd9995x_get_prop_batt_voltage(struct bd9995x_device *bd) in bd9995x_get_prop_batt_voltage() argument 247 ret = regmap_field_read(bd->rmap_fields[F_VBAT_VAL], &tmp); in bd9995x_get_prop_batt_voltage() 256 static int bd9995x_get_prop_batt_current(struct bd9995x_device *bd) in bd9995x_get_prop_batt_current() argument 260 ret = regmap_field_read(bd->rmap_fields[F_IBATP_VAL], &tmp); in bd9995x_get_prop_batt_current() [all …]
|
/drivers/video/fbdev/matrox/ |
D | matroxfb_misc.c | 391 static void get_pins(unsigned char __iomem* pins, struct matrox_bios* bd) { in get_pins() argument 398 unsigned char* dst = bd->pins; in get_pins() 413 bd->pins_len = pins_len; in get_pins() 416 unsigned char* dst = bd->pins; in get_pins() 423 bd->pins_len = 0x40; in get_pins() 427 static void get_bios_version(unsigned char __iomem * vbios, struct matrox_bios* bd) { in get_bios_version() argument 439 bd->version.vMaj = (h >> 4) & 0xF; in get_bios_version() 440 bd->version.vMin = h & 0xF; in get_bios_version() 441 bd->version.vRev = readb(vbios + pcir_offset + 0x13); in get_bios_version() 446 bd->version.vMaj = (h >> 4) & 0xF; in get_bios_version() [all …]
|
/drivers/net/wireless/ath/wcn36xx/ |
D | txrx.c | 21 static inline int get_rssi0(struct wcn36xx_rx_bd *bd) in get_rssi0() argument 23 return 100 - ((bd->phy_stat0 >> 24) & 0xff); in get_rssi0() 239 struct wcn36xx_rx_bd *bd; in wcn36xx_rx_skb() local 248 bd = (struct wcn36xx_rx_bd *)skb->data; in wcn36xx_rx_skb() 249 buff_to_be((u32 *)bd, sizeof(*bd)/sizeof(u32)); in wcn36xx_rx_skb() 251 "BD <<< ", (char *)bd, in wcn36xx_rx_skb() 254 skb_put(skb, bd->pdu.mpdu_header_off + bd->pdu.mpdu_len); in wcn36xx_rx_skb() 255 skb_pull(skb, bd->pdu.mpdu_header_off); in wcn36xx_rx_skb() 262 status.signal = -get_rssi0(bd); in wcn36xx_rx_skb() 272 if (bd->scan_learn) { in wcn36xx_rx_skb() [all …]
|
/drivers/usb/musb/ |
D | cppi_dma.c | 63 struct cppi_descriptor *bd = c->freelist; in cppi_bd_alloc() local 65 if (bd) in cppi_bd_alloc() 66 c->freelist = bd->next; in cppi_bd_alloc() 67 return bd; in cppi_bd_alloc() 71 cppi_bd_free(struct cppi_channel *c, struct cppi_descriptor *bd) in cppi_bd_free() argument 73 if (!bd) in cppi_bd_free() 75 bd->next = c->freelist; in cppi_bd_free() 76 c->freelist = bd; in cppi_bd_free() 125 struct cppi_descriptor *bd; in cppi_pool_init() local 128 bd = dma_pool_alloc(cppi->pool, GFP_KERNEL, &dma); in cppi_pool_init() [all …]
|
/drivers/mfd/ |
D | bd9571mwv.c | 113 static int bd9571mwv_identify(struct bd9571mwv *bd) in bd9571mwv_identify() argument 115 struct device *dev = bd->dev; in bd9571mwv_identify() 119 ret = regmap_read(bd->regmap, BD9571MWV_VENDOR_CODE, &value); in bd9571mwv_identify() 132 ret = regmap_read(bd->regmap, BD9571MWV_PRODUCT_CODE, &value); in bd9571mwv_identify() 145 ret = regmap_read(bd->regmap, BD9571MWV_PRODUCT_REVISION, &value); in bd9571mwv_identify() 160 struct bd9571mwv *bd; in bd9571mwv_probe() local 163 bd = devm_kzalloc(&client->dev, sizeof(*bd), GFP_KERNEL); in bd9571mwv_probe() 164 if (!bd) in bd9571mwv_probe() 167 i2c_set_clientdata(client, bd); in bd9571mwv_probe() 168 bd->dev = &client->dev; in bd9571mwv_probe() [all …]
|
/drivers/md/ |
D | dm-bio-record.h | 32 static inline void dm_bio_record(struct dm_bio_details *bd, struct bio *bio) in dm_bio_record() argument 34 bd->bi_disk = bio->bi_disk; in dm_bio_record() 35 bd->bi_partno = bio->bi_partno; in dm_bio_record() 36 bd->bi_flags = bio->bi_flags; in dm_bio_record() 37 bd->bi_iter = bio->bi_iter; in dm_bio_record() 38 bd->__bi_remaining = atomic_read(&bio->__bi_remaining); in dm_bio_record() 39 bd->bi_end_io = bio->bi_end_io; in dm_bio_record() 41 bd->bi_integrity = bio_integrity(bio); in dm_bio_record() 45 static inline void dm_bio_restore(struct dm_bio_details *bd, struct bio *bio) in dm_bio_restore() argument 47 bio->bi_disk = bd->bi_disk; in dm_bio_restore() [all …]
|
/drivers/net/ethernet/intel/e1000/ |
D | e1000_param.c | 248 int bd = adapter->bd_number; in e1000_check_options() local 250 if (bd >= E1000_MAX_NIC) { in e1000_check_options() 252 "using defaults for all values\n", bd); in e1000_check_options() 272 if (num_TxDescriptors > bd) { in e1000_check_options() 273 tx_ring->count = TxDescriptors[bd]; in e1000_check_options() 301 if (num_RxDescriptors > bd) { in e1000_check_options() 302 rx_ring->count = RxDescriptors[bd]; in e1000_check_options() 320 if (num_XsumRX > bd) { in e1000_check_options() 321 unsigned int rx_csum = XsumRX[bd]; in e1000_check_options() 347 if (num_FlowControl > bd) { in e1000_check_options() [all …]
|
/drivers/video/fbdev/nvidia/ |
D | nv_backlight.c | 48 static int nvidia_bl_update_status(struct backlight_device *bd) in nvidia_bl_update_status() argument 50 struct nvidia_par *par = bl_get_data(bd); in nvidia_bl_update_status() 57 if (bd->props.power != FB_BLANK_UNBLANK || in nvidia_bl_update_status() 58 bd->props.fb_blank != FB_BLANK_UNBLANK) in nvidia_bl_update_status() 61 level = bd->props.brightness; in nvidia_bl_update_status() 90 struct backlight_device *bd; in nvidia_bl_init() local 107 bd = backlight_device_register(name, info->dev, par, &nvidia_bl_ops, in nvidia_bl_init() 109 if (IS_ERR(bd)) { in nvidia_bl_init() 115 info->bl_dev = bd; in nvidia_bl_init() 120 bd->props.brightness = bd->props.max_brightness; in nvidia_bl_init() [all …]
|
/drivers/regulator/ |
D | bd9571mwv-regulator.c | 20 struct bd9571mwv *bd; member 140 static int bd9571mwv_bkup_mode_read(struct bd9571mwv *bd, unsigned int *mode) in bd9571mwv_bkup_mode_read() argument 144 ret = regmap_read(bd->regmap, BD9571MWV_BKUP_MODE_CNT, mode); in bd9571mwv_bkup_mode_read() 146 dev_err(bd->dev, "failed to read backup mode (%d)\n", ret); in bd9571mwv_bkup_mode_read() 153 static int bd9571mwv_bkup_mode_write(struct bd9571mwv *bd, unsigned int mode) in bd9571mwv_bkup_mode_write() argument 157 ret = regmap_write(bd->regmap, BD9571MWV_BKUP_MODE_CNT, mode); in bd9571mwv_bkup_mode_write() 159 dev_err(bd->dev, "failed to configure backup mode 0x%x (%d)\n", in bd9571mwv_bkup_mode_write() 197 ret = bd9571mwv_bkup_mode_read(bdreg->bd, &mode); in backup_mode_store() 205 ret = bd9571mwv_bkup_mode_write(bdreg->bd, mode); in backup_mode_store() 224 ret = bd9571mwv_bkup_mode_read(bdreg->bd, &mode); in bd9571mwv_suspend() [all …]
|
/drivers/staging/media/atomisp/pci/ |
D | sh_css_firmware.c | 107 struct ia_css_blob_descr *bd, in sh_css_load_blob_info() argument 113 if ((!fw) || (!bd)) in sh_css_load_blob_info() 134 bd->blob = blob; in sh_css_load_blob_info() 135 bd->header = *bi; in sh_css_load_blob_info() 143 bd->name = fw_minibuffer[index].name = namebuffer; in sh_css_load_blob_info() 145 bd->name = name; in sh_css_load_blob_info() 159 bd->mem_offsets.array[IA_CSS_PARAM_CLASS_PARAM].ptr = NULL; in sh_css_load_blob_info() 160 bd->mem_offsets.array[IA_CSS_PARAM_CLASS_CONFIG].ptr = NULL; in sh_css_load_blob_info() 161 bd->mem_offsets.array[IA_CSS_PARAM_CLASS_STATE].ptr = NULL; in sh_css_load_blob_info() 169 bd->mem_offsets.array[IA_CSS_PARAM_CLASS_PARAM].ptr = parambuf; in sh_css_load_blob_info() [all …]
|
/drivers/video/fbdev/aty/ |
D | radeon_backlight.c | 46 static int radeon_bl_update_status(struct backlight_device *bd) in radeon_bl_update_status() argument 48 struct radeon_bl_privdata *pdata = bl_get_data(bd); in radeon_bl_update_status() 60 if (bd->props.power != FB_BLANK_UNBLANK || in radeon_bl_update_status() 61 bd->props.fb_blank != FB_BLANK_UNBLANK) in radeon_bl_update_status() 64 level = bd->props.brightness; in radeon_bl_update_status() 130 struct backlight_device *bd; in radeonfb_bl_init() local 154 bd = backlight_device_register(name, rinfo->info->dev, pdata, in radeonfb_bl_init() 156 if (IS_ERR(bd)) { in radeonfb_bl_init() 180 rinfo->info->bl_dev = bd; in radeonfb_bl_init() 185 bd->props.brightness = bd->props.max_brightness; in radeonfb_bl_init() [all …]
|
/drivers/net/ethernet/intel/ixgb/ |
D | ixgb_param.c | 238 int bd = adapter->bd_number; in ixgb_check_options() local 239 if (bd >= IXGB_MAX_NIC) { in ixgb_check_options() 240 pr_notice("Warning: no configuration for board #%i\n", bd); in ixgb_check_options() 255 if (num_TxDescriptors > bd) { in ixgb_check_options() 256 tx_ring->count = TxDescriptors[bd]; in ixgb_check_options() 274 if (num_RxDescriptors > bd) { in ixgb_check_options() 275 rx_ring->count = RxDescriptors[bd]; in ixgb_check_options() 290 if (num_XsumRX > bd) { in ixgb_check_options() 291 unsigned int rx_csum = XsumRX[bd]; in ixgb_check_options() 317 if (num_FlowControl > bd) { in ixgb_check_options() [all …]
|
/drivers/macintosh/ |
D | via-pmu-backlight.c | 72 static int __pmu_backlight_update_status(struct backlight_device *bd) in __pmu_backlight_update_status() argument 75 int level = bd->props.brightness; in __pmu_backlight_update_status() 78 if (bd->props.power != FB_BLANK_UNBLANK || in __pmu_backlight_update_status() 79 bd->props.fb_blank != FB_BLANK_UNBLANK) in __pmu_backlight_update_status() 100 static int pmu_backlight_update_status(struct backlight_device *bd) in pmu_backlight_update_status() argument 108 rc = __pmu_backlight_update_status(bd); in pmu_backlight_update_status() 143 struct backlight_device *bd; in pmu_backlight_init() local 163 bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data, in pmu_backlight_init() 165 if (IS_ERR(bd)) { in pmu_backlight_init() 172 level = bd->props.max_brightness; in pmu_backlight_init() [all …]
|
/drivers/net/ethernet/intel/e1000e/ |
D | param.c | 229 int bd = adapter->bd_number; in e1000e_check_options() local 231 if (bd >= E1000_MAX_NIC) { in e1000e_check_options() 233 "Warning: no configuration for board #%i\n", bd); in e1000e_check_options() 250 if (num_TxIntDelay > bd) { in e1000e_check_options() 251 adapter->tx_int_delay = TxIntDelay[bd]; in e1000e_check_options() 270 if (num_TxAbsIntDelay > bd) { in e1000e_check_options() 271 adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; in e1000e_check_options() 293 if (num_RxIntDelay > bd) { in e1000e_check_options() 294 adapter->rx_int_delay = RxIntDelay[bd]; in e1000e_check_options() 316 if (num_RxAbsIntDelay > bd) { in e1000e_check_options() [all …]
|
/drivers/net/ethernet/ |
D | ethoc.c | 254 struct ethoc_bd *bd) in ethoc_read_bd() argument 257 bd->stat = ethoc_read(dev, offset + 0); in ethoc_read_bd() 258 bd->addr = ethoc_read(dev, offset + 4); in ethoc_read_bd() 262 const struct ethoc_bd *bd) in ethoc_write_bd() argument 265 ethoc_write(dev, offset + 0, bd->stat); in ethoc_write_bd() 266 ethoc_write(dev, offset + 4, bd->addr); in ethoc_write_bd() 304 struct ethoc_bd bd; in ethoc_init_ring() local 315 bd.addr = mem_start; in ethoc_init_ring() 316 bd.stat = TX_BD_IRQ | TX_BD_CRC; in ethoc_init_ring() 321 bd.stat |= TX_BD_WRAP; in ethoc_init_ring() [all …]
|
/drivers/usb/gadget/udc/ |
D | fsl_qe_udc.c | 283 struct qe_bd __iomem *bd; in qe_epbds_reset() local 293 bd = ep->rxbase; in qe_epbds_reset() 295 out_be32((u32 __iomem *)bd, R_E | R_I); in qe_epbds_reset() 296 bd++; in qe_epbds_reset() 298 out_be32((u32 __iomem *)bd, R_E | R_I | R_W); in qe_epbds_reset() 300 bd = ep->txbase; in qe_epbds_reset() 302 out_be32(&bd->buf, 0); in qe_epbds_reset() 303 out_be32((u32 __iomem *)bd, 0); in qe_epbds_reset() 304 bd++; in qe_epbds_reset() 306 out_be32((u32 __iomem *)bd, T_W); in qe_epbds_reset() [all …]
|
/drivers/target/ |
D | target_core_iblock.c | 73 struct block_device *bd = NULL; in iblock_configure_device() local 99 bd = blkdev_get_by_path(ib_dev->ibd_udev_path, mode, ib_dev); in iblock_configure_device() 100 if (IS_ERR(bd)) { in iblock_configure_device() 101 ret = PTR_ERR(bd); in iblock_configure_device() 104 ib_dev->ibd_bd = bd; in iblock_configure_device() 106 q = bdev_get_queue(bd); in iblock_configure_device() 108 dev->dev_attrib.hw_block_size = bdev_logical_block_size(bd); in iblock_configure_device() 120 max_write_zeroes_sectors = bdev_write_zeroes_sectors(bd); in iblock_configure_device() 129 bi = bdev_get_integrity(bd); in iblock_configure_device() 193 struct block_device *bd, in iblock_emulate_read_cap_with_block_size() argument [all …]
|