/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 = backlight_get_brightness(bd); 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->dev || bd->pdata->dev == 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 | 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 | 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 = backlight_get_brightness(bd); in micro_bl_update_status() 51 struct backlight_device *bd; in micro_backlight_probe() local 54 bd = devm_backlight_device_register(&pdev->dev, "ipaq-micro-backlight", in micro_backlight_probe() 57 if (IS_ERR(bd)) in micro_backlight_probe() 58 return PTR_ERR(bd); in micro_backlight_probe() 60 platform_set_drvdata(pdev, bd); in micro_backlight_probe() 61 backlight_update_status(bd); in micro_backlight_probe()
|
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 …]
|
D | rave-sp-backlight.c | 18 static int rave_sp_backlight_update_status(struct backlight_device *bd) in rave_sp_backlight_update_status() argument 20 const struct backlight_properties *p = &bd->props; in rave_sp_backlight_update_status() 23 struct rave_sp *sp = dev_get_drvdata(&bd->dev); in rave_sp_backlight_update_status() 49 struct backlight_device *bd; in rave_sp_backlight_probe() local 51 bd = devm_backlight_device_register(dev, pdev->name, dev, in rave_sp_backlight_probe() 55 if (IS_ERR(bd)) in rave_sp_backlight_probe() 56 return PTR_ERR(bd); in rave_sp_backlight_probe() 64 backlight_update_status(bd); in rave_sp_backlight_probe()
|
D | sky81452-backlight.c | 68 static int sky81452_bl_update_status(struct backlight_device *bd) in sky81452_bl_update_status() argument 71 dev_get_platdata(bd->dev.parent); in sky81452_bl_update_status() 72 const unsigned int brightness = (unsigned int)bd->props.brightness; in sky81452_bl_update_status() 73 struct regmap *regmap = bl_get_data(bd); in sky81452_bl_update_status() 278 struct backlight_device *bd; in sky81452_bl_probe() local 296 bd = devm_backlight_device_register(dev, name, dev, regmap, in sky81452_bl_probe() 298 if (IS_ERR(bd)) { in sky81452_bl_probe() 299 dev_err(dev, "failed to register. err=%ld\n", PTR_ERR(bd)); in sky81452_bl_probe() 300 return PTR_ERR(bd); in sky81452_bl_probe() 303 platform_set_drvdata(pdev, bd); in sky81452_bl_probe() [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/net/wireless/ath/wcn36xx/ |
D | txrx.c | 22 static inline int get_rssi0(struct wcn36xx_rx_bd *bd) in get_rssi0() argument 24 return 100 - ((bd->phy_stat0 >> 24) & 0xff); in get_rssi0() 27 static inline int get_snr(struct wcn36xx_rx_bd *bd) in get_snr() argument 29 return ((bd->phy_stat1 >> 24) & 0xff); in get_snr() 311 struct wcn36xx_rx_bd *bd; in wcn36xx_rx_skb() local 320 bd = (struct wcn36xx_rx_bd *)skb->data; in wcn36xx_rx_skb() 321 buff_to_be((u32 *)bd, sizeof(*bd)/sizeof(u32)); in wcn36xx_rx_skb() 323 "BD <<< ", (char *)bd, in wcn36xx_rx_skb() 326 if (bd->pdu.mpdu_data_off <= bd->pdu.mpdu_header_off || in wcn36xx_rx_skb() 327 bd->pdu.mpdu_len < bd->pdu.mpdu_header_len) in wcn36xx_rx_skb() [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/md/ |
D | dm-bio-record.h | 33 static inline void dm_bio_record(struct dm_bio_details *bd, struct bio *bio) in dm_bio_record() argument 35 bd->bi_bdev = bio->bi_bdev; 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_bdev = bd->bi_bdev; in dm_bio_restore() 48 bio->bi_flags = bd->bi_flags; in dm_bio_restore() [all …]
|
/drivers/net/ethernet/intel/e1000/ |
D | e1000_param.c | 246 int bd = adapter->bd_number; in e1000_check_options() local 248 if (bd >= E1000_MAX_NIC) { in e1000_check_options() 250 "using defaults for all values\n", bd); in e1000_check_options() 270 if (num_TxDescriptors > bd) { in e1000_check_options() 271 tx_ring->count = TxDescriptors[bd]; in e1000_check_options() 299 if (num_RxDescriptors > bd) { in e1000_check_options() 300 rx_ring->count = RxDescriptors[bd]; in e1000_check_options() 318 if (num_XsumRX > bd) { in e1000_check_options() 319 unsigned int rx_csum = XsumRX[bd]; in e1000_check_options() 345 if (num_FlowControl > bd) { in e1000_check_options() [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/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() 52 int level = backlight_get_brightness(bd); in nvidia_bl_update_status() 84 struct backlight_device *bd; in nvidia_bl_init() local 101 bd = backlight_device_register(name, info->device, par, &nvidia_bl_ops, in nvidia_bl_init() 103 if (IS_ERR(bd)) { in nvidia_bl_init() 109 info->bl_dev = bd; in nvidia_bl_init() 114 bd->props.brightness = bd->props.max_brightness; in nvidia_bl_init() 115 bd->props.power = FB_BLANK_UNBLANK; in nvidia_bl_init() 116 backlight_update_status(bd); in nvidia_bl_init() [all …]
|
/drivers/net/ethernet/intel/e1000e/ |
D | param.c | 227 int bd = adapter->bd_number; in e1000e_check_options() local 229 if (bd >= E1000_MAX_NIC) { in e1000e_check_options() 231 "Warning: no configuration for board #%i\n", bd); in e1000e_check_options() 248 if (num_TxIntDelay > bd) { in e1000e_check_options() 249 adapter->tx_int_delay = TxIntDelay[bd]; in e1000e_check_options() 268 if (num_TxAbsIntDelay > bd) { in e1000e_check_options() 269 adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; in e1000e_check_options() 291 if (num_RxIntDelay > bd) { in e1000e_check_options() 292 adapter->rx_int_delay = RxIntDelay[bd]; in e1000e_check_options() 314 if (num_RxAbsIntDelay > bd) { in e1000e_check_options() [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 level = backlight_get_brightness(bd); in radeon_bl_update_status() 126 struct backlight_device *bd; in radeonfb_bl_init() local 150 bd = backlight_device_register(name, rinfo->info->device, pdata, in radeonfb_bl_init() 152 if (IS_ERR(bd)) { in radeonfb_bl_init() 176 rinfo->info->bl_dev = bd; in radeonfb_bl_init() 181 bd->props.brightness = bd->props.max_brightness; in radeonfb_bl_init() 182 bd->props.power = FB_BLANK_UNBLANK; in radeonfb_bl_init() 183 backlight_update_status(bd); in radeonfb_bl_init() [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/macintosh/ |
D | via-pmu-backlight.c | 71 static int __pmu_backlight_update_status(struct backlight_device *bd) in __pmu_backlight_update_status() argument 74 int level = backlight_get_brightness(bd); in __pmu_backlight_update_status() 94 static int pmu_backlight_update_status(struct backlight_device *bd) in pmu_backlight_update_status() argument 102 rc = __pmu_backlight_update_status(bd); in pmu_backlight_update_status() 137 struct backlight_device *bd; in pmu_backlight_init() local 157 bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data, in pmu_backlight_init() 159 if (IS_ERR(bd)) { in pmu_backlight_init() 166 level = bd->props.max_brightness; in pmu_backlight_init() 176 bd->props.max_brightness / 15); in pmu_backlight_init() 179 bd->props.brightness = level; in pmu_backlight_init() [all …]
|
/drivers/usb/misc/ |
D | appledisplay.c | 66 struct backlight_device *bd; /* backlight device */ member 126 static int appledisplay_bl_update_status(struct backlight_device *bd) in appledisplay_bl_update_status() argument 128 struct appledisplay *pdata = bl_get_data(bd); in appledisplay_bl_update_status() 133 pdata->msgdata[1] = bd->props.brightness; in appledisplay_bl_update_status() 152 static int appledisplay_bl_get_brightness(struct backlight_device *bd) in appledisplay_bl_get_brightness() argument 154 struct appledisplay *pdata = bl_get_data(bd); in appledisplay_bl_get_brightness() 192 retval = appledisplay_bl_get_brightness(pdata->bd); in appledisplay_work() 194 pdata->bd->props.brightness = retval; in appledisplay_work() 275 pdata->bd = backlight_device_register(bl_name, NULL, pdata, in appledisplay_probe() 277 if (IS_ERR(pdata->bd)) { in appledisplay_probe() [all …]
|
/drivers/gpu/drm/nouveau/ |
D | nouveau_backlight.c | 64 nv40_get_intensity(struct backlight_device *bd) in nv40_get_intensity() argument 66 struct nouveau_encoder *nv_encoder = bl_get_data(bd); in nv40_get_intensity() 76 nv40_set_intensity(struct backlight_device *bd) in nv40_set_intensity() argument 78 struct nouveau_encoder *nv_encoder = bl_get_data(bd); in nv40_set_intensity() 81 int val = bd->props.brightness; in nv40_set_intensity() 113 nv50_get_intensity(struct backlight_device *bd) in nv50_get_intensity() argument 115 struct nouveau_encoder *nv_encoder = bl_get_data(bd); in nv50_get_intensity() 128 nv50_set_intensity(struct backlight_device *bd) in nv50_set_intensity() argument 130 struct nouveau_encoder *nv_encoder = bl_get_data(bd); in nv50_set_intensity() 135 u32 val = (bd->props.brightness * div) / 100; in nv50_set_intensity() [all …]
|
/drivers/platform/x86/ |
D | samsung-q10.c | 25 static int samsungq10_bl_set_intensity(struct backlight_device *bd) in samsungq10_bl_set_intensity() argument 36 for (i = 0; i < bd->props.brightness; i++) { in samsungq10_bl_set_intensity() 53 struct backlight_device *bd; in samsungq10_probe() local 58 bd = backlight_device_register("samsung", &pdev->dev, NULL, in samsungq10_probe() 60 if (IS_ERR(bd)) in samsungq10_probe() 61 return PTR_ERR(bd); in samsungq10_probe() 63 platform_set_drvdata(pdev, bd); in samsungq10_probe() 71 struct backlight_device *bd = platform_get_drvdata(pdev); in samsungq10_remove() local 73 backlight_device_unregister(bd); in samsungq10_remove()
|