/linux/drivers/gpu/drm/amd/display/dc/basics/ |
H A D | dce_calcs.c | 78 struct bw_calcs_data *data) in calculate_bandwidth() argument 170 if (data->d0_underlay_mode == bw_def_none) in calculate_bandwidth() 174 if (data->d1_underlay_mode == bw_def_none) in calculate_bandwidth() 178 data->number_of_underlay_surfaces = d0_underlay_enable + d1_underlay_enable; in calculate_bandwidth() 179 switch (data->underlay_surface_type) { in calculate_bandwidth() 183 data->bytes_per_pixel[0] = 1; in calculate_bandwidth() 184 data->bytes_per_pixel[2] = 1; in calculate_bandwidth() 187 data->bytes_per_pixel[1] = 2; in calculate_bandwidth() 188 data->bytes_per_pixel[3] = 2; in calculate_bandwidth() 189 data->lb_size_per_component[0] = dceip->underlay420_luma_lb_size_per_component; in calculate_bandwidth() [all …]
|
/linux/drivers/iio/common/ssp_sensors/ |
H A D | ssp_dev.c | 62 static void ssp_toggle_mcu_reset_gpio(struct ssp_data *data) in ssp_toggle_mcu_reset_gpio() argument 64 gpiod_set_value(data->mcu_reset_gpiod, 0); in ssp_toggle_mcu_reset_gpio() 66 gpiod_set_value(data->mcu_reset_gpiod, 1); in ssp_toggle_mcu_reset_gpio() 70 static void ssp_sync_available_sensors(struct ssp_data *data) in ssp_sync_available_sensors() argument 75 if (data->available_sensors & BIT(i)) { in ssp_sync_available_sensors() 76 ret = ssp_enable_sensor(data, i, data->delay_buf[i]); in ssp_sync_available_sensors() 78 dev_err(&data->spi->dev, in ssp_sync_available_sensors() 85 ret = ssp_command(data, SSP_MSG2SSP_AP_MCU_SET_DUMPMODE, in ssp_sync_available_sensors() 86 data->mcu_dump_mode); in ssp_sync_available_sensors() 88 dev_err(&data->spi->dev, in ssp_sync_available_sensors() [all …]
|
/linux/drivers/gpu/drm/panel/ |
H A D | panel-novatek-nt36672a.c | 32 const char data[2]; member 92 err = mipi_dsi_dcs_write(pinfo->link, cmd->data[0], cmd->data + 1, 1); in nt36672a_send_cmds() 252 { .data = {0xFF, 0x22} }, 253 { .data = {0x00, 0x40} }, 254 { .data = {0x01, 0xC0} }, 255 { .data = {0x02, 0x40} }, 256 { .data = {0x03, 0x40} }, 257 { .data = {0x04, 0x40} }, 258 { .data = {0x05, 0x40} }, 259 { .data = {0x06, 0x40} }, [all …]
|
H A D | panel-feixin-k101-im2ba02.c | 38 u8 data[K101_IM2BA02_INIT_CMD_LEN]; member 43 { .data = { 0xE0, 0x00 } }, 46 { .data = { 0xE1, 0x93} }, 47 { .data = { 0xE2, 0x65 } }, 48 { .data = { 0xE3, 0xF8 } }, 51 { .data = { 0x80, 0x03 } }, 54 { .data = { 0x70, 0x02 } }, 55 { .data = { 0x71, 0x23 } }, 56 { .data = { 0x72, 0x06 } }, 59 { .data = { 0xE0, 0x01 } }, [all …]
|
/linux/drivers/hwmon/ |
H A D | nct6775-core.c | 64 /* used to set data->name = nct6775_device_names[data->sio_kind] */ 81 /* Common and NCT6775 specific data */ 192 #define NCT6775_AUTO_TEMP(data, nr, p) ((data)->REG_AUTO_TEMP[nr] + (p)) argument 193 #define NCT6775_AUTO_PWM(data, nr, p) ((data)->REG_AUTO_PWM[nr] + (p)) argument 248 /* NCT6776 specific data */ 333 /* NCT6779 specific data */ 439 /* NCT6791 specific data */ 459 /* NCT6792/NCT6793 specific data */ 738 /* NCT6102D/NCT6106D specific data */ 839 /* NCT6112D/NCT6114D/NCT6116D specific data */ [all …]
|
H A D | w83627ehf.c | 54 /* used to set data->name = w83627ehf_device_names[data->sio_kind] */ 83 #define SIO_REG_VID_DATA 0xF1 /* VID data */ 302 * Data structures and manipulation thereof 392 static inline void w83627ehf_set_bank(struct w83627ehf_data *data, u16 reg) in w83627ehf_set_bank() argument 395 if (data->bank != bank) { in w83627ehf_set_bank() 396 outb_p(W83627EHF_REG_BANK, data->addr + ADDR_REG_OFFSET); in w83627ehf_set_bank() 397 outb_p(bank, data->addr + DATA_REG_OFFSET); in w83627ehf_set_bank() 398 data->bank = bank; in w83627ehf_set_bank() 402 static u16 w83627ehf_read_value(struct w83627ehf_data *data, u16 reg) in w83627ehf_read_value() argument 406 mutex_lock(&data->lock); in w83627ehf_read_value() [all …]
|
H A D | ibmaem.c | 139 void (*update)(struct aem_data *data); 173 /* Data structures returned by the AEM firmware */ 225 /* Data structures to talk to the IPMI layer */ 236 static void aem_remove_sensors(struct aem_data *data); 237 static int aem1_find_sensors(struct aem_data *data); 238 static int aem2_find_sensors(struct aem_data *data); 239 static void update_aem1_sensors(struct aem_data *data); 240 static void update_aem2_sensors(struct aem_data *data); 256 /* Initialize IPMI address, message buffers and user data */ 257 static int aem_init_ipmi_data(struct aem_ipmi_data *data, int iface, in aem_init_ipmi_data() argument [all …]
|
/linux/drivers/net/wireless/broadcom/b43/ |
H A D | phy_lp.c | 497 u8 data[6]; member 510 { .freq = 12000, .data[0] = 6, .data[1] = 6, .data[2] = 6, in lpphy_2062_init() 511 .data[3] = 6, .data[4] = 10, .data[5] = 6, }, in lpphy_2062_init() 512 { .freq = 13000, .data[0] = 4, .data[1] = 4, .data[2] = 4, in lpphy_2062_init() 513 .data[3] = 4, .data[4] = 11, .data[5] = 7, }, in lpphy_2062_init() 514 { .freq = 14400, .data[0] = 3, .data[1] = 3, .data[2] = 3, in lpphy_2062_init() 515 .data[3] = 3, .data[4] = 12, .data[5] = 7, }, in lpphy_2062_init() 516 { .freq = 16200, .data[0] = 3, .data[1] = 3, .data[2] = 3, in lpphy_2062_init() 517 .data[3] = 3, .data[4] = 13, .data[5] = 8, }, in lpphy_2062_init() 518 { .freq = 18000, .data[0] = 2, .data[1] = 2, .data[2] = 2, in lpphy_2062_init() [all …]
|
/linux/drivers/gnss/ |
H A D | sirf.c | 29 * If no data arrives for this time, we assume that the chip is off. 32 * low value. Also power saving settings (like send data only on movement) 58 static int sirf_serdev_open(struct sirf_data *data) in sirf_serdev_open() argument 62 mutex_lock(&data->serdev_mutex); in sirf_serdev_open() 63 if (++data->serdev_count == 1) { in sirf_serdev_open() 64 ret = serdev_device_open(data->serdev); in sirf_serdev_open() 66 data->serdev_count--; in sirf_serdev_open() 70 serdev_device_set_baudrate(data->serdev, data->speed); in sirf_serdev_open() 71 serdev_device_set_flow_control(data->serdev, false); in sirf_serdev_open() 75 mutex_unlock(&data->serdev_mutex); in sirf_serdev_open() [all …]
|
/linux/drivers/power/supply/ |
H A D | sc27xx_fuel_gauge.c | 124 static int sc27xx_fgu_cap_to_clbcnt(struct sc27xx_fgu_data *data, int capacity); 125 static void sc27xx_fgu_capacity_calibration(struct sc27xx_fgu_data *data, 127 static void sc27xx_fgu_adjust_cap(struct sc27xx_fgu_data *data, int cap); 128 static int sc27xx_fgu_get_temp(struct sc27xx_fgu_data *data, int *temp); 137 static int sc27xx_fgu_adc_to_current(struct sc27xx_fgu_data *data, s64 adc) in sc27xx_fgu_adc_to_current() argument 139 return DIV_S64_ROUND_CLOSEST(adc * 1000, data->cur_1000ma_adc); in sc27xx_fgu_adc_to_current() 142 static int sc27xx_fgu_adc_to_voltage(struct sc27xx_fgu_data *data, s64 adc) in sc27xx_fgu_adc_to_voltage() argument 144 return DIV_S64_ROUND_CLOSEST(adc * 1000, data->vol_1000mv_adc); in sc27xx_fgu_adc_to_voltage() 147 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() [all …]
|
H A D | max8903_charger.c | 49 struct max8903_data *data = power_supply_get_drvdata(psy); in max8903_get_property() local 54 if (data->chg) { in max8903_get_property() 55 if (gpiod_get_value(data->chg)) in max8903_get_property() 58 else if (data->usb_in || data->ta_in) in max8903_get_property() 66 if (data->usb_in || data->ta_in) in max8903_get_property() 71 if (data->fault) in max8903_get_property() 83 struct max8903_data *data = _data; in max8903_dcin() local 94 ta_in = gpiod_get_value(data->dok); in max8903_dcin() 96 if (ta_in == data->ta_in) in max8903_dcin() 99 data->ta_in = ta_in; in max8903_dcin() [all …]
|
/linux/drivers/clk/meson/ |
H A D | gxbb.h | 13 * Register offsets from the data sheet are listed in comment blocks below. 17 #define SCR 0x2C /* 0x0b offset in data sheet */ 18 #define TIMEOUT_VALUE 0x3c /* 0x0f offset in data sheet */ 20 #define HHI_GP0_PLL_CNTL 0x40 /* 0x10 offset in data sheet */ 21 #define HHI_GP0_PLL_CNTL2 0x44 /* 0x11 offset in data sheet */ 22 #define HHI_GP0_PLL_CNTL3 0x48 /* 0x12 offset in data sheet */ 23 #define HHI_GP0_PLL_CNTL4 0x4c /* 0x13 offset in data sheet */ 24 #define HHI_GP0_PLL_CNTL5 0x50 /* 0x14 offset in data sheet */ 25 #define HHI_GP0_PLL_CNTL1 0x58 /* 0x16 offset in data sheet */ 27 #define HHI_XTAL_DIVN_CNTL 0xbc /* 0x2f offset in data sheet */ [all …]
|
/linux/drivers/iio/pressure/ |
H A D | bmp280-core.c | 312 static int bmp280_read_calib(struct bmp280_data *data) in bmp280_read_calib() argument 314 struct bmp280_calib *calib = &data->calib.bmp280; in bmp280_read_calib() 318 ret = regmap_bulk_read(data->regmap, BMP280_REG_COMP_TEMP_START, in bmp280_read_calib() 319 data->bmp280_cal_buf, in bmp280_read_calib() 320 sizeof(data->bmp280_cal_buf)); in bmp280_read_calib() 322 dev_err(data->dev, in bmp280_read_calib() 327 /* Toss calibration data into the entropy pool */ in bmp280_read_calib() 328 add_device_randomness(data->bmp280_cal_buf, in bmp280_read_calib() 329 sizeof(data->bmp280_cal_buf)); in bmp280_read_calib() 332 calib->T1 = le16_to_cpu(data->bmp280_cal_buf[T1]); in bmp280_read_calib() [all …]
|
/linux/drivers/input/misc/ |
H A D | cma3000_d0x.c | 73 #define CMA3000_READ(data, reg, msg) \ argument 74 (data->bus_ops->read(data->dev, reg, msg)) 75 #define CMA3000_SET(data, reg, val, msg) \ argument 76 ((data)->bus_ops->write(data->dev, reg, val, msg)) 95 static void decode_mg(struct cma3000_accl_data *data, int *datax, in decode_mg() argument 98 /* Data in 2's complement, convert to mg */ in decode_mg() 99 *datax = ((s8)*datax) * data->bit_to_mg; in decode_mg() 100 *datay = ((s8)*datay) * data->bit_to_mg; in decode_mg() 101 *dataz = ((s8)*dataz) * data->bit_to_mg; in decode_mg() 106 struct cma3000_accl_data *data = dev_id; in cma3000_thread_irq() local [all …]
|
/linux/arch/powerpc/platforms/powernv/ |
H A D | pci.c | 194 struct OpalIoP7IOCPhbErrorData *data; in pnv_pci_dump_p7ioc_diag_data() local 196 data = (struct OpalIoP7IOCPhbErrorData *)common; in pnv_pci_dump_p7ioc_diag_data() 197 pr_info("P7IOC PHB#%x Diag-data (Version: %d)\n", in pnv_pci_dump_p7ioc_diag_data() 200 if (data->brdgCtl) in pnv_pci_dump_p7ioc_diag_data() 202 be32_to_cpu(data->brdgCtl)); in pnv_pci_dump_p7ioc_diag_data() 203 if (data->portStatusReg || data->rootCmplxStatus || in pnv_pci_dump_p7ioc_diag_data() 204 data->busAgentStatus) in pnv_pci_dump_p7ioc_diag_data() 206 be32_to_cpu(data->portStatusReg), in pnv_pci_dump_p7ioc_diag_data() 207 be32_to_cpu(data->rootCmplxStatus), in pnv_pci_dump_p7ioc_diag_data() 208 be32_to_cpu(data->busAgentStatus)); in pnv_pci_dump_p7ioc_diag_data() [all …]
|
/linux/drivers/iio/proximity/ |
H A D | sx_common.c | 61 struct sx_common_data *data = iio_priv(indio_dev); in sx_common_irq_handler() local 63 if (data->trigger_enabled) in sx_common_irq_handler() 64 iio_trigger_poll(data->trig); in sx_common_irq_handler() 78 struct sx_common_data *data = iio_priv(indio_dev); in sx_common_push_events() local 83 ret = regmap_read(data->regmap, data->chip_info->reg_stat, &val); in sx_common_push_events() 85 dev_err(&data->client->dev, "i2c transfer error in irq\n"); in sx_common_push_events() 89 val >>= data->chip_info->stat_offset; in sx_common_push_events() 95 prox_changed = (data->chan_prox_stat ^ val) & data->chan_event; in sx_common_push_events() 97 for_each_set_bit(chan, &prox_changed, data->chip_info->num_channels) { in sx_common_push_events() 107 data->chan_prox_stat = val; in sx_common_push_events() [all …]
|
/linux/drivers/usb/typec/ |
H A D | rt1719.c | 120 static int rt1719_read16(struct rt1719_data *data, unsigned int reg, u16 *val) in rt1719_read16() argument 125 ret = regmap_raw_read(data->regmap, reg, ®val, sizeof(regval)); in rt1719_read16() 133 static int rt1719_read32(struct rt1719_data *data, unsigned int reg, u32 *val) in rt1719_read32() argument 138 ret = regmap_raw_read(data->regmap, reg, ®val, sizeof(regval)); in rt1719_read32() 146 static int rt1719_write32(struct rt1719_data *data, unsigned int reg, u32 val) in rt1719_write32() argument 150 return regmap_raw_write(data->regmap, reg, ®val, sizeof(regval)); in rt1719_write32() 191 static void rt1719_set_data_role(struct rt1719_data *data, in rt1719_set_data_role() argument 204 usb_role_switch_set_role(data->role_sw, usb_role); in rt1719_set_data_role() 205 typec_set_data_role(data->port, data_role); in rt1719_set_data_role() 208 static void rt1719_update_data_role(struct rt1719_data *data) in rt1719_update_data_role() argument [all …]
|
/linux/drivers/bluetooth/ |
H A D | btintel_pcie.c | 89 static void btintel_pcie_set_tx_db(struct btintel_pcie_data *data, u16 index) in btintel_pcie_set_tx_db() argument 96 btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_HBUS_TARG_WRPTR, val); in btintel_pcie_set_tx_db() 99 /* Copy the data to next(@tfd_index) data buffer and update the TFD(transfer 100 * descriptor) with the data length and the DMA address of the data buffer. 116 /* Copy the outgoing data to DMA buffer */ in btintel_pcie_prepare_tx() 117 memcpy(buf->data, skb->data, tfd->size); in btintel_pcie_prepare_tx() 120 static int btintel_pcie_send_sync(struct btintel_pcie_data *data, in btintel_pcie_send_sync() argument 125 struct txq *txq = &data->txq; in btintel_pcie_send_sync() 127 tfd_index = data->ia.tr_hia[BTINTEL_PCIE_TXQ_NUM]; in btintel_pcie_send_sync() 132 /* Prepare for TX. It updates the TFD with the length of data and in btintel_pcie_send_sync() [all …]
|
/linux/tools/perf/util/ |
H A D | data.c | 16 #include "data.h" 32 void perf_data__close_dir(struct perf_data *data) in perf_data__close_dir() argument 34 close_dir(data->dir.files, data->dir.nr); in perf_data__close_dir() 37 int perf_data__create_dir(struct perf_data *data, int nr) in perf_data__create_dir() argument 43 if (WARN_ON(!data->is_dir)) in perf_data__create_dir() 53 ret = asprintf(&file->path, "%s/data.%d", data->path, i); in perf_data__create_dir() 63 * If using parallel threads to collect data, in perf_data__create_dir() 78 data->dir.version = PERF_DIR_VERSION; in perf_data__create_dir() 79 data->dir.files = files; in perf_data__create_dir() 80 data->dir.nr = nr; in perf_data__create_dir() [all …]
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | nbio_v6_1.c | 167 uint32_t def, data; in nbio_v6_1_update_medium_grain_clock_gating() local 169 def = data = RREG32_PCIE(smnCPM_CONTROL); in nbio_v6_1_update_medium_grain_clock_gating() 171 data |= (CPM_CONTROL__LCLK_DYN_GATE_ENABLE_MASK | in nbio_v6_1_update_medium_grain_clock_gating() 179 data &= ~(CPM_CONTROL__LCLK_DYN_GATE_ENABLE_MASK | in nbio_v6_1_update_medium_grain_clock_gating() 188 if (def != data) in nbio_v6_1_update_medium_grain_clock_gating() 189 WREG32_PCIE(smnCPM_CONTROL, data); in nbio_v6_1_update_medium_grain_clock_gating() 195 uint32_t def, data; in nbio_v6_1_update_medium_grain_light_sleep() local 197 def = data = RREG32_PCIE(smnPCIE_CNTL2); in nbio_v6_1_update_medium_grain_light_sleep() 199 data |= (PCIE_CNTL2__SLV_MEM_LS_EN_MASK | in nbio_v6_1_update_medium_grain_light_sleep() 203 data &= ~(PCIE_CNTL2__SLV_MEM_LS_EN_MASK | in nbio_v6_1_update_medium_grain_light_sleep() [all …]
|
/linux/lib/pldmfw/ |
H A D | pldmfw.c | 54 * @data: pointer to private data 58 * Verify that the firmware data can hold a chunk of bytes with the specified 65 pldm_check_fw_space(struct pldmfw_priv *data, size_t offset, size_t length) in pldm_check_fw_space() argument 68 struct device *dev = data->context->dev; in pldm_check_fw_space() 70 if (data->fw->size < expected_size) { in pldm_check_fw_space() 72 data->fw->size, expected_size); in pldm_check_fw_space() 81 * @data: pointer to private data 91 pldm_move_fw_offset(struct pldmfw_priv *data, size_t bytes_to_move) in pldm_move_fw_offset() argument 95 err = pldm_check_fw_space(data, data->offset, bytes_to_move); in pldm_move_fw_offset() 99 data->offset += bytes_to_move; in pldm_move_fw_offset() [all …]
|
/linux/drivers/platform/x86/ |
H A D | system76_acpi.c | 76 static int system76_get(struct system76_data *data, char *method) in system76_get() argument 82 handle = acpi_device_handle(data->acpi_dev); in system76_get() 90 static int system76_get_index(struct system76_data *data, char *method, int index) in system76_get_index() argument 103 handle = acpi_device_handle(data->acpi_dev); in system76_get_index() 111 static int system76_get_object(struct system76_data *data, char *method, union acpi_object **obj) in system76_get_object() argument 117 handle = acpi_device_handle(data->acpi_dev); in system76_get_object() 139 static int system76_set(struct system76_data *data, char *method, int value) in system76_set() argument 150 handle = acpi_device_handle(data->acpi_dev); in system76_set() 301 struct system76_data *data; in ap_led_get() local 304 data = container_of(led, struct system76_data, ap_led); in ap_led_get() [all …]
|
/linux/drivers/platform/x86/intel/uncore-frequency/ |
H A D | uncore-frequency-common.c | 22 static int (*uncore_read)(struct uncore_data *data, unsigned int *value, enum uncore_index index); 23 static int (*uncore_write)(struct uncore_data *data, unsigned int input, enum uncore_index index); 27 struct uncore_data *data = container_of(attr, struct uncore_data, domain_id_kobj_attr); in show_domain_id() local 29 return sprintf(buf, "%u\n", data->domain_id); in show_domain_id() 34 struct uncore_data *data = container_of(attr, struct uncore_data, fabric_cluster_id_kobj_attr); in show_fabric_cluster_id() local 36 return sprintf(buf, "%u\n", data->cluster_id); in show_fabric_cluster_id() 41 struct uncore_data *data = container_of(attr, struct uncore_data, package_id_kobj_attr); in show_package_id() local 43 return sprintf(buf, "%u\n", data->package_id); in show_package_id() 46 static ssize_t show_attr(struct uncore_data *data, char *buf, enum uncore_index index) in show_attr() argument 52 ret = uncore_read(data, &value, index); in show_attr() [all …]
|
/linux/drivers/input/mouse/ |
H A D | elan_i2c_core.c | 188 static int elan_set_power(struct elan_tp_data *data, bool on) in elan_set_power() argument 194 error = data->ops->power_control(data->client, on); in elan_set_power() 201 dev_err(&data->client->dev, "failed to set power %s: %d\n", in elan_set_power() 206 static int elan_sleep(struct elan_tp_data *data) in elan_sleep() argument 212 error = data->ops->sleep_control(data->client, true); in elan_sleep() 222 static int elan_query_product(struct elan_tp_data *data) in elan_query_product() argument 226 error = data->ops->get_product_id(data->client, &data->product_id); in elan_query_product() 230 error = data->ops->get_pattern(data->client, &data->pattern); in elan_query_product() 234 error = data->ops->get_sm_version(data->client, data->pattern, in elan_query_product() 235 &data->ic_type, &data->sm_version, in elan_query_product() [all …]
|
/linux/drivers/media/rc/ |
H A D | winbond-cir.c | 48 /* CEIR Wake-Up Registers, relative to data->wbase */ 55 #define WBCIR_REG_WCEIR_DATA 0x09 /* CEIR Receiver Data */ 60 /* CEIR Enhanced Functionality Registers, relative to data->ebase */ 67 /* SP3 Banked Registers, relative to data->sbase */ 70 #define WBCIR_REG_SP3_RXDATA 0x00 /* FIFO RX data (r) */ 71 #define WBCIR_REG_SP3_TXDATA 0x00 /* FIFO TX data (w) */ 110 /* RX data bit for WBCIR_REG_SP3_IER and WBCIR_REG_SP3_EIR */ 112 /* TX data low bit for WBCIR_REG_SP3_IER and WBCIR_REG_SP3_EIR */ 116 /* TX data empty bit for WBCEIR_REG_SP3_IER and WBCIR_REG_SP3_EIR */ 120 /* RX data available bit for WBCIR_REG_SP3_LSR */ [all …]
|