/linux/drivers/gpu/drm/amd/display/dc/basics/ |
H A D | dce_calcs.c | 36 * This file is gcc-parseable HW gospel, coming straight from HW engineers. 40 * remain as-is as it provides us with a guarantee from HW that it is correct. 78 struct bw_calcs_data *data) in calculate_bandwidth() argument 139 yclk[low] = vbios->low_yclk; in calculate_bandwidth() 140 yclk[mid] = vbios->mid_yclk; in calculate_bandwidth() 141 yclk[high] = vbios->high_yclk; in calculate_bandwidth() 142 sclk[s_low] = vbios->low_sclk; in calculate_bandwidth() 143 sclk[s_mid1] = vbios->mid1_sclk; in calculate_bandwidth() 144 sclk[s_mid2] = vbios->mid2_sclk; in calculate_bandwidth() 145 sclk[s_mid3] = vbios->mid3_sclk; in calculate_bandwidth() [all …]
|
/linux/drivers/iio/common/ssp_sensors/ |
H A D | ssp_dev.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 55 .name = "ssp-accelerometer", 58 .name = "ssp-gyroscope", 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() [all …]
|
/linux/net/hsr/ |
H A D | prp_dup_discard_test.c | 1 // SPDX-License-Identifier: GPL-2.0 16 struct prp_test_data *data = kunit_kzalloc(test, in build_prp_test_data() local 18 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, data); in build_prp_test_data() 20 data->frame.node_src = &data->node; in build_prp_test_data() 21 data->frame.port_rcv = &data->port_rcv; in build_prp_test_data() 22 data->port_rcv.type = HSR_PT_SLAVE_A; in build_prp_test_data() 23 data->node.seq_start[HSR_PT_SLAVE_A] = 1; in build_prp_test_data() 24 data->node.seq_expected[HSR_PT_SLAVE_A] = 1; in build_prp_test_data() 25 data->node.seq_start[HSR_PT_SLAVE_B] = 1; in build_prp_test_data() 26 data->node.seq_expected[HSR_PT_SLAVE_B] = 1; in build_prp_test_data() [all …]
|
/linux/drivers/hwmon/ |
H A D | nct6775-core.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * nct6775 - Driver for the hardware monitoring functionality of 4 * Nuvoton NCT677x Super-I/O chips 6 * Copyright (C) 2012 Guenter Roeck <linux@roeck-us.net> 9 * Copyright (C) 2005-2012 Jean Delvare <jdelvare@suse.de> 14 * Copyright (C) 2010 Sheng-Yuan Huang (Nuvoton) (PS00) 36 * nct6796d-s 18 7 7 6+2 0xd801 0xc1 0x5ca3 37 * nct6799d-r 18 7 7 6+2 0xd802 0xc1 0x5ca3 53 #include <linux/hwmon-sysfs.h> 64 /* used to set data->name = nct6775_device_names[data->sio_kind] */ [all …]
|
H A D | ibmaem.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 #include <linux/hwmon-sysfs.h> 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); [all …]
|
H A D | w83627ehf.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * w83627ehf - Driver for the hardware monitoring functionality of 4 * the Winbond W83627EHF Super-I/O chip 5 * Copyright (C) 2005-2012 Jean Delvare <jdelvare@suse.de> 10 * Copyright (C) 2010 Sheng-Yuan Huang (Nuvoton) (PS00) 18 * This driver also supports the W83627EHG, which is the lead-free 27 * w83627dhg-p 9 5 4 3 0xb070 0xc1 0x5ca3 30 * w83667hg-b 9 5 3 4 0xb350 0xc1 0x5ca3 41 #include <linux/hwmon-sysfs.h> 42 #include <linux/hwmon-vid.h> [all …]
|
/linux/drivers/leds/trigger/ |
H A D | ledtrig-pattern.c | 1 // SPDX-License-Identifier: GPL-2.0 47 static void pattern_trig_update_patterns(struct pattern_trig_data *data) in pattern_trig_update_patterns() argument 49 data->curr = data->next; in pattern_trig_update_patterns() 50 if (!data->is_indefinite && data->curr == data->patterns) in pattern_trig_update_patterns() 51 data->repeat--; in pattern_trig_update_patterns() 53 if (data->next == data->patterns + data->npatterns - 1) in pattern_trig_update_patterns() 54 data->next = data->patterns; in pattern_trig_update_patterns() 56 data->next++; in pattern_trig_update_patterns() 58 data->delta_t = 0; in pattern_trig_update_patterns() 61 static int pattern_trig_compute_brightness(struct pattern_trig_data *data) in pattern_trig_compute_brightness() argument [all …]
|
/linux/drivers/bluetooth/ |
H A D | btintel_pcie.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 89 * @ver: For Driver-FW compatibility 106 static int btintel_pcie_setup_dbgc(struct btintel_pcie_data *data) in btintel_pcie_setup_dbgc() argument 112 data->dbgc.count = BTINTEL_PCIE_DBGC_BUFFER_COUNT; in btintel_pcie_setup_dbgc() 113 data->dbgc.bufs = devm_kcalloc(&data->pdev->dev, data->dbgc.count, in btintel_pcie_setup_dbgc() 115 if (!data->dbgc.bufs) in btintel_pcie_setup_dbgc() 116 return -ENOMEM; in btintel_pcie_setup_dbgc() 118 data->dbgc.buf_v_addr = dmam_alloc_coherent(&data->pdev->dev, in btintel_pcie_setup_dbgc() 119 data->dbgc.count * in btintel_pcie_setup_dbgc() 121 &data->dbgc.buf_p_addr, in btintel_pcie_setup_dbgc() [all …]
|
H A D | bfusb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (C) 2003-2006 Marcel Holtmann <marcel@holtmann.org> 78 static struct urb *bfusb_get_completed(struct bfusb_data *data) in bfusb_get_completed() argument 83 BT_DBG("bfusb %p", data); in bfusb_get_completed() 85 skb = skb_dequeue(&data->completed_q); in bfusb_get_completed() 87 urb = ((struct bfusb_data_scb *) skb->cb)->urb; in bfusb_get_completed() 94 static void bfusb_unlink_urbs(struct bfusb_data *data) in bfusb_unlink_urbs() argument 99 BT_DBG("bfusb %p", data); in bfusb_unlink_urbs() 101 while ((skb = skb_dequeue(&data->pending_q))) { in bfusb_unlink_urbs() 102 urb = ((struct bfusb_data_scb *) skb->cb)->urb; in bfusb_unlink_urbs() [all …]
|
/linux/drivers/usb/chipidea/ |
H A D | ci_hdrc_imx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 82 { .compatible = "fsl,imx23-usb", .data = &imx23_usb_data}, 83 { .compatible = "fsl,imx28-usb", .data = &imx28_usb_data}, 84 { .compatible = "fsl,imx27-usb", .data = &imx27_usb_data}, 85 { .compatible = "fsl,imx6q-usb", .data = &imx6q_usb_data}, 86 { .compatible = "fsl,imx6sl-usb", .data = &imx6sl_usb_data}, 87 { .compatible = "fsl,imx6sx-usb", .data = &imx6sx_usb_data}, 88 { .compatible = "fsl,imx6ul-usb", .data = &imx6ul_usb_data}, 89 { .compatible = "fsl,imx7d-usb", .data = &imx7d_usb_data}, 90 { .compatible = "fsl,imx7ulp-usb", .data = &imx7ulp_usb_data}, [all …]
|
/linux/drivers/gnss/ |
H A D | sirf.c | 1 // SPDX-License-Identifier: GPL-2.0 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() [all …]
|
/linux/drivers/net/ethernet/tundra/ |
H A D | tsi108_eth.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 14 * - porting to Tsi108-based platform and kernel 2.6 (kong.lai@tundra.com) 15 * - modifications to handle two ports independently and support for 17 * - Get hardware information from platform device. (tie-fei.zang@freescale.com) 79 unsigned int rxpending; /* Non-zero if there are still descriptors 149 struct tsi108_prv_data *data = netdev_priv(dev); in dump_eth_one() local 151 printk("Dumping %s...\n", dev->name); in dump_eth_one() 155 TSI_READ(TSI108_EC_INTMASK), data->phy_ok, in dump_eth_one() 156 data->link_up, data->speed, data->duplex); in dump_eth_one() 159 data->txhead, data->txtail, data->txfree, in dump_eth_one() [all …]
|
/linux/drivers/iio/pressure/ |
H A D | bmp280-core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 12 * https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf 13 * https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf 14 * https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme280-ds002.pdf 15 * https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp388-ds001.pdf 16 * https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp390-ds002.pdf 17 * https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp581-ds004.pdf 26 * - Changed document referral from ANP015 to BST-MPS-AN004-00 on page 26 27 * - Updated equation for B3 param on section 3.5 to ((((long)AC1 * 4 + X3) << oss) + 2) / 4 28 * - Updated RoHS directive to 2011/65/EU effective 8 June 2011 on page 26 [all …]
|
/linux/drivers/iio/proximity/ |
H A D | sx_common.c | 1 // SPDX-License-Identifier: GPL-2.0 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() [all …]
|
/linux/drivers/input/misc/ |
H A D | cma3000_d0x.c | 1 // SPDX-License-Identifier: GPL-2.0-only 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() [all …]
|
/linux/drivers/usb/typec/ |
H A D | rt1719.c | 1 // SPDX-License-Identifier: GPL-2.0 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() [all …]
|
/linux/tools/perf/util/ |
H A D | data.c | 1 // SPDX-License-Identifier: GPL-2.0 16 #include "data.h" 25 while (--nr >= 0) { in close_dir() 32 void perf_data__close_dir(struct perf_data *data) in perf_data__close_dir() argument 34 close_dir(data->dir.files, data in perf_data__close_dir() 37 perf_data__create_dir(struct perf_data * data,int nr) perf_data__create_dir() argument 88 perf_data__open_dir(struct perf_data * data) perf_data__open_dir() argument 161 perf_data__update_dir(struct perf_data * data) perf_data__update_dir() argument 181 check_pipe(struct perf_data * data) check_pipe() argument 220 check_backup(struct perf_data * data) check_backup() argument 254 is_dir(struct perf_data * data) is_dir() argument 264 open_file_read(struct perf_data * data) open_file_read() argument 306 open_file_write(struct perf_data * data) open_file_write() argument 321 open_file(struct perf_data * data) open_file() argument 337 open_file_dup(struct perf_data * data) open_file_dup() argument 346 open_dir(struct perf_data * data) open_dir() argument 370 perf_data__open(struct perf_data * data) perf_data__open() argument 391 perf_data__close(struct perf_data * data) perf_data__close() argument 404 perf_data__read(struct perf_data * data,void * buf,size_t size) perf_data__read() argument 420 perf_data__write(struct perf_data * data,void * buf,size_t size) perf_data__write() argument 431 perf_data__switch(struct perf_data * data,const char * postfix,size_t pos,bool at_exit,char ** new_filepath) perf_data__switch() argument 469 perf_data__size(struct perf_data * data) perf_data__size() argument 486 perf_data__make_kcore_dir(struct perf_data * data,char * buf,size_t buf_sz) perf_data__make_kcore_dir() argument 519 perf_data__kallsyms_name(struct perf_data * data) perf_data__kallsyms_name() argument 538 perf_data__guest_kallsyms_name(struct perf_data * data,pid_t machine_pid) perf_data__guest_kallsyms_name() argument [all...] |
/linux/drivers/platform/x86/intel/uncore-frequency/ |
H A D | uncore-frequency-common.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include "uncore-frequency-common.h" 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() [all …]
|
/linux/drivers/media/rc/ |
H A D | winbond-cir.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * winbond-cir.c - Driver for the Consumer IR functionality of Winbond 12 * Copyright (C) 2009 - 2011 David Härdeman <david@hardeman.nu> 26 * o Wake-On-CIR functionality 44 #include <media/rc-core.h> 46 #define DRVNAME "winbond-cir" 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 */ [all …]
|
/linux/drivers/iio/imu/ |
H A D | kmx61.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * KMX61 - Kionix 6-axis Accelerometer/Magnetometer 7 * IIO driver for KMX61 (7-bit I2C slave address 0x0E or 0x0F). 33 * three 16-bit accelerometer output registers for X/Y/Z axis 46 * one 16-bit temperature output register 52 * three 16-bit magnetometer output registers for X/Y/Z axis 119 /* serialize access to non-atomic ops, e.g set_mode */ 136 /* accelerometer specific data */ 144 /* magnetometer specific data */ 280 static void kmx61_set_data(struct iio_dev *indio_dev, struct kmx61_data *data) in kmx61_set_data() argument [all …]
|
/linux/drivers/platform/x86/ |
H A D | system76_acpi.c | 1 // SPDX-License-Identifier: GPL-2.0+ 14 #include <linux/hwmon-sysfs.h> 64 // Array of keyboard LED colors in 24-bit RGB format 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() 86 return -ENODEV; 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() 107 return -ENODEV; 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 [all …]
|
/linux/drivers/iio/light/ |
H A D | us5182d.c | 1 // SPDX-License-Identifier: GPL-2.0-only 47 * DARK_TH(reg 0x27,0x28) - threshold (counts) for auto dark cancelling. 48 * when ALS > DARK_TH --> ALS_Code = ALS - Upper(0x2A) * Dark 49 * when ALS < DARK_TH --> ALS_Code = ALS - Lower(0x29) * Dark 56 /* Thresholds for events: px low (0x08-l, 0x09-h), px high (0x0a-l 0x0b-h) */ 101 * roughly between 12-32 lux 198 static int us5182d_oneshot_en(struct us5182d_data *data) in us5182d_oneshot_en() argument 202 ret = i2c_smbus_read_byte_data(data->client, US5182D_REG_CFG0); in us5182d_oneshot_en() 212 return i2c_smbus_write_byte_data(data->client, US5182D_REG_CFG0, ret); in us5182d_oneshot_en() 215 static int us5182d_set_opmode(struct us5182d_data *data, u8 mode) in us5182d_set_opmode() argument [all …]
|
/linux/drivers/extcon/ |
H A D | extcon-lc824206xa.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * (ENA2222-D.PDF), but no full datasheet. So there is no documentation 11 * This driver is based on the register info from the extcon-fsa9285.c driver, 22 #include <linux/extcon-provider.h> 57 /* 5 bits? ADC 0x10 GND, 0x1a-0x1f ACA, 0x1f float */ 82 * auto-reset to 0, so these must be set to 0 manually after clearing. 135 static int lc824206xa_read_reg(struct lc824206xa_data *data, u8 reg) in lc824206xa_read_reg() argument 139 ret = i2c_smbus_read_byte_data(data->client, reg); in lc824206xa_read_reg() 141 dev_err(&data->client->dev, "Error %d reading reg 0x%02x\n", ret, reg); in lc824206xa_read_reg() 146 static int lc824206xa_write_reg(struct lc824206xa_data *data, u8 reg, u8 val) in lc824206xa_write_reg() argument [all …]
|
/linux/drivers/rtc/ |
H A D | rtc-snvs.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // Copyright (C) 2011-2012 Freescale Semiconductor, Inc. 52 static u64 rtc_read_lpsrt(struct snvs_rtc_data *data) in rtc_read_lpsrt() argument 56 regmap_read(data->regmap, data->offset + SNVS_LPSRTCMR, &msb); in rtc_read_lpsrt() 57 regmap_read(data->regmap, data->offset + SNVS_LPSRTCLR, &lsb); in rtc_read_lpsrt() 64 static u32 rtc_read_lp_counter(struct snvs_rtc_data *data) in rtc_read_lp_counter() argument 74 read1 = rtc_read_lpsrt(data); in rtc_read_lp_counter() 77 read1 = rtc_read_lpsrt(data); in rtc_read_lp_counter() 78 diff = read1 - read2; in rtc_read_lp_counter() 79 } while (((diff < 0) || (diff > MAX_RTC_READ_DIFF_CYCLES)) && --timeout); in rtc_read_lp_counter() [all …]
|
/linux/drivers/cpufreq/ |
H A D | powernow-k8.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * (c) 2003-2012 Advanced Micro Devices, Inc. 8 * Based on the powernow-k7.c module written by Dave Jones. 24 * power and thermal data sheets, (e.g. 30417.pdf, 30430.pdf, 43375.pdf) 48 #include "powernow-k8.h" 99 static int query_current_values_with_pending_wait(struct powernow_k8_data *data) in query_current_values_with_pending_wait() argument 112 data->currvid = hi & MSR_S_HI_CURRENT_VID; in query_current_values_with_pending_wait() 113 data->currfid = lo & MSR_S_LO_CURRENT_FID; in query_current_values_with_pending_wait() 119 static void count_off_irt(struct powernow_k8_data *data) in count_off_irt() argument 121 udelay((1 << data->irt) * 10); in count_off_irt() [all …]
|