/linux/drivers/gpu/vga/ |
H A D | vga_switcheroo.c | 2 * vga_switcheroo.c - Support for laptop with dual GPU using one set of outputs 33 #include <linux/apple-gmux.h> 71 * handler to control the power state of the discrete GPU, its ->switchto 72 * callback is a no-op for obvious reasons. The discrete GPU is often equipped 74 * register as a client so that vga_switcheroo can take care of the correct 77 * client (on the discrete GPU). The code is mostly prepared to support 81 * active client in vga_switcheroo parlance. The GPU not in use is the 82 * inactive client. When the inactive client's DRM driver is loaded, 86 * a client may alternatively request that the DDC lines are temporarily 93 * struct vga_switcheroo_client - registered client [all …]
|
/linux/tools/testing/selftests/net/mptcp/ |
H A D | userspace_pm.sh | 2 # SPDX-License-Identifier: GPL-2.0 58 MPTCP_LIB_TEST_FORMAT="%02u %-68s" 88 if [ ${#} -gt 0 ] 112 rm -rf $file $client_evts $server_evts 124 if [ -f /proc/sys/net/mptcp/path_manager ]; then 125 ip netns exec "$ns1" sysctl -q net.mptcp.path_manager=userspace 126 pm_type="$(ip netns exec "$ns1" sysctl -n net.mptcp.pm_type)" 133 ip netns exec "$ns1" sysctl -q net.mptcp.path_manager=error 2>/dev/null 134 pm_type="$(ip netns exec "$ns1" sysctl -n net.mptcp.pm_type)" 141 ip netns exec "$ns1" sysctl -q net.mptcp.pm_type=0 [all …]
|
/linux/drivers/input/keyboard/ |
H A D | qt2160.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * qt2160.c - Atmel AT42QT2160 Touch Sense Controller 35 #define QT2160_CYCLE_INTERVAL 2000 /* msec - 2 sec */ 49 int id; member 55 struct i2c_client *client; member 64 static int qt2160_read(struct i2c_client *client, u8 reg); 65 static int qt2160_write(struct i2c_client *client, u8 reg, u8 data); 73 struct qt2160_data *qt2160 = led->qt2160; in qt2160_led_set() 74 struct i2c_client *client = qt2160->client; in qt2160_led_set() local 77 if (value != led->brightness) { in qt2160_led_set() [all …]
|
H A D | qt1070.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 49 struct i2c_client *client; member 56 static int qt1070_read(struct i2c_client *client, u8 reg) in qt1070_read() argument 60 ret = i2c_smbus_read_byte_data(client, reg); in qt1070_read() 62 dev_err(&client->dev, in qt1070_read() 68 static int qt1070_write(struct i2c_client *client, u8 reg, u8 data) in qt1070_write() argument 72 ret = i2c_smbus_write_byte_data(client, reg, data); in qt1070_write() 74 dev_err(&client->dev, in qt1070_write() 80 static bool qt1070_identify(struct i2c_client *client) in qt1070_identify() argument 82 int id, ver; in qt1070_identify() local [all …]
|
/linux/drivers/gpu/drm/i915/ |
H A D | i915_drm_client.c | 1 // SPDX-License-Identifier: MIT 22 struct i915_drm_client *client; in i915_drm_client_alloc() local 24 client = kzalloc(sizeof(*client), GFP_KERNEL); in i915_drm_client_alloc() 25 if (!client) in i915_drm_client_alloc() 28 kref_init(&client->kref); in i915_drm_client_alloc() 29 spin_lock_init(&client->ctx_lock); in i915_drm_client_alloc() 30 INIT_LIST_HEAD(&client->ctx_list); in i915_drm_client_alloc() 32 spin_lock_init(&client->objects_lock); in i915_drm_client_alloc() 33 INIT_LIST_HEAD(&client->objects_list); in i915_drm_client_alloc() 36 return client; in i915_drm_client_alloc() [all …]
|
/linux/drivers/leds/ |
H A D | leds-bd2802.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * leds-bd2802.c - RGB LED Driver 8 * Datasheet: http://www.rohm.com/products/databook/driver/pdf/bd2802gu-e.pdf 16 #include <linux/leds-bd2802.h> 69 struct i2c_client *client; member 104 /*--------------------------------------------------------------*/ 106 /*--------------------------------------------------------------*/ 108 static inline int bd2802_is_rgb_off(struct bd2802_led *led, enum led_ids id, in bd2802_is_rgb_off() argument 113 return !led->led[id].r; in bd2802_is_rgb_off() 115 return !led->led[id].g; in bd2802_is_rgb_off() [all …]
|
H A D | leds-lp3944.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * leds-lp3944.c - driver for National Semiconductor LP3944 Funlight Chip 18 * - period: from 0s to 1.6s 19 * - duty cycle: percentage of the period the led is on, from 0 to 100 30 #include <linux/leds-lp3944.h> 33 #define LP3944_REG_INPUT1 0x00 /* LEDs 0-7 InputRegister (Read Only) */ 40 #define LP3944_REG_LS0 0x06 /* LEDs 0-3 Selector (R/W) */ 41 #define LP3944_REG_LS1 0x07 /* LEDs 4-7 Selector (R/W) */ 64 u8 id; member 67 struct i2c_client *client; member [all …]
|
H A D | leds-pca9532.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * pca9532.c - 16-bit Led dimmer 18 #include <linux/leds-pca9532.h> 42 struct i2c_client *client; member 59 static int pca9532_probe(struct i2c_client *client); 60 static void pca9532_remove(struct i2c_client *client); 108 .name = "leds-pca953x", 121 static int pca9532_calcpwm(struct i2c_client *client, int pwm, int blink, in pca9532_calcpwm() argument 125 struct pca9532_data *data = i2c_get_clientdata(client); in pca9532_calcpwm() 126 for (i = 0; i < data->chip_info->num_leds; i++) { in pca9532_calcpwm() [all …]
|
/linux/drivers/net/ethernet/hisilicon/hns3/ |
H A D | hnae3.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 // Copyright (c) 2016-2017 Hisilicon Limited. 22 if (!hnae3_get_bit(ae_dev->flag, HNAE3_DEV_INITED_B)) in hnae3_unregister_ae_algo_prepare() 25 pci_id = pci_match_id(ae_algo->pdev_id_table, ae_dev->pdev); in hnae3_unregister_ae_algo_prepare() 29 device_lock(&ae_dev->pdev->dev); in hnae3_unregister_ae_algo_prepare() 30 pci_disable_sriov(ae_dev->pdev); in hnae3_unregister_ae_algo_prepare() 31 device_unlock(&ae_dev->pdev->dev); in hnae3_unregister_ae_algo_prepare() 38 * list. This is a non-critical code so other updations, if happen 67 void hnae3_set_client_init_flag(struct hnae3_client *client, in hnae3_set_client_init_flag() argument 71 if (!client || !ae_dev) in hnae3_set_client_init_flag() [all …]
|
/linux/drivers/net/pse-pd/ |
H A D | tps23881.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 #include <linux/pse-pd/pse.h> 77 struct i2c_client *client; member 94 * @param chan: The channel number (0-7). 114 * @param chan: The channel number (0-7). 138 tps23881_pi_set_pw_pol_limit(struct tps23881_priv *priv, int id, u8 pw_pol, in tps23881_pi_set_pw_pol_limit() argument 141 struct i2c_client *client = priv->client; in tps23881_pi_set_pw_pol_limit() local 146 chan = priv->port[id].chan[0]; in tps23881_pi_set_pw_pol_limit() 157 ret = i2c_smbus_read_word_data(client, reg); in tps23881_pi_set_pw_pol_limit() 162 return i2c_smbus_write_word_data(client, reg, val); in tps23881_pi_set_pw_pol_limit() [all …]
|
H A D | pd692x0.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include <linux/pse-pd/pse.h> 89 struct i2c_client *client; member 106 /* Template list of communication messages. The non-null bytes defined here 197 msg->echo = echo++; in pd692x0_build_msg() 201 for (i = 0; i < sizeof(*msg) - sizeof(msg->chksum); i++) in pd692x0_build_msg() 204 msg->chksum = cpu_to_be16(chksum); in pd692x0_build_msg() 211 const struct i2c_client *client = priv->client; in pd692x0_send_msg() local 214 if (msg->key == PD692X0_KEY_CMD && priv->last_cmd_key) { in pd692x0_send_msg() 217 cmd_msleep = 30 - jiffies_to_msecs(jiffies - priv->last_cmd_key_time); in pd692x0_send_msg() [all …]
|
/linux/drivers/input/touchscreen/ |
H A D | mms114.c | 1 // SPDX-License-Identifier: GPL-2.0 64 struct i2c_client *client; member 81 u8 id:4, reserved_bit4:1, type:2, pressed:1; member 93 struct i2c_client *client = data->client; in __mms114_read_reg() local 102 xfer[0].addr = client->addr; in __mms114_read_reg() 103 xfer[0].flags = client->flags & I2C_M_TEN; in __mms114_read_reg() 108 xfer[1].addr = client->addr; in __mms114_read_reg() 109 xfer[1].flags = (client->flags & I2C_M_TEN) | I2C_M_RD; in __mms114_read_reg() 113 error = i2c_transfer(client->adapter, xfer, 2); in __mms114_read_reg() 115 dev_err(&client->dev, in __mms114_read_reg() [all …]
|
H A D | silead.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* ------------------------------------------------------------------------- 3 * Copyright (C) 2014-2015, Intel Corporation 7 * Copyright (C) 2010-2015, Shanghai Sileadinc Co.Ltd 9 * ------------------------------------------------------------------------- 67 struct i2c_client *client; member 77 int id[SILEAD_MAX_FINGERS]; member 94 struct input_absinfo *absinfo_x = &data->input->absinfo[ABS_MT_POSITION_X]; in silead_apply_efi_fw_min_max() 95 struct input_absinfo *absinfo_y = &data->input->absinfo[ABS_MT_POSITION_Y]; in silead_apply_efi_fw_min_max() 97 if (!data->efi_fw_min_max_set) in silead_apply_efi_fw_min_max() [all …]
|
H A D | goodix.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * 2010 - 2012 Goodix Technology. 59 const char *id; member 99 { .id = "1151", .data = >1x_chip_data }, 100 { .id = "1158", .data = >1x_chip_data }, 101 { .id = "5663", .data = >1x_chip_data }, 102 { .id = "5688", .data = >1x_chip_data }, 103 { .id = "917S", .data = >1x_chip_data }, 104 { .id = "9286", .data = >1x_chip_data }, 106 { .id = "911", .data = >911_chip_data }, [all …]
|
H A D | sis_i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/crc-itu-t.h> 25 * u8 Report ID 26 * <contact data - variable length> 33 * u8 finger id 49 #define SIS_PKT_REPORT_OFFSET 2 /* Report ID/type */ 71 #define SIS_CONTACT_ID_OFFSET 1 /* Contact ID */ 76 #define SIS_CONTACT_PRESSURE_OFFSET(id) (SIS_PKT_HAS_AREA(id) ? 8 : 6) argument 95 struct i2c_client *client; member 104 static int sis_read_packet(struct i2c_client *client, u8 *buf, in sis_read_packet() argument [all …]
|
/linux/include/linux/usb/ |
H A D | ljca.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 21 * typedef ljca_event_cb_t - event callback function signature 35 * struct ljca_client - represent a ljca client device 37 * @type: ljca client type 38 * @id: ljca client id within same client type 39 * @link: ljca client on the same ljca adapter 41 * @adapter: ljca adapter the ljca client sit on 43 * @event_cb: ljca client driver register this callback to get 49 u8 id; member 61 * struct ljca_gpio_info - ljca gpio client device info [all …]
|
/linux/drivers/hwmon/pmbus/ |
H A D | max16601.c | 1 // SPDX-License-Identifier: GPL-2.0 10 * instantiates a dummy I2C client at the second I2C address to report 19 * The chip supports reading per-phase temperatures and per-phase input/output 22 * register values and reports per-phase information in PMBus page 0. 50 enum chips id; member 58 static int max16601_read_byte(struct i2c_client *client, int page, int reg) in max16601_read_byte() argument 60 const struct pmbus_driver_info *info = pmbus_get_driver_info(client); in max16601_read_byte() 65 return i2c_smbus_read_byte_data(data->vsa, reg); in max16601_read_byte() 66 return -EOPNOTSUPP; in max16601_read_byte() 68 return -ENODATA; in max16601_read_byte() [all …]
|
H A D | zl6100.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 24 int id; member 57 /* Convert linear sensor value to milli-units */ 69 /* scale result to milli-units */ in zl6100_l2d() 75 val >>= -exponent; in zl6100_l2d() 94 val = -val; in zl6100_d2l() 103 while (val < MIN_MANTISSA && exponent > -15) { in zl6100_d2l() 104 exponent--; in zl6100_d2l() 108 /* Convert mantissa from milli-units to units */ in zl6100_d2l() 117 mantissa = -mantissa; in zl6100_d2l() [all …]
|
/linux/drivers/regulator/ |
H A D | max1586.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * max1586.c -- Voltage and current regulation for the Maxim 1586 30 struct i2c_client *client; member 60 return max1586->v3_curr_sel; in max1586_v3_get_voltage_sel() 67 struct i2c_client *client = max1586->client; in max1586_v3_set_voltage_sel() local 71 dev_dbg(&client->dev, "changing voltage v3 to %dmv\n", in max1586_v3_set_voltage_sel() 75 ret = i2c_smbus_write_byte(client, v3_prog); in max1586_v3_set_voltage_sel() 79 max1586->v3_curr_sel = selector; in max1586_v3_set_voltage_sel() 88 return max1586->v6_curr_sel; in max1586_v6_get_voltage_sel() 95 struct i2c_client *client = max1586->client; in max1586_v6_set_voltage_sel() local [all …]
|
/linux/drivers/platform/surface/ |
H A D | surface_aggregator_cdev.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Provides user-space access to the SSAM EC via the /dev/surface/aggregator 6 * Copyright (C) 2020-2022 Maximilian Luz <luzmaximilian@gmail.com> 30 /* -- Main structures. ------------------------------------------------------ */ 45 struct rw_semaphore client_lock; /* Guards client list. */ 52 struct ssam_cdev_client *client; member 79 kref_get(&cdev->kref); in ssam_cdev_get() 87 kref_put(&cdev->kref, __ssam_cdev_release); in ssam_cdev_put() 91 /* -- Notifier handling. ---------------------------------------------------- */ 96 struct ssam_cdev_client *client = cdev_nf->client; in ssam_cdev_notifier() local [all …]
|
/linux/drivers/mfd/ |
H A D | adp5520.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * LEDs : drivers/led/leds-adp5520 6 * GPIO : drivers/gpio/adp5520-gpio (ADP5520 only) 7 * Keys : drivers/input/keyboard/adp5520-keys (ADP5520 only) 17 * Copyright (C) 2006-2008 Marvell International Ltd. 33 struct i2c_client *client; member 38 unsigned long id; member 42 static int __adp5520_read(struct i2c_client *client, in __adp5520_read() argument 47 ret = i2c_smbus_read_byte_data(client, reg); in __adp5520_read() 49 dev_err(&client->dev, "failed reading at 0x%02x\n", reg); in __adp5520_read() [all …]
|
H A D | 88pm80x.c | 1 // SPDX-License-Identifier: GPL-2.0-only 18 /* 88pm80x chips have same definition for chip id register. */ 24 unsigned int id; member 29 /* 88PM800 chip id number */ 31 /* 88PM805 chip id number */ 33 /* 88PM860 chip id number */ 51 int pm80x_init(struct i2c_client *client) in pm80x_init() argument 59 devm_kzalloc(&client->dev, sizeof(struct pm80x_chip), GFP_KERNEL); in pm80x_init() 61 return -ENOMEM; in pm80x_init() 63 map = devm_regmap_init_i2c(client, &pm80x_regmap_config); in pm80x_init() [all …]
|
/linux/drivers/power/supply/ |
H A D | ltc2941-battery-gauge.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * I2C client/driver for the Linear Technology LTC2941, LTC2942, LTC2943 11 #include <linux/devm-helpers.h> 72 struct i2c_client *client; /* I2C Client pointer */ member 76 enum ltc294x_id id; /* Chip type */ member 85 return ((Q * (info->Qlsb / 10))) / 100; in convert_bin_to_uAh() 93 Q = (uAh * 100) / (info->Qlsb/10); in convert_uAh_to_bin() 97 static int ltc294x_read_regs(struct i2c_client *client, in ltc294x_read_regs() argument 104 msgs[0].addr = client->addr; in ltc294x_read_regs() 108 msgs[1].addr = client->addr; in ltc294x_read_regs() [all …]
|
/linux/drivers/usb/misc/ |
H A D | usb-ljca.c | 1 // SPDX-License-Identifier: GPL-2.0-only 30 (LJCA_MAX_PACKET_SIZE - sizeof(struct ljca_msg)) 36 /* ljca client type */ 44 /* MNG client commands */ 52 /* ljca client acpi _ADR */ 72 u8 id; member 83 u8 id; member 108 * struct ljca_adapter - represent a ljca adapter 126 * @client_list: client device list 195 struct ljca_client *client; in ljca_handle_event() local [all …]
|
/linux/drivers/gpu/drm/tegra/ |
H A D | uapi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 20 host1x_bo_unpin(mapping->map); in tegra_drm_mapping_release() 21 host1x_bo_put(mapping->bo); in tegra_drm_mapping_release() 28 kref_put(&mapping->ref, tegra_drm_mapping_release); in tegra_drm_mapping_put() 34 unsigned long id; in tegra_drm_channel_context_close() local 36 if (context->memory_context) in tegra_drm_channel_context_close() 37 host1x_memory_context_put(context->memory_context); in tegra_drm_channel_context_close() 39 xa_for_each(&context->mappings, id, mapping) in tegra_drm_channel_context_close() 42 xa_destroy(&context->mappings); in tegra_drm_channel_context_close() 44 host1x_channel_put(context->channel); in tegra_drm_channel_context_close() [all …]
|