Home
last modified time | relevance | path

Searched refs:bd (Results 1 – 25 of 255) sorted by relevance

1234567891011

/Linux-v4.19/lib/
Ddecompress_bunzip2.c116 static unsigned int INIT get_bits(struct bunzip_data *bd, char bits_wanted) in get_bits() argument
123 while (bd->inbufBitCount < bits_wanted) { in get_bits()
126 if (bd->inbufPos == bd->inbufCount) { in get_bits()
127 if (bd->io_error) in get_bits()
129 bd->inbufCount = bd->fill(bd->inbuf, BZIP2_IOBUF_SIZE); in get_bits()
130 if (bd->inbufCount <= 0) { in get_bits()
131 bd->io_error = RETVAL_UNEXPECTED_INPUT_EOF; in get_bits()
134 bd->inbufPos = 0; in get_bits()
137 if (bd->inbufBitCount >= 24) { in get_bits()
138 bits = bd->inbufBits&((1 << bd->inbufBitCount)-1); in get_bits()
[all …]
/Linux-v4.19/drivers/video/backlight/
Dbacklight.c43 struct backlight_device *bd; in fb_notifier_callback() local
52 bd = container_of(self, struct backlight_device, fb_notif); in fb_notifier_callback()
53 mutex_lock(&bd->ops_lock); in fb_notifier_callback()
54 if (bd->ops) in fb_notifier_callback()
55 if (!bd->ops->check_fb || in fb_notifier_callback()
56 bd->ops->check_fb(bd, evdata->info)) { in fb_notifier_callback()
59 !bd->fb_bl_on[node]) { in fb_notifier_callback()
60 bd->fb_bl_on[node] = true; in fb_notifier_callback()
61 if (!bd->use_count++) { in fb_notifier_callback()
62 bd->props.state &= ~BL_CORE_FBBLANK; in fb_notifier_callback()
[all …]
Daat2870_bl.c34 struct backlight_device *bd; member
44 struct backlight_device *bd = aat2870_bl->bd; in aat2870_brightness() local
48 val /= bd->props.max_brightness; in aat2870_brightness()
70 static int aat2870_bl_update_status(struct backlight_device *bd) in aat2870_bl_update_status() argument
72 struct aat2870_bl_driver_data *aat2870_bl = bl_get_data(bd); in aat2870_bl_update_status()
75 int brightness = bd->props.brightness; in aat2870_bl_update_status()
78 if ((brightness < 0) || (bd->props.max_brightness < brightness)) { in aat2870_bl_update_status()
79 dev_err(&bd->dev, "invalid brightness, %d\n", brightness); in aat2870_bl_update_status()
83 dev_dbg(&bd->dev, "brightness=%d, power=%d, state=%d\n", in aat2870_bl_update_status()
84 bd->props.brightness, bd->props.power, bd->props.state); in aat2870_bl_update_status()
[all …]
Dgeneric_bl.c24 static int genericbl_send_intensity(struct backlight_device *bd) in genericbl_send_intensity() argument
26 int intensity = bd->props.brightness; in genericbl_send_intensity()
28 if (bd->props.power != FB_BLANK_UNBLANK) in genericbl_send_intensity()
30 if (bd->props.state & BL_CORE_FBBLANK) in genericbl_send_intensity()
32 if (bd->props.state & BL_CORE_SUSPENDED) in genericbl_send_intensity()
45 static int genericbl_get_intensity(struct backlight_device *bd) in genericbl_get_intensity() argument
61 struct backlight_device *bd; in genericbl_probe() local
73 bd = devm_backlight_device_register(&pdev->dev, name, &pdev->dev, in genericbl_probe()
75 if (IS_ERR(bd)) in genericbl_probe()
76 return PTR_ERR(bd); in genericbl_probe()
[all …]
Dhp680_bl.c32 static void hp680bl_send_intensity(struct backlight_device *bd) in hp680bl_send_intensity() argument
36 int intensity = bd->props.brightness; in hp680bl_send_intensity()
38 if (bd->props.power != FB_BLANK_UNBLANK) in hp680bl_send_intensity()
40 if (bd->props.fb_blank != FB_BLANK_UNBLANK) in hp680bl_send_intensity()
70 struct backlight_device *bd = dev_get_drvdata(dev); in hp680bl_suspend() local
73 hp680bl_send_intensity(bd); in hp680bl_suspend()
79 struct backlight_device *bd = dev_get_drvdata(dev); in hp680bl_resume() local
82 hp680bl_send_intensity(bd); in hp680bl_resume()
89 static int hp680bl_set_intensity(struct backlight_device *bd) in hp680bl_set_intensity() argument
91 hp680bl_send_intensity(bd); in hp680bl_set_intensity()
[all …]
Djornada720_bl.c27 static int jornada_bl_get_brightness(struct backlight_device *bd) in jornada_bl_get_brightness() argument
41 dev_err(&bd->dev, "get brightness timeout\n"); in jornada_bl_get_brightness()
54 static int jornada_bl_update_status(struct backlight_device *bd) in jornada_bl_update_status() argument
61 if ((bd->props.power != FB_BLANK_UNBLANK) || (bd->props.fb_blank != FB_BLANK_UNBLANK)) { in jornada_bl_update_status()
64 dev_info(&bd->dev, "brightness off timeout\n"); in jornada_bl_update_status()
75 dev_info(&bd->dev, "failed to set brightness\n"); in jornada_bl_update_status()
87 if (jornada_ssp_byte(BL_MAX_BRIGHT - bd->props.brightness) in jornada_bl_update_status()
89 dev_err(&bd->dev, "set brightness failed\n"); in jornada_bl_update_status()
113 struct backlight_device *bd; in jornada_bl_probe() local
119 bd = devm_backlight_device_register(&pdev->dev, S1D_DEVICENAME, in jornada_bl_probe()
[all …]
Dbd6107.c79 static int bd6107_write(struct bd6107 *bd, u8 reg, u8 data) in bd6107_write() argument
81 return i2c_smbus_write_byte_data(bd->client, reg, data); in bd6107_write()
86 struct bd6107 *bd = bl_get_data(backlight); in bd6107_backlight_update_status() local
95 bd6107_write(bd, BD6107_PORTSEL, BD6107_PORTSEL_LEDM(2) | in bd6107_backlight_update_status()
97 bd6107_write(bd, BD6107_MAINCNT1, brightness); in bd6107_backlight_update_status()
98 bd6107_write(bd, BD6107_LEDCNT1, BD6107_LEDCNT1_LEDONOFF1); in bd6107_backlight_update_status()
100 gpio_set_value(bd->pdata->reset, 0); in bd6107_backlight_update_status()
102 gpio_set_value(bd->pdata->reset, 1); in bd6107_backlight_update_status()
111 struct bd6107 *bd = bl_get_data(backlight); in bd6107_backlight_check_fb() local
113 return bd->pdata->fbdev == NULL || bd->pdata->fbdev == info->dev; in bd6107_backlight_check_fb()
[all …]
/Linux-v4.19/sound/soc/codecs/
Dbd28623.c47 static int bd28623_power_on(struct bd28623_priv *bd) in bd28623_power_on() argument
51 ret = regulator_bulk_enable(ARRAY_SIZE(bd->supplies), bd->supplies); in bd28623_power_on()
53 dev_err(bd->dev, "Failed to enable supplies: %d\n", ret); in bd28623_power_on()
57 gpiod_set_value_cansleep(bd->reset_gpio, 0); in bd28623_power_on()
63 static void bd28623_power_off(struct bd28623_priv *bd) in bd28623_power_off() argument
65 gpiod_set_value_cansleep(bd->reset_gpio, 1); in bd28623_power_off()
67 regulator_bulk_disable(ARRAY_SIZE(bd->supplies), bd->supplies); in bd28623_power_off()
75 struct bd28623_priv *bd = snd_soc_component_get_drvdata(component); in bd28623_get_switch_spk() local
77 ucontrol->value.integer.value[0] = bd->switch_spk; in bd28623_get_switch_spk()
87 struct bd28623_priv *bd = snd_soc_component_get_drvdata(component); in bd28623_set_switch_spk() local
[all …]
/Linux-v4.19/drivers/net/wireless/ath/wcn36xx/
Dtxrx.c21 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()
30 struct wcn36xx_rx_bd *bd; in wcn36xx_rx_skb() local
39 bd = (struct wcn36xx_rx_bd *)skb->data; in wcn36xx_rx_skb()
40 buff_to_be((u32 *)bd, sizeof(*bd)/sizeof(u32)); in wcn36xx_rx_skb()
42 "BD <<< ", (char *)bd, in wcn36xx_rx_skb()
45 skb_put(skb, bd->pdu.mpdu_header_off + bd->pdu.mpdu_len); in wcn36xx_rx_skb()
46 skb_pull(skb, bd->pdu.mpdu_header_off); in wcn36xx_rx_skb()
62 status.signal = -get_rssi0(bd); in wcn36xx_rx_skb()
92 static void wcn36xx_set_tx_pdu(struct wcn36xx_tx_bd *bd, in wcn36xx_set_tx_pdu() argument
[all …]
/Linux-v4.19/arch/powerpc/boot/
Dredboot-8xx.c19 static bd_t bd; variable
28 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); in platform_fixups()
29 dt_fixup_mac_addresses(bd.bi_enetaddr); in platform_fixups()
30 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 16, bd.bi_busfreq); in platform_fixups()
35 bd.bi_busfreq, MHZ(bd.bi_busfreq)); in platform_fixups()
36 setprop(node, "clock-frequency", &bd.bi_busfreq, 4); in platform_fixups()
43 memcpy(&bd, (char *)r3, sizeof(bd)); in platform_init()
45 if (bd.bi_tag != 0x42444944) in platform_init()
49 bd.bi_memstart + bd.bi_memsize - (unsigned long)_end, in platform_init()
56 loader_info.cmdline = (char *)bd.bi_cmdline; in platform_init()
[all …]
Dredboot-83xx.c20 static bd_t bd; variable
29 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); in platform_fixups()
30 dt_fixup_mac_addresses(bd.bi_enetaddr); in platform_fixups()
31 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 16, bd.bi_busfreq); in platform_fixups()
36 bd.bi_busfreq, MHZ(bd.bi_busfreq)); in platform_fixups()
37 setprop(node, "clock-frequency", &bd.bi_busfreq, 4); in platform_fixups()
45 memcpy(&bd, (char *)r3, sizeof(bd)); in platform_init()
47 if (bd.bi_tag != 0x42444944) in platform_init()
51 bd.bi_memstart + bd.bi_memsize - (unsigned long)_end, in platform_init()
58 loader_info.cmdline = (char *)bd.bi_cmdline; in platform_init()
[all …]
Dcuboot-85xx-cpm2.c21 static bd_t bd; variable
27 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); in platform_fixups()
28 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); in platform_fixups()
29 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); in platform_fixups()
30 dt_fixup_mac_address_by_alias("ethernet2", bd.bi_enet2addr); in platform_fixups()
31 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq); in platform_fixups()
41 setprop(devp, "bus-frequency", &bd.bi_busfreq, in platform_fixups()
42 sizeof(bd.bi_busfreq)); in platform_fixups()
48 setprop(serial, "clock-frequency", &bd.bi_busfreq, in platform_fixups()
49 sizeof(bd.bi_busfreq)); in platform_fixups()
[all …]
Dcuboot-85xx.c21 static bd_t bd; variable
27 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); in platform_fixups()
28 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); in platform_fixups()
29 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); in platform_fixups()
30 dt_fixup_mac_address_by_alias("ethernet2", bd.bi_enet2addr); in platform_fixups()
31 dt_fixup_mac_address_by_alias("ethernet3", bd.bi_enet3addr); in platform_fixups()
32 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq); in platform_fixups()
42 setprop(soc, "bus-frequency", &bd.bi_busfreq, in platform_fixups()
43 sizeof(bd.bi_busfreq)); in platform_fixups()
49 setprop(serial, "clock-frequency", &bd.bi_busfreq, in platform_fixups()
[all …]
Dcuboot-hotfoot.c23 static bd_t bd; variable
31 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); in hotfoot_fixups()
33 dt_fixup_cpu_clocks(bd.bi_procfreq, bd.bi_procfreq, 0); in hotfoot_fixups()
34 dt_fixup_clock("/plb", bd.bi_plb_busfreq); in hotfoot_fixups()
35 dt_fixup_clock("/plb/opb", bd.bi_opbfreq); in hotfoot_fixups()
36 dt_fixup_clock("/plb/ebc", bd.bi_pci_busfreq); in hotfoot_fixups()
37 dt_fixup_clock("/plb/opb/serial@ef600300", bd.bi_procfreq / uart); in hotfoot_fixups()
38 dt_fixup_clock("/plb/opb/serial@ef600400", bd.bi_procfreq / uart); in hotfoot_fixups()
40 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); in hotfoot_fixups()
41 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); in hotfoot_fixups()
[all …]
Dcuboot-83xx.c20 static bd_t bd; variable
26 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); in platform_fixups()
27 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); in platform_fixups()
28 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); in platform_fixups()
29 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq); in platform_fixups()
39 setprop(soc, "bus-frequency", &bd.bi_busfreq, in platform_fixups()
40 sizeof(bd.bi_busfreq)); in platform_fixups()
46 setprop(serial, "clock-frequency", &bd.bi_busfreq, in platform_fixups()
47 sizeof(bd.bi_busfreq)); in platform_fixups()
Dcuboot-824x.c18 static bd_t bd; variable
25 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); in platform_fixups()
26 dt_fixup_mac_addresses(bd.bi_enetaddr); in platform_fixups()
27 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq); in platform_fixups()
33 setprop(soc, "bus-frequency", &bd.bi_busfreq, in platform_fixups()
34 sizeof(bd.bi_busfreq)); in platform_fixups()
40 setprop(serial, "clock-frequency", &bd.bi_busfreq, in platform_fixups()
41 sizeof(bd.bi_busfreq)); in platform_fixups()
Dcuboot-mpc7448hpc2.c25 static bd_t bd; variable
32 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); in platform_fixups()
33 dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); in platform_fixups()
34 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq); in platform_fixups()
37 setprop(tsi, "bus-frequency", &bd.bi_busfreq, in platform_fixups()
38 sizeof(bd.bi_busfreq)); in platform_fixups()
/Linux-v4.19/include/linux/
Dbacklight.h116 static inline int backlight_update_status(struct backlight_device *bd) in backlight_update_status() argument
120 mutex_lock(&bd->update_lock); in backlight_update_status()
121 if (bd->ops && bd->ops->update_status) in backlight_update_status()
122 ret = bd->ops->update_status(bd); in backlight_update_status()
123 mutex_unlock(&bd->update_lock); in backlight_update_status()
132 static inline int backlight_enable(struct backlight_device *bd) in backlight_enable() argument
134 if (!bd) in backlight_enable()
137 bd->props.power = FB_BLANK_UNBLANK; in backlight_enable()
138 bd->props.fb_blank = FB_BLANK_UNBLANK; in backlight_enable()
139 bd->props.state &= ~BL_CORE_FBBLANK; in backlight_enable()
[all …]
/Linux-v4.19/drivers/video/fbdev/matrox/
Dmatroxfb_misc.c390 static void get_pins(unsigned char __iomem* pins, struct matrox_bios* bd) { in get_pins() argument
397 unsigned char* dst = bd->pins; in get_pins()
412 bd->pins_len = pins_len; in get_pins()
415 unsigned char* dst = bd->pins; in get_pins()
422 bd->pins_len = 0x40; in get_pins()
426 static void get_bios_version(unsigned char __iomem * vbios, struct matrox_bios* bd) { in get_bios_version() argument
438 bd->version.vMaj = (h >> 4) & 0xF; in get_bios_version()
439 bd->version.vMin = h & 0xF; in get_bios_version()
440 bd->version.vRev = readb(vbios + pcir_offset + 0x13); in get_bios_version()
445 bd->version.vMaj = (h >> 4) & 0xF; in get_bios_version()
[all …]
/Linux-v4.19/fs/gfs2/
Dtrans.c130 struct gfs2_bufdata *bd; in gfs2_alloc_bufdata() local
132 bd = kmem_cache_zalloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL); in gfs2_alloc_bufdata()
133 bd->bd_bh = bh; in gfs2_alloc_bufdata()
134 bd->bd_gl = gl; in gfs2_alloc_bufdata()
135 bd->bd_ops = lops; in gfs2_alloc_bufdata()
136 INIT_LIST_HEAD(&bd->bd_list); in gfs2_alloc_bufdata()
137 bh->b_private = bd; in gfs2_alloc_bufdata()
138 return bd; in gfs2_alloc_bufdata()
159 struct gfs2_bufdata *bd; in gfs2_trans_add_data() local
167 bd = bh->b_private; in gfs2_trans_add_data()
[all …]
/Linux-v4.19/drivers/mfd/
Dbd9571mwv.c112 static int bd9571mwv_identify(struct bd9571mwv *bd) in bd9571mwv_identify() argument
114 struct device *dev = bd->dev; in bd9571mwv_identify()
118 ret = regmap_read(bd->regmap, BD9571MWV_VENDOR_CODE, &value); in bd9571mwv_identify()
131 ret = regmap_read(bd->regmap, BD9571MWV_PRODUCT_CODE, &value); in bd9571mwv_identify()
144 ret = regmap_read(bd->regmap, BD9571MWV_PRODUCT_REVISION, &value); in bd9571mwv_identify()
159 struct bd9571mwv *bd; in bd9571mwv_probe() local
162 bd = devm_kzalloc(&client->dev, sizeof(*bd), GFP_KERNEL); in bd9571mwv_probe()
163 if (!bd) in bd9571mwv_probe()
166 i2c_set_clientdata(client, bd); in bd9571mwv_probe()
167 bd->dev = &client->dev; in bd9571mwv_probe()
[all …]
/Linux-v4.19/drivers/usb/musb/
Dcppi_dma.c63 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 …]
/Linux-v4.19/drivers/crypto/caam/
Dcaamrng.c81 static inline void rng_unmap_buf(struct device *jrdev, struct buf_data *bd) in rng_unmap_buf() argument
83 if (bd->addr) in rng_unmap_buf()
84 dma_unmap_single(jrdev, bd->addr, RN_BUF_SIZE, in rng_unmap_buf()
101 struct buf_data *bd; in rng_done() local
103 bd = container_of(desc, struct buf_data, hw_desc[0]); in rng_done()
108 atomic_set(&bd->empty, BUF_NOT_EMPTY); in rng_done()
109 complete(&bd->filled); in rng_done()
112 dma_sync_single_for_cpu(jrdev, bd->addr, RN_BUF_SIZE, DMA_FROM_DEVICE); in rng_done()
116 DUMP_PREFIX_ADDRESS, 16, 4, bd->buf, RN_BUF_SIZE, 1); in rng_done()
122 struct buf_data *bd = &ctx->bufs[!(to_current ^ ctx->current_buf)]; in submit_job() local
[all …]
/Linux-v4.19/block/
Dbsg.c33 #define bsg_dbg(bd, fmt, ...) \ argument
34 pr_debug("%s: " fmt, (bd)->name, ##__VA_ARGS__)
237 struct bsg_device *bd; in bsg_alloc_device() local
239 bd = kzalloc(sizeof(struct bsg_device), GFP_KERNEL); in bsg_alloc_device()
240 if (unlikely(!bd)) in bsg_alloc_device()
243 spin_lock_init(&bd->lock); in bsg_alloc_device()
244 bd->max_queue = BSG_DEFAULT_CMDS; in bsg_alloc_device()
245 INIT_HLIST_NODE(&bd->dev_list); in bsg_alloc_device()
246 return bd; in bsg_alloc_device()
249 static int bsg_put_device(struct bsg_device *bd) in bsg_put_device() argument
[all …]
/Linux-v4.19/drivers/gpu/drm/nouveau/
Dnouveau_backlight.c65 nv40_get_intensity(struct backlight_device *bd) in nv40_get_intensity() argument
67 struct nouveau_drm *drm = bl_get_data(bd); in nv40_get_intensity()
76 nv40_set_intensity(struct backlight_device *bd) in nv40_set_intensity() argument
78 struct nouveau_drm *drm = bl_get_data(bd); in nv40_set_intensity()
80 int val = bd->props.brightness; in nv40_set_intensity()
101 struct backlight_device *bd; in nv40_backlight_init() local
115 bd = backlight_device_register(backlight_name , connector->kdev, drm, in nv40_backlight_init()
118 if (IS_ERR(bd)) { in nv40_backlight_init()
121 return PTR_ERR(bd); in nv40_backlight_init()
124 drm->backlight = bd; in nv40_backlight_init()
[all …]

1234567891011