Home
last modified time | relevance | path

Searched refs:vol (Results 1 – 25 of 52) sorted by relevance

123

/drivers/mtd/ubi/
Dupd.c54 static int set_update_marker(struct ubi_device *ubi, struct ubi_volume *vol) in set_update_marker() argument
59 dbg_gen("set update marker for volume %d", vol->vol_id); in set_update_marker()
61 if (vol->upd_marker) { in set_update_marker()
62 ubi_assert(ubi->vtbl[vol->vol_id].upd_marker); in set_update_marker()
67 vtbl_rec = ubi->vtbl[vol->vol_id]; in set_update_marker()
71 err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec); in set_update_marker()
72 vol->upd_marker = 1; in set_update_marker()
87 static int clear_update_marker(struct ubi_device *ubi, struct ubi_volume *vol, in clear_update_marker() argument
93 dbg_gen("clear update marker for volume %d", vol->vol_id); in clear_update_marker()
95 vtbl_rec = ubi->vtbl[vol->vol_id]; in clear_update_marker()
[all …]
Dvmt.c71 struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); in vol_attribute_show() local
74 ubi = ubi_get_device(vol->ubi->ubi_num); in vol_attribute_show()
79 if (!ubi->volumes[vol->vol_id]) { in vol_attribute_show()
85 vol->ref_count += 1; in vol_attribute_show()
89 ret = sprintf(buf, "%d\n", vol->reserved_pebs); in vol_attribute_show()
93 if (vol->vol_type == UBI_DYNAMIC_VOLUME) in vol_attribute_show()
99 ret = sprintf(buf, "%s\n", vol->name); in vol_attribute_show()
101 ret = sprintf(buf, "%d\n", vol->corrupted); in vol_attribute_show()
103 ret = sprintf(buf, "%d\n", vol->alignment); in vol_attribute_show()
105 ret = sprintf(buf, "%d\n", vol->usable_leb_size); in vol_attribute_show()
[all …]
Dkapi.c80 void ubi_do_get_volume_info(struct ubi_device *ubi, struct ubi_volume *vol, in ubi_do_get_volume_info() argument
83 vi->vol_id = vol->vol_id; in ubi_do_get_volume_info()
85 vi->size = vol->reserved_pebs; in ubi_do_get_volume_info()
86 vi->used_bytes = vol->used_bytes; in ubi_do_get_volume_info()
87 vi->vol_type = vol->vol_type; in ubi_do_get_volume_info()
88 vi->corrupted = vol->corrupted; in ubi_do_get_volume_info()
89 vi->upd_marker = vol->upd_marker; in ubi_do_get_volume_info()
90 vi->alignment = vol->alignment; in ubi_do_get_volume_info()
91 vi->usable_leb_size = vol->usable_leb_size; in ubi_do_get_volume_info()
92 vi->name_len = vol->name_len; in ubi_do_get_volume_info()
[all …]
Dcdev.c60 struct ubi_volume *vol = desc->vol; in get_exclusive() local
62 spin_lock(&vol->ubi->volumes_lock); in get_exclusive()
63 users = vol->readers + vol->writers + vol->exclusive + vol->metaonly; in get_exclusive()
66 ubi_err(vol->ubi, "%d users for volume %d", users, vol->vol_id); in get_exclusive()
69 vol->readers = vol->writers = vol->metaonly = 0; in get_exclusive()
70 vol->exclusive = 1; in get_exclusive()
74 spin_unlock(&vol->ubi->volumes_lock); in get_exclusive()
86 struct ubi_volume *vol = desc->vol; in revoke_exclusive() local
88 spin_lock(&vol->ubi->volumes_lock); in revoke_exclusive()
89 ubi_assert(vol->readers == 0 && vol->writers == 0 && vol->metaonly == 0); in revoke_exclusive()
[all …]
Dvtbl.c141 struct ubi_volume *vol = re->desc->vol; in ubi_vtbl_rename_volumes() local
142 struct ubi_vtbl_record *vtbl_rec = &ubi->vtbl[vol->vol_id]; in ubi_vtbl_rename_volumes()
536 struct ubi_volume *vol; in init_volumes() local
544 vol = kzalloc(sizeof(struct ubi_volume), GFP_KERNEL); in init_volumes()
545 if (!vol) in init_volumes()
548 vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in init_volumes()
549 vol->alignment = be32_to_cpu(vtbl[i].alignment); in init_volumes()
550 vol->data_pad = be32_to_cpu(vtbl[i].data_pad); in init_volumes()
551 vol->upd_marker = vtbl[i].upd_marker; in init_volumes()
552 vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ? in init_volumes()
[all …]
Deba.c324 int ubi_eba_unmap_leb(struct ubi_device *ubi, struct ubi_volume *vol, in ubi_eba_unmap_leb() argument
327 int err, pnum, vol_id = vol->vol_id; in ubi_eba_unmap_leb()
336 pnum = vol->eba_tbl[lnum]; in ubi_eba_unmap_leb()
344 vol->eba_tbl[lnum] = UBI_LEB_UNMAPPED; in ubi_eba_unmap_leb()
371 static int check_mapping(struct ubi_device *ubi, struct ubi_volume *vol, int lnum, in check_mapping() argument
402 vol->eba_tbl[lnum] = UBI_LEB_UNMAPPED; in check_mapping()
404 ubi_wl_put_peb(ubi, vol->vol_id, lnum, *pnum, torture); in check_mapping()
422 static int check_mapping(struct ubi_device *ubi, struct ubi_volume *vol, int lnum, in check_mapping() argument
448 int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum, in ubi_eba_read_leb() argument
451 int err, pnum, scrub = 0, vol_id = vol->vol_id; in ubi_eba_read_leb()
[all …]
Ddebug.c107 void ubi_dump_vol_info(const struct ubi_volume *vol) in ubi_dump_vol_info() argument
110 pr_err("\tvol_id %d\n", vol->vol_id); in ubi_dump_vol_info()
111 pr_err("\treserved_pebs %d\n", vol->reserved_pebs); in ubi_dump_vol_info()
112 pr_err("\talignment %d\n", vol->alignment); in ubi_dump_vol_info()
113 pr_err("\tdata_pad %d\n", vol->data_pad); in ubi_dump_vol_info()
114 pr_err("\tvol_type %d\n", vol->vol_type); in ubi_dump_vol_info()
115 pr_err("\tname_len %d\n", vol->name_len); in ubi_dump_vol_info()
116 pr_err("\tusable_leb_size %d\n", vol->usable_leb_size); in ubi_dump_vol_info()
117 pr_err("\tused_ebs %d\n", vol->used_ebs); in ubi_dump_vol_info()
118 pr_err("\tused_bytes %lld\n", vol->used_bytes); in ubi_dump_vol_info()
[all …]
Dmisc.c65 struct ubi_volume *vol = ubi->volumes[vol_id]; in ubi_check_volume() local
67 if (vol->vol_type != UBI_STATIC_VOLUME) in ubi_check_volume()
70 buf = vmalloc(vol->usable_leb_size); in ubi_check_volume()
74 for (i = 0; i < vol->used_ebs; i++) { in ubi_check_volume()
79 if (i == vol->used_ebs - 1) in ubi_check_volume()
80 size = vol->last_eb_bytes; in ubi_check_volume()
82 size = vol->usable_leb_size; in ubi_check_volume()
84 err = ubi_eba_read_leb(ubi, vol, i, buf, 0, size, 1); in ubi_check_volume()
Dubi.h359 struct ubi_volume *vol; member
813 int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol);
814 void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol);
817 int ubi_start_update(struct ubi_device *ubi, struct ubi_volume *vol,
819 int ubi_more_update_data(struct ubi_device *ubi, struct ubi_volume *vol,
821 int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
823 int ubi_more_leb_change_data(struct ubi_device *ubi, struct ubi_volume *vol,
835 int ubi_eba_unmap_leb(struct ubi_device *ubi, struct ubi_volume *vol,
837 int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
839 int ubi_eba_read_leb_sg(struct ubi_device *ubi, struct ubi_volume *vol,
[all …]
Dfastmap.c1131 struct ubi_volume *vol; in ubi_write_fastmap() local
1277 vol = ubi->volumes[i]; in ubi_write_fastmap()
1279 if (!vol) in ubi_write_fastmap()
1289 fvh->vol_id = cpu_to_be32(vol->vol_id); in ubi_write_fastmap()
1290 fvh->vol_type = vol->vol_type; in ubi_write_fastmap()
1291 fvh->used_ebs = cpu_to_be32(vol->used_ebs); in ubi_write_fastmap()
1292 fvh->data_pad = cpu_to_be32(vol->data_pad); in ubi_write_fastmap()
1293 fvh->last_eb_bytes = cpu_to_be32(vol->last_eb_bytes); in ubi_write_fastmap()
1295 ubi_assert(vol->vol_type == UBI_DYNAMIC_VOLUME || in ubi_write_fastmap()
1296 vol->vol_type == UBI_STATIC_VOLUME); in ubi_write_fastmap()
[all …]
Dbuild.c163 int ubi_volume_notify(struct ubi_device *ubi, struct ubi_volume *vol, int ntype) in ubi_volume_notify() argument
169 ubi_do_get_volume_info(ubi, vol, &nt.vi); in ubi_volume_notify()
791 struct ubi_volume *vol = ubi->volumes[vol_id]; in autoresize() local
792 int err, old_reserved_pebs = vol->reserved_pebs; in autoresize()
819 desc.vol = vol; in autoresize()
831 vol_id, vol->name, old_reserved_pebs, vol->reserved_pebs); in autoresize()
/drivers/media/radio/
Dradio-typhoon.c110 static int typhoon_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in typhoon_s_mute_volume() argument
115 vol = 0; in typhoon_s_mute_volume()
116 vol >>= 14; /* Map 16 bit to 2 bit */ in typhoon_s_mute_volume()
117 vol &= 3; in typhoon_s_mute_volume()
118 outb_p(vol / 2, isa->io); /* Set the volume, high bit. */ in typhoon_s_mute_volume()
119 outb_p(vol % 2, isa->io + 2); /* Set the volume, low bit. */ in typhoon_s_mute_volume()
121 if (vol == 0 && !ty->muted) { in typhoon_s_mute_volume()
125 if (vol && ty->muted) { in typhoon_s_mute_volume()
Dradio-aimslab.c117 static int rtrack_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in rtrack_s_mute_volume() argument
126 if (vol == 0) { /* volume = 0 means mute the card */ in rtrack_s_mute_volume()
129 } else if (curvol < vol) { in rtrack_s_mute_volume()
131 for (; curvol < vol; curvol++) in rtrack_s_mute_volume()
133 } else if (curvol > vol) { in rtrack_s_mute_volume()
135 for (; curvol > vol; curvol--) in rtrack_s_mute_volume()
139 rt->curvol = vol; in rtrack_s_mute_volume()
Dradio-terratec.c61 static int terratec_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in terratec_s_mute_volume() argument
66 vol = 0; in terratec_s_mute_volume()
67 vol = vol + (vol * 32); /* change both channels */ in terratec_s_mute_volume()
69 if (vol & (0x80 >> i)) in terratec_s_mute_volume()
Dradio-aztech.c109 static int aztech_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in aztech_s_mute_volume() argument
114 vol = 0; in aztech_s_mute_volume()
115 az->curvol = (vol & 1) + ((vol & 2) << 1); in aztech_s_mute_volume()
Dradio-zoltrix.c86 static int zoltrix_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in zoltrix_s_mute_volume() argument
90 zol->curvol = vol; in zoltrix_s_mute_volume()
92 if (mute || vol == 0) { in zoltrix_s_mute_volume()
99 outb(vol - 1, isa->io); in zoltrix_s_mute_volume()
Dradio-trust.c119 static int trust_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in trust_s_mute_volume() argument
125 write_i2c(tr, 2, TDA7318_ADDR, vol ^ 0x1f); in trust_s_mute_volume()
/drivers/media/i2c/cx25840/
Dcx25840-audio.c483 int vol; in set_volume() local
486 vol = volume >> 9; in set_volume()
491 if (vol <= 23) { in set_volume()
492 vol = 0; in set_volume()
494 vol -= 23; in set_volume()
498 cx25840_write(client, 0x8d4, 228 - (vol * 2)); in set_volume()
/drivers/media/i2c/
Dcs5345.c117 int vol = cs5345_read(sd, 0x08) & 0x3f; in cs5345_log_status() local
121 if (vol >= 32) in cs5345_log_status()
122 vol = vol - 64; in cs5345_log_status()
123 v4l2_info(sd, "Volume: %d dB\n", vol); in cs5345_log_status()
Dwm8775.c60 struct v4l2_ctrl *vol; member
99 u16 volume = (u16)state->vol->val; in wm8775_set_audio()
135 if (!v4l2_ctrl_g_ctrl(state->vol)) in wm8775_s_routing()
243 state->vol = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops, in wm8775_probe()
/drivers/media/pci/cx18/
Dcx18-av-audio.c348 int vol = volume >> 9; in set_volume() local
352 if (vol <= 23) in set_volume()
353 vol = 0; in set_volume()
355 vol -= 23; in set_volume()
358 cx18_av_write(cx, 0x8d4, 228 - (vol * 2)); in set_volume()
/drivers/media/pci/cx88/
Dcx88-alsa.c651 int vol = 0x3f - (cx_read(AUD_VOL_CTL) & 0x3f), in snd_cx88_volume_get() local
654 value->value.integer.value[(bal & 0x40) ? 0 : 1] = vol; in snd_cx88_volume_get()
655 vol -= (bal & 0x3f); in snd_cx88_volume_get()
656 value->value.integer.value[(bal & 0x40) ? 1 : 0] = vol < 0 ? 0 : vol; in snd_cx88_volume_get()
751 u32 vol; in snd_cx88_switch_put() local
754 vol = cx_read(AUD_VOL_CTL); in snd_cx88_switch_put()
755 if (value->value.integer.value[0] != !(vol & bit)) { in snd_cx88_switch_put()
756 vol ^= bit; in snd_cx88_switch_put()
757 cx_swrite(SHADOW_AUD_VOL_CTL, AUD_VOL_CTL, vol); in snd_cx88_switch_put()
760 wm8775_s_ctrl(core, V4L2_CID_AUDIO_MUTE, 0 != (vol & bit)); in snd_cx88_switch_put()
/drivers/media/usb/tm6000/
Dtm6000-core.c781 static void tm6010_set_volume_sif(struct tm6000_core *dev, int vol) in tm6010_set_volume_sif() argument
785 vol_reg = vol & 0x0F; in tm6010_set_volume_sif()
787 if (vol < 0) in tm6010_set_volume_sif()
794 static void tm6010_set_volume_adc(struct tm6000_core *dev, int vol) in tm6010_set_volume_adc() argument
798 vol_reg = (vol + 0x10) & 0x1f; in tm6010_set_volume_adc()
809 void tm6000_set_volume(struct tm6000_core *dev, int vol) in tm6000_set_volume() argument
815 vol += 8; /* Offset to 0 dB */ in tm6000_set_volume()
823 tm6010_set_volume_sif(dev, vol); in tm6000_set_volume()
831 tm6010_set_volume_adc(dev, vol); in tm6000_set_volume()
/drivers/media/pci/bt8xx/
Dbttv-audio-hook.c18 int bits_out, loops, vol, data; in winview_volume() local
21 vol = 32 - ((volume>>11)); in winview_volume()
23 bits_out = (PT2254_DBS_IN_2>>(vol%5)); in winview_volume()
25 bits_out |= (PT2254_DBS_IN_10>>(vol/5)); in winview_volume()
/drivers/mfd/
Dwm8350-regmap.c24 u16 vol; /* Mask of volatile bits */ member
307 return wm8350_reg_io_map[reg].vol; in wm8350_volatile()

123