Home
last modified time | relevance | path

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

123

/drivers/mtd/ubi/
Dupd.c41 static int set_update_marker(struct ubi_device *ubi, struct ubi_volume *vol) in set_update_marker() argument
46 dbg_gen("set update marker for volume %d", vol->vol_id); in set_update_marker()
48 if (vol->upd_marker) { in set_update_marker()
49 ubi_assert(ubi->vtbl[vol->vol_id].upd_marker); in set_update_marker()
54 vtbl_rec = ubi->vtbl[vol->vol_id]; in set_update_marker()
58 err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec); in set_update_marker()
59 vol->upd_marker = 1; in set_update_marker()
74 static int clear_update_marker(struct ubi_device *ubi, struct ubi_volume *vol, in clear_update_marker() argument
80 dbg_gen("clear update marker for volume %d", vol->vol_id); in clear_update_marker()
82 vtbl_rec = ubi->vtbl[vol->vol_id]; in clear_update_marker()
[all …]
Dvmt.c58 struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); in vol_attribute_show() local
59 struct ubi_device *ubi = vol->ubi; in vol_attribute_show()
62 if (!ubi->volumes[vol->vol_id]) { in vol_attribute_show()
67 vol->ref_count += 1; in vol_attribute_show()
71 ret = sprintf(buf, "%d\n", vol->reserved_pebs); in vol_attribute_show()
75 if (vol->vol_type == UBI_DYNAMIC_VOLUME) in vol_attribute_show()
81 ret = sprintf(buf, "%s\n", vol->name); in vol_attribute_show()
83 ret = sprintf(buf, "%d\n", vol->corrupted); in vol_attribute_show()
85 ret = sprintf(buf, "%d\n", vol->alignment); in vol_attribute_show()
87 ret = sprintf(buf, "%d\n", vol->usable_leb_size); in vol_attribute_show()
[all …]
Dkapi.c67 void ubi_do_get_volume_info(struct ubi_device *ubi, struct ubi_volume *vol, in ubi_do_get_volume_info() argument
70 vi->vol_id = vol->vol_id; in ubi_do_get_volume_info()
72 vi->size = vol->reserved_pebs; in ubi_do_get_volume_info()
73 vi->used_bytes = vol->used_bytes; in ubi_do_get_volume_info()
74 vi->vol_type = vol->vol_type; in ubi_do_get_volume_info()
75 vi->corrupted = vol->corrupted; in ubi_do_get_volume_info()
76 vi->upd_marker = vol->upd_marker; in ubi_do_get_volume_info()
77 vi->alignment = vol->alignment; in ubi_do_get_volume_info()
78 vi->usable_leb_size = vol->usable_leb_size; in ubi_do_get_volume_info()
79 vi->name_len = vol->name_len; in ubi_do_get_volume_info()
[all …]
Dcdev.c47 struct ubi_volume *vol = desc->vol; in get_exclusive() local
49 spin_lock(&vol->ubi->volumes_lock); in get_exclusive()
50 users = vol->readers + vol->writers + vol->exclusive + vol->metaonly; in get_exclusive()
53 ubi_err(vol->ubi, "%d users for volume %d", users, vol->vol_id); in get_exclusive()
56 vol->readers = vol->writers = vol->metaonly = 0; in get_exclusive()
57 vol->exclusive = 1; in get_exclusive()
61 spin_unlock(&vol->ubi->volumes_lock); in get_exclusive()
73 struct ubi_volume *vol = desc->vol; in revoke_exclusive() local
75 spin_lock(&vol->ubi->volumes_lock); in revoke_exclusive()
76 ubi_assert(vol->readers == 0 && vol->writers == 0 && vol->metaonly == 0); in revoke_exclusive()
[all …]
Dvtbl.c128 struct ubi_volume *vol = re->desc->vol; in ubi_vtbl_rename_volumes() local
129 struct ubi_vtbl_record *vtbl_rec = &ubi->vtbl[vol->vol_id]; in ubi_vtbl_rename_volumes()
526 struct ubi_volume *vol; in init_volumes() local
534 vol = kzalloc(sizeof(struct ubi_volume), GFP_KERNEL); in init_volumes()
535 if (!vol) in init_volumes()
538 vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in init_volumes()
539 vol->alignment = be32_to_cpu(vtbl[i].alignment); in init_volumes()
540 vol->data_pad = be32_to_cpu(vtbl[i].data_pad); in init_volumes()
541 vol->upd_marker = vtbl[i].upd_marker; in init_volumes()
542 vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ? in init_volumes()
[all …]
Deba.c107 void ubi_eba_get_ldesc(struct ubi_volume *vol, int lnum, in ubi_eba_get_ldesc() argument
111 ldesc->pnum = vol->eba_tbl->entries[lnum].pnum; in ubi_eba_get_ldesc()
123 struct ubi_eba_table *ubi_eba_create_table(struct ubi_volume *vol, in ubi_eba_create_table() argument
173 void ubi_eba_copy_table(struct ubi_volume *vol, struct ubi_eba_table *dst, in ubi_eba_copy_table() argument
179 ubi_assert(dst && vol && vol->eba_tbl); in ubi_eba_copy_table()
181 src = vol->eba_tbl; in ubi_eba_copy_table()
194 void ubi_eba_replace_table(struct ubi_volume *vol, struct ubi_eba_table *tbl) in ubi_eba_replace_table() argument
196 ubi_eba_destroy_table(vol->eba_tbl); in ubi_eba_replace_table()
197 vol->eba_tbl = tbl; in ubi_eba_replace_table()
435 bool ubi_eba_is_mapped(struct ubi_volume *vol, int lnum) in ubi_eba_is_mapped() argument
[all …]
Ddebug.c95 void ubi_dump_vol_info(const struct ubi_volume *vol) in ubi_dump_vol_info() argument
98 pr_err("\tvol_id %d\n", vol->vol_id); in ubi_dump_vol_info()
99 pr_err("\treserved_pebs %d\n", vol->reserved_pebs); in ubi_dump_vol_info()
100 pr_err("\talignment %d\n", vol->alignment); in ubi_dump_vol_info()
101 pr_err("\tdata_pad %d\n", vol->data_pad); in ubi_dump_vol_info()
102 pr_err("\tvol_type %d\n", vol->vol_type); in ubi_dump_vol_info()
103 pr_err("\tname_len %d\n", vol->name_len); in ubi_dump_vol_info()
104 pr_err("\tusable_leb_size %d\n", vol->usable_leb_size); in ubi_dump_vol_info()
105 pr_err("\tused_ebs %d\n", vol->used_ebs); in ubi_dump_vol_info()
106 pr_err("\tused_bytes %lld\n", vol->used_bytes); in ubi_dump_vol_info()
[all …]
Dubi.h387 struct ubi_volume *vol; member
848 int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol);
849 void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol);
852 int ubi_start_update(struct ubi_device *ubi, struct ubi_volume *vol,
854 int ubi_more_update_data(struct ubi_device *ubi, struct ubi_volume *vol,
856 int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
858 int ubi_more_leb_change_data(struct ubi_device *ubi, struct ubi_volume *vol,
869 static inline bool ubi_leb_valid(struct ubi_volume *vol, int lnum) in ubi_leb_valid() argument
871 return lnum >= 0 && lnum < vol->reserved_pebs; in ubi_leb_valid()
875 struct ubi_eba_table *ubi_eba_create_table(struct ubi_volume *vol,
[all …]
Dmisc.c52 struct ubi_volume *vol = ubi->volumes[vol_id]; in ubi_check_volume() local
54 if (vol->vol_type != UBI_STATIC_VOLUME) in ubi_check_volume()
57 buf = vmalloc(vol->usable_leb_size); in ubi_check_volume()
61 for (i = 0; i < vol->used_ebs; i++) { in ubi_check_volume()
66 if (i == vol->used_ebs - 1) in ubi_check_volume()
67 size = vol->last_eb_bytes; in ubi_check_volume()
69 size = vol->usable_leb_size; in ubi_check_volume()
71 err = ubi_eba_read_leb(ubi, vol, i, buf, 0, size, 1); in ubi_check_volume()
Dfastmap.c1104 int ubi_fastmap_init_checkmap(struct ubi_volume *vol, int leb_count) in ubi_fastmap_init_checkmap() argument
1106 struct ubi_device *ubi = vol->ubi; in ubi_fastmap_init_checkmap()
1111 vol->checkmap = kcalloc(BITS_TO_LONGS(leb_count), sizeof(unsigned long), in ubi_fastmap_init_checkmap()
1113 if (!vol->checkmap) in ubi_fastmap_init_checkmap()
1119 void ubi_fastmap_destroy_checkmap(struct ubi_volume *vol) in ubi_fastmap_destroy_checkmap() argument
1121 kfree(vol->checkmap); in ubi_fastmap_destroy_checkmap()
1143 struct ubi_volume *vol; in ubi_write_fastmap() local
1293 vol = ubi->volumes[i]; in ubi_write_fastmap()
1295 if (!vol) in ubi_write_fastmap()
1305 fvh->vol_id = cpu_to_be32(vol->vol_id); in ubi_write_fastmap()
[all …]
/drivers/media/radio/
Dradio-typhoon.c111 static int typhoon_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in typhoon_s_mute_volume() argument
116 vol = 0; in typhoon_s_mute_volume()
117 vol >>= 14; /* Map 16 bit to 2 bit */ in typhoon_s_mute_volume()
118 vol &= 3; in typhoon_s_mute_volume()
119 outb_p(vol / 2, isa->io); /* Set the volume, high bit. */ in typhoon_s_mute_volume()
120 outb_p(vol % 2, isa->io + 2); /* Set the volume, low bit. */ in typhoon_s_mute_volume()
122 if (vol == 0 && !ty->muted) { in typhoon_s_mute_volume()
126 if (vol && ty->muted) { in typhoon_s_mute_volume()
Dradio-aimslab.c118 static int rtrack_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in rtrack_s_mute_volume() argument
127 if (vol == 0) { /* volume = 0 means mute the card */ in rtrack_s_mute_volume()
130 } else if (curvol < vol) { in rtrack_s_mute_volume()
132 for (; curvol < vol; curvol++) in rtrack_s_mute_volume()
134 } else if (curvol > vol) { in rtrack_s_mute_volume()
136 for (; curvol > vol; curvol--) in rtrack_s_mute_volume()
140 rt->curvol = vol; in rtrack_s_mute_volume()
Dradio-terratec.c62 static int terratec_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in terratec_s_mute_volume() argument
67 vol = 0; in terratec_s_mute_volume()
68 vol = vol + (vol * 32); /* change both channels */ in terratec_s_mute_volume()
70 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.c87 static int zoltrix_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in zoltrix_s_mute_volume() argument
91 zol->curvol = vol; in zoltrix_s_mute_volume()
93 if (mute || vol == 0) { in zoltrix_s_mute_volume()
100 outb(vol - 1, isa->io); in zoltrix_s_mute_volume()
/drivers/staging/vc04_services/bcm2835-audio/
Dbcm2835.h25 #define alsa2chip(vol) ((uint)(-(((vol) << 8) / 100))) argument
28 #define chip2alsa(vol) -(((vol) * 100) >> 8) argument
/drivers/media/i2c/cx25840/
Dcx25840-audio.c470 int vol; in set_volume() local
473 vol = volume >> 9; in set_volume()
478 if (vol <= 23) { in set_volume()
479 vol = 0; in set_volume()
481 vol -= 23; in set_volume()
485 cx25840_write(client, 0x8d4, 228 - (vol * 2)); in set_volume()
/drivers/media/i2c/
Dcs5345.c104 int vol = cs5345_read(sd, 0x08) & 0x3f; in cs5345_log_status() local
108 if (vol >= 32) in cs5345_log_status()
109 vol = vol - 64; in cs5345_log_status()
110 v4l2_info(sd, "Volume: %d dB\n", vol); in cs5345_log_status()
Dwm8775.c47 struct v4l2_ctrl *vol; member
86 u16 volume = (u16)state->vol->val; in wm8775_set_audio()
122 if (!v4l2_ctrl_g_ctrl(state->vol)) in wm8775_s_routing()
223 state->vol = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops, in wm8775_probe()
/drivers/power/supply/
Dsc27xx_fuel_gauge.c147 static int sc27xx_fgu_voltage_to_adc(struct sc27xx_fgu_data *data, int vol) in sc27xx_fgu_voltage_to_adc() argument
149 return DIV_ROUND_CLOSEST(vol * data->vol_1000mv_adc, 1000); in sc27xx_fgu_voltage_to_adc()
388 u32 vol; in sc27xx_fgu_get_vol_now() local
391 &vol); in sc27xx_fgu_get_vol_now()
399 *val = sc27xx_fgu_adc_to_voltage(data, vol); in sc27xx_fgu_get_vol_now()
456 int ret, vol; in sc27xx_fgu_get_vbat_vol() local
458 ret = regmap_read(data->regmap, data->base + SC27XX_FGU_VOLTAGE, &vol); in sc27xx_fgu_get_vbat_vol()
466 *val = sc27xx_fgu_adc_to_voltage(data, vol); in sc27xx_fgu_get_vbat_vol()
490 int vol, cur, ret, temp, resistance; in sc27xx_fgu_get_vbat_ocv() local
492 ret = sc27xx_fgu_get_vbat_vol(data, &vol); in sc27xx_fgu_get_vbat_ocv()
[all …]
/drivers/media/pci/cx18/
Dcx18-av-audio.c334 int vol = volume >> 9; in set_volume() local
338 if (vol <= 23) in set_volume()
339 vol = 0; in set_volume()
341 vol -= 23; in set_volume()
344 cx18_av_write(cx, 0x8d4, 228 - (vol * 2)); in set_volume()
/drivers/media/pci/cx88/
Dcx88-alsa.c634 int vol = 0x3f - (cx_read(AUD_VOL_CTL) & 0x3f), in snd_cx88_volume_get() local
637 value->value.integer.value[(bal & 0x40) ? 0 : 1] = vol; in snd_cx88_volume_get()
638 vol -= (bal & 0x3f); in snd_cx88_volume_get()
639 value->value.integer.value[(bal & 0x40) ? 1 : 0] = vol < 0 ? 0 : vol; in snd_cx88_volume_get()
734 u32 vol; in snd_cx88_switch_put() local
737 vol = cx_read(AUD_VOL_CTL); in snd_cx88_switch_put()
738 if (value->value.integer.value[0] != !(vol & bit)) { in snd_cx88_switch_put()
739 vol ^= bit; in snd_cx88_switch_put()
740 cx_swrite(SHADOW_AUD_VOL_CTL, AUD_VOL_CTL, vol); in snd_cx88_switch_put()
744 V4L2_CID_AUDIO_MUTE, 0 != (vol & bit)); in snd_cx88_switch_put()
/drivers/media/usb/tm6000/
Dtm6000-core.c766 static void tm6010_set_volume_sif(struct tm6000_core *dev, int vol) in tm6010_set_volume_sif() argument
770 vol_reg = vol & 0x0F; in tm6010_set_volume_sif()
772 if (vol < 0) in tm6010_set_volume_sif()
779 static void tm6010_set_volume_adc(struct tm6000_core *dev, int vol) in tm6010_set_volume_adc() argument
783 vol_reg = (vol + 0x10) & 0x1f; in tm6010_set_volume_adc()
794 void tm6000_set_volume(struct tm6000_core *dev, int vol) in tm6000_set_volume() argument
800 vol += 8; /* Offset to 0 dB */ in tm6000_set_volume()
808 tm6010_set_volume_sif(dev, vol); in tm6000_set_volume()
815 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.c20 u16 vol; /* Mask of volatile bits */ member
303 return wm8350_reg_io_map[reg].vol; in wm8350_volatile()

123