/drivers/power/supply/ |
D | samsung-sdi-battery.c | 451 { .ocv = 4330000, .capacity = 100}, 452 { .ocv = 4320000, .capacity = 99}, 453 { .ocv = 4283000, .capacity = 95}, 454 { .ocv = 4246000, .capacity = 92}, 455 { .ocv = 4211000, .capacity = 89}, 456 { .ocv = 4167000, .capacity = 85}, 457 { .ocv = 4146000, .capacity = 83}, 458 { .ocv = 4124000, .capacity = 81}, 459 { .ocv = 4062000, .capacity = 75}, 460 { .ocv = 4013000, .capacity = 70}, [all …]
|
D | ab8500_bmdata.c | 20 { .ocv = 4186000, .capacity = 100}, 21 { .ocv = 4163000, .capacity = 99}, 22 { .ocv = 4114000, .capacity = 95}, 23 { .ocv = 4068000, .capacity = 90}, 24 { .ocv = 3990000, .capacity = 80}, 25 { .ocv = 3926000, .capacity = 70}, 26 { .ocv = 3898000, .capacity = 65}, 27 { .ocv = 3866000, .capacity = 60}, 28 { .ocv = 3833000, .capacity = 55}, 29 { .ocv = 3812000, .capacity = 50}, [all …]
|
D | acer_a500_battery.c | 60 unsigned int capacity; member 65 unsigned int capacity; in a500_battery_update_capacity() local 68 err = regmap_read(bat->regmap, ec_data[REG_CAPACITY].reg, &capacity); in a500_battery_update_capacity() 73 capacity = min(capacity, 100u); in a500_battery_update_capacity() 75 if (bat->capacity != capacity) { in a500_battery_update_capacity() 76 bat->capacity = capacity; in a500_battery_update_capacity() 85 if (bat->capacity < 100) { in a500_battery_get_status() 164 val->intval = bat->capacity; in a500_battery_get_property()
|
D | ds2782_battery.c | 49 int (*get_battery_capacity)(struct ds278x_info *info, int *capacity); 62 int capacity; member 161 static int ds2782_get_capacity(struct ds278x_info *info, int *capacity) in ds2782_get_capacity() argument 169 *capacity = raw; in ds2782_get_capacity() 201 static int ds2786_get_capacity(struct ds278x_info *info, int *capacity) in ds2786_get_capacity() argument 210 *capacity = raw/2 ; in ds2786_get_capacity() 218 int capacity; in ds278x_get_status() local 224 err = info->ops->get_battery_capacity(info, &capacity); in ds278x_get_status() 228 info->capacity = capacity; in ds278x_get_status() 230 if (capacity == 100) in ds278x_get_status() [all …]
|
D | rx51_battery.c | 134 int capacity = rx51_battery_read_adc(di->channel_bsi); in rx51_battery_read_capacity() local 136 if (capacity < 0) { in rx51_battery_read_capacity() 137 dev_err(di->dev, "Could not read ADC: %d\n", capacity); in rx51_battery_read_capacity() 138 return capacity; in rx51_battery_read_capacity() 141 return 1280 * (1200 * capacity)/(1024 - capacity); in rx51_battery_read_capacity()
|
D | da9052-battery.c | 353 static int da9052_bat_read_capacity(struct da9052_battery *bat, int *capacity) in da9052_bat_read_capacity() argument 377 *capacity = 100; in da9052_bat_read_capacity() 381 *capacity = 0; in da9052_bat_read_capacity() 400 *capacity = da9052_bat_interpolate(vbat_lower, vbat_upper, level_lower, in da9052_bat_read_capacity() 410 int capacity; in da9052_bat_check_health() local 422 ret = da9052_bat_read_capacity(bat, &capacity); in da9052_bat_check_health() 425 if (capacity < DA9052_BAT_LOW_CAP) in da9052_bat_check_health()
|
/drivers/gpu/drm/amd/display/dc/basics/ |
D | vector.c | 32 uint32_t capacity, in dal_vector_construct() argument 37 if (!struct_size || !capacity) { in dal_vector_construct() 43 vector->container = kcalloc(capacity, struct_size, GFP_KERNEL); in dal_vector_construct() 46 vector->capacity = capacity; in dal_vector_construct() 85 vector->capacity = count; in dal_vector_presized_costruct() 113 uint32_t capacity, in dal_vector_create() argument 121 if (dal_vector_construct(vector, ctx, capacity, struct_size)) in dal_vector_create() 134 vector->capacity = 0; in dal_vector_destruct() 209 if (vector->count == vector->capacity) { in dal_vector_insert_at() 212 calc_increased_capacity(vector->capacity))) in dal_vector_insert_at() [all …]
|
/drivers/scsi/ |
D | scsicam.c | 60 bool scsi_partsize(struct block_device *bdev, sector_t capacity, int geom[3]) in scsi_partsize() argument 124 geom[2] = (unsigned long)capacity / in scsi_partsize() 175 static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds, in setsize() argument 185 heads = capacity / temp; /* Compute value for number of heads */ in setsize() 186 if (capacity % temp) { /* If no remainder, done! */ in setsize() 189 sectors = capacity / temp; /* Compute value for sectors per in setsize() 191 if (capacity % temp) { /* If no remainder, done! */ in setsize() 194 cylinders = capacity / temp; /* Compute number of cylinders */ in setsize() 218 int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip) in scsicam_bios_param() argument 220 u64 capacity64 = capacity; /* Suppress gcc warning */ in scsicam_bios_param() [all …]
|
D | sd_zbc.c | 96 zone.capacity = logical_to_sectors(sdp, get_unaligned_be64(&buf[8])); in sd_zbc_parse_report() 97 zone.len = zone.capacity; in sd_zbc_parse_report() 104 sectors_to_logical(sdp, zone.capacity), in sd_zbc_parse_report() 272 if (!sdkp->capacity) in sd_zbc_report_zones() 280 while (zone_idx < nr_zones && lba < sdkp->capacity) { in sd_zbc_report_zones() 730 if (sdkp->capacity != max_lba + 1) { in sd_zbc_check_capacity() 734 (unsigned long long)sdkp->capacity, in sd_zbc_check_capacity() 736 sdkp->capacity = max_lba + 1; in sd_zbc_check_capacity() 763 if (!sd_is_zoned(sdkp) || !sdkp->capacity) in sd_zbc_print_zones() 766 div64_u64_rem(sdkp->capacity, sdkp->zone_info.zone_blocks, &remainder); in sd_zbc_print_zones() [all …]
|
D | sr.c | 343 cd->capacity - error_sector < 4 * 75) in sr_done() 655 cd->capacity = 0x1fffff; in sr_probe() 665 cd->cdi.capacity = 1; in sr_probe() 675 set_capacity(disk, cd->capacity); in sr_probe() 741 cd->capacity = 0x1fffff; in get_sectorsize() 746 cd->capacity = 1 + get_unaligned_be32(&buffer[0]); in get_sectorsize() 755 cd->capacity = max_t(long, cd->capacity, last_written); in get_sectorsize() 771 cd->capacity *= 4; in get_sectorsize() 778 cd->capacity = 0; in get_sectorsize() 787 set_capacity(cd->disk, cd->capacity); in get_sectorsize() [all …]
|
/drivers/misc/vmw_vmci/ |
D | vmci_handle_array.c | 11 static size_t handle_arr_calc_size(u32 capacity) in handle_arr_calc_size() argument 14 capacity * sizeof(struct vmci_handle); in handle_arr_calc_size() 17 struct vmci_handle_arr *vmci_handle_arr_create(u32 capacity, u32 max_capacity) in vmci_handle_arr_create() argument 21 if (max_capacity == 0 || capacity > max_capacity) in vmci_handle_arr_create() 24 if (capacity == 0) in vmci_handle_arr_create() 25 capacity = min((u32)VMCI_HANDLE_ARRAY_DEFAULT_CAPACITY, in vmci_handle_arr_create() 28 array = kmalloc(handle_arr_calc_size(capacity), GFP_ATOMIC); in vmci_handle_arr_create() 32 array->capacity = capacity; in vmci_handle_arr_create() 49 if (unlikely(array->size >= array->capacity)) { in vmci_handle_arr_append_entry() 52 u32 capacity_bump = min(array->max_capacity - array->capacity, in vmci_handle_arr_append_entry() [all …]
|
D | vmci_handle_array.h | 16 u32 capacity; member 32 struct vmci_handle_arr *vmci_handle_arr_create(u32 capacity, u32 max_capacity);
|
/drivers/gpu/drm/amd/display/amdgpu_dm/ |
D | amdgpu_dm_plane.c | 358 uint64_t **mods, uint64_t *size, uint64_t *capacity) in add_gfx10_1_modifiers() argument 362 add_modifier(mods, size, capacity, AMD_FMT_MOD | in add_gfx10_1_modifiers() 371 add_modifier(mods, size, capacity, AMD_FMT_MOD | in add_gfx10_1_modifiers() 381 add_modifier(mods, size, capacity, AMD_FMT_MOD | in add_gfx10_1_modifiers() 386 add_modifier(mods, size, capacity, AMD_FMT_MOD | in add_gfx10_1_modifiers() 393 add_modifier(mods, size, capacity, AMD_FMT_MOD | in add_gfx10_1_modifiers() 397 add_modifier(mods, size, capacity, AMD_FMT_MOD | in add_gfx10_1_modifiers() 403 uint64_t **mods, uint64_t *size, uint64_t *capacity) in add_gfx9_modifiers() argument 424 add_modifier(mods, size, capacity, AMD_FMT_MOD | in add_gfx9_modifiers() 435 add_modifier(mods, size, capacity, AMD_FMT_MOD | in add_gfx9_modifiers() [all …]
|
/drivers/cpufreq/ |
D | amd-pstate-trace.h | 29 unsigned long capacity, 41 capacity, 54 __field(unsigned long, capacity) 67 __entry->capacity = capacity; 80 (unsigned long)__entry->capacity,
|
/drivers/base/ |
D | arch_topology.c | 168 void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity) in topology_set_cpu_scale() argument 170 per_cpu(cpu_scale, cpu) = capacity; in topology_set_cpu_scale() 193 unsigned long max_capacity, capacity, th_pressure; in topology_update_thermal_pressure() local 209 capacity = max_capacity; in topology_update_thermal_pressure() 211 capacity = mult_frac(max_capacity, capped_freq, max_freq); in topology_update_thermal_pressure() 213 th_pressure = max_capacity - capacity; in topology_update_thermal_pressure() 230 unsigned long capacity = topology_get_cpu_scale(cpu->dev.id); in cpu_capacity_show() local 232 trace_android_rvh_cpu_capacity_show(&capacity, cpu->dev.id); in cpu_capacity_show() 233 return sysfs_emit(buf, "%lu\n", capacity); in cpu_capacity_show() 295 u64 capacity; in topology_normalize_cpu_scale() local [all …]
|
/drivers/usb/storage/ |
D | sddr55.c | 87 unsigned long capacity; /* Size of card in bytes */ member 650 if (!info->capacity) in sddr55_read_map() 653 numblocks = info->capacity >> (info->blockshift + info->pageshift); in sddr55_read_map() 788 unsigned long capacity; in sddr55_transport() local 862 capacity = sddr55_get_capacity(us); in sddr55_transport() 864 if (!capacity) { in sddr55_transport() 869 info->capacity = capacity; in sddr55_transport() 875 info->max_log_blks = ((info->capacity >> (info->pageshift + info->blockshift)) / 256) * 250; in sddr55_transport() 881 capacity = (capacity / 256) * 250; in sddr55_transport() 883 capacity /= PAGESIZE; in sddr55_transport() [all …]
|
/drivers/gpu/drm/i915/ |
D | i915_drm_client.c | 74 const unsigned int capacity = i915->engine_uabi_class_count[class]; in show_client_class() local 83 if (capacity) in show_client_class() 87 if (capacity > 1) in show_client_class() 90 capacity); in show_client_class()
|
/drivers/gpu/drm/amd/display/include/ |
D | vector.h | 33 uint32_t capacity; member 40 uint32_t capacity, 45 uint32_t capacity, 104 bool dal_vector_reserve(struct vector *vector, uint32_t capacity);
|
/drivers/net/wireless/st/cw1200/ |
D | queue.c | 119 if (queue->num_queued <= (queue->capacity >> 1)) { in __cw1200_queue_gc() 167 size_t capacity, in cw1200_queue_init() argument 174 queue->capacity = capacity; in cw1200_queue_init() 183 queue->pool = kcalloc(capacity, sizeof(struct cw1200_queue_item), in cw1200_queue_init() 196 for (i = 0; i < capacity; ++i) in cw1200_queue_init() 253 queue->capacity = 0; in cw1200_queue_deinit() 319 (queue->capacity - (num_present_cpus() - 1))) { in cw1200_queue_put() 388 } else if (item_id >= (unsigned) queue->capacity) { in cw1200_queue_requeue() 459 } else if (item_id >= (unsigned) queue->capacity) { in cw1200_queue_remove() 479 (queue->num_queued <= (queue->capacity >> 1))) { in cw1200_queue_remove() [all …]
|
/drivers/net/wireless/intel/iwlwifi/dvm/ |
D | main.c | 399 u32 capacity, u32 mode) in iwl_print_cont_event_trace() argument 423 if (WARN_ON(num_events > capacity - start_idx)) in iwl_print_cont_event_trace() 424 num_events = capacity - start_idx; in iwl_print_cont_event_trace() 448 u32 capacity; /* event log capacity in # entries */ in iwl_continuous_event_trace() local 450 u32 capacity; in iwl_continuous_event_trace() member 464 capacity = read.capacity; in iwl_continuous_event_trace() 476 if (unlikely(next_entry == capacity)) in iwl_continuous_event_trace() 494 capacity, mode); in iwl_continuous_event_trace() 510 capacity - priv->event_log.next_entry, in iwl_continuous_event_trace() 511 capacity, mode); in iwl_continuous_event_trace() [all …]
|
/drivers/platform/chrome/wilco_ec/ |
D | event.c | 95 int capacity; member 105 static struct ec_event_queue *event_queue_new(int capacity) in event_queue_new() argument 109 q = kzalloc(struct_size(q, entries, capacity), GFP_KERNEL); in event_queue_new() 113 q->capacity = capacity; in event_queue_new() 139 q->tail = (q->tail + 1) % q->capacity; in event_queue_pop() 156 q->head = (q->head + 1) % q->capacity; in event_queue_push()
|
/drivers/scsi/aic7xxx/ |
D | aiclib.h | 122 aic_sector_div(sector_t capacity, int heads, int sectors) in aic_sector_div() argument 125 sector_div(capacity, (heads * sectors)); in aic_sector_div() 126 return (int)capacity; in aic_sector_div()
|
/drivers/gpu/drm/amd/display/dmub/inc/ |
D | dmub_cmd.h | 4200 uint32_t capacity; /**< Ringbuffer capacity in bytes */ member 4212 uint32_t capacity; /**< Ringbuffer capacity in bytes */ member 4244 data_count = rb->capacity - (rb->rptr - rb->wrpt); in dmub_rb_full() 4246 return (data_count == (rb->capacity - DMUB_RB_CMD_SIZE)); in dmub_rb_full() 4273 if (rb->wrpt >= rb->capacity) in dmub_rb_push_front() 4274 rb->wrpt %= rb->capacity; in dmub_rb_push_front() 4300 if (rb->wrpt >= rb->capacity) in dmub_rb_out_push_front() 4301 rb->wrpt %= rb->capacity; in dmub_rb_out_push_front() 4340 if (*next_rptr >= rb->capacity) in dmub_rb_get_rptr_with_offset() 4341 *next_rptr %= rb->capacity; in dmub_rb_get_rptr_with_offset() [all …]
|
/drivers/hid/ |
D | hid-logitech-hidpp.c | 155 int capacity; member 789 hidpp->battery.capacity = response.rap.params[0]; in hidpp10_query_battery_mileage() 802 int status, capacity, level; in hidpp10_battery_event() local 810 capacity = hidpp->battery.capacity; in hidpp10_battery_event() 815 capacity = report->rap.params[0]; in hidpp10_battery_event() 823 changed = capacity != hidpp->battery.capacity || in hidpp10_battery_event() 1184 static int hidpp_map_battery_level(int capacity) in hidpp_map_battery_level() argument 1186 if (capacity < 11) in hidpp_map_battery_level() 1192 else if (capacity < 30) in hidpp_map_battery_level() 1194 else if (capacity < 81) in hidpp_map_battery_level() [all …]
|
/drivers/firewire/ |
D | nosy.c | 60 size_t capacity; member 115 packet_buffer_init(struct packet_buffer *buffer, size_t capacity) in packet_buffer_init() argument 117 buffer->data = kmalloc(capacity, GFP_KERNEL); in packet_buffer_init() 122 buffer->capacity = capacity; in packet_buffer_init() 156 end = buffer->data + buffer->capacity; in packet_buffer_get() 189 if (buffer->capacity < in packet_buffer_put() 195 end = buffer->data + buffer->capacity; in packet_buffer_put()
|