/Linux-v6.1/drivers/usb/typec/ |
D | mux.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * USB Type-C Multiplexer/DeMultiplexer Switch support 45 * property is named "orientation-switch" (@id). The value of the device in typec_switch_match() 52 * At this point we are sure that @fwnode is a typec switch in all in typec_switch_match() 53 * cases. If the switch hasn't yet been registered for some reason, the in typec_switch_match() 59 return dev ? to_typec_switch_dev(dev) : ERR_PTR(-EPROBE_DEFER); in typec_switch_match() 63 * fwnode_typec_switch_get - Find USB Type-C orientation switch 66 * Finds a switch linked with @dev. Returns a reference to the switch on 68 * ERR_PTR(-EPROBE_DEFER) when a connection was found but the switch 81 return ERR_PTR(-ENOMEM); in fwnode_typec_switch_get() [all …]
|
D | qcom-pmic-typec.c | 1 // SPDX-License-Identifier: GPL-2.0 51 if (enable == qcom_usb->vbus_enabled) in qcom_pmic_typec_enable_vbus_regulator() 55 ret = regulator_enable(qcom_usb->vbus_reg); in qcom_pmic_typec_enable_vbus_regulator() 59 ret = regulator_disable(qcom_usb->vbus_reg); in qcom_pmic_typec_enable_vbus_regulator() 63 qcom_usb->vbus_enabled = enable; in qcom_pmic_typec_enable_vbus_regulator() 68 enum typec_orientation orientation; in qcom_pmic_typec_check_connection() local 73 regmap_read(qcom_usb->regmap, qcom_usb->base + TYPEC_MISC_STATUS, in qcom_pmic_typec_check_connection() 77 orientation = (stat & CC_ORIENTATION) ? in qcom_pmic_typec_check_connection() 80 typec_set_orientation(qcom_usb->port, orientation); in qcom_pmic_typec_check_connection() 93 usb_role_switch_set_role(qcom_usb->role_sw, role); in qcom_pmic_typec_check_connection() [all …]
|
D | class.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * USB Type-C Connector Class 28 /* ------------------------------------------------------------------------- */ 65 return partner->identity; in get_pd_identity() 69 return cable->identity; in get_pd_identity() 76 struct typec_port *port = to_typec_port(dev->parent); in get_pd_product_type() 84 if (port->data_role == TYPEC_HOST) in get_pd_product_type() 85 ptype = product_type_ufp[PD_IDH_PTYPE(id->id_header)]; in get_pd_product_type() 87 ptype = product_type_dfp[PD_IDH_DFP_PTYPE(id->id_header)]; in get_pd_product_type() 90 ptype = product_type_cable[PD_IDH_PTYPE(id->id_header)]; in get_pd_product_type() [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/usb/ |
D | fcs,fsa4480.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: "http://devicetree.org/meta-schemas/core.yaml#" 7 title: ON Semiconductor Analog Audio Switch 10 - Bjorn Andersson <bjorn.andersson@linaro.org> 15 - fcs,fsa4480 23 vcc-supply: 24 description: power supply (2.7V-5.5V) 26 mode-switch: 30 orientation-switch: [all …]
|
D | richtek,rt1711h.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: "http://devicetree.org/meta-schemas/core.yaml#" 7 title: Richtek RT1711H Type-C Port Switch and Power Delivery controller 10 - Gene Chen <gene_chen@richtek.com> 13 The RT1711H is a USB Type-C controller that complies with the latest 14 USB Type-C and PD standards. It does the USB Type-C detection including attach 15 and orientation. It integrates the physical layer of the USB BMC power 17 support for alternative interfaces of the Type-C specification. 22 - richtek,rt1711h [all …]
|
/Linux-v6.1/drivers/iio/imu/inv_mpu6050/ |
D | inv_mpu_magn.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2019 TDK-InvenSense, Inc. 49 switch (st->chip_type) { in inv_magn_supported() 73 return -ENODEV; in inv_magn_init() 76 switch (st->chip_type) { in inv_magn_init() 101 /* switch back to power-down */ in inv_magn_init() 113 switch (st->chip_type) { in inv_magn_init() 124 return -EINVAL; in inv_magn_init() 130 * Hadj = H * (((ASA - 128) * 0.5 / 128) + 1) in inv_magn_init() 136 st->magn_raw_to_gauss[0] = (((int32_t)asa[0] + 128) * sensitivity) / 256; in inv_magn_init() [all …]
|
/Linux-v6.1/drivers/gpu/drm/i915/display/ |
D | intel_dsi.c | 1 // SPDX-License-Identifier: MIT 14 int bpp = mipi_dsi_pixel_format_to_bpp(intel_dsi->pixel_format); in intel_dsi_bitrate() 19 return intel_dsi->pclk * bpp / intel_dsi->lane_count; in intel_dsi_bitrate() 24 switch (intel_dsi->escape_clk_div) { in intel_dsi_tlpx_ns() 43 struct drm_i915_private *dev_priv = to_i915(connector->dev); in intel_dsi_mode_valid() 47 int max_dotclk = to_i915(connector->dev)->max_dotclk_freq; in intel_dsi_mode_valid() 50 drm_dbg_kms(&dev_priv->drm, "\n"); in intel_dsi_mode_valid() 52 if (mode->flags & DRM_MODE_FLAG_DBLSCAN) in intel_dsi_mode_valid() 59 if (fixed_mode->clock > max_dotclk) in intel_dsi_mode_valid() 76 host->base.ops = funcs; in intel_dsi_host_init() [all …]
|
/Linux-v6.1/drivers/usb/typec/mux/ |
D | intel_pmc_mux.c | 1 // SPDX-License-Identifier: GPL-2.0 128 enum typec_orientation orientation; member 152 /* SoC expects the USB Type-C port numbers to start with 0 */ in update_port_status() 153 port_num = port->usb3_port - 1; in update_port_status() 155 port->iom_status = readl(port->pmc->iom_base + in update_port_status() 156 port->pmc->iom_port_status_offset + in update_port_status() 162 if (port->sbu_orientation) in sbu_orientation() 163 return port->sbu_orientation - 1; in sbu_orientation() 165 return port->orientation - 1; in sbu_orientation() 170 if (port->hsl_orientation) in hsl_orientation() [all …]
|
D | pi3usb30532.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Pericom PI3USB30532 Type-C cross switch / mux driver 5 * Copyright (c) 2017-2018 Hans de Goede <hdegoede@redhat.com> 35 if (pi->conf == new_conf) in pi3usb30532_set_conf() 38 ret = i2c_smbus_write_byte_data(pi->client, PI3USB30532_CONF, new_conf); in pi3usb30532_set_conf() 40 dev_err(&pi->client->dev, "Error writing conf: %d\n", ret); in pi3usb30532_set_conf() 44 pi->conf = new_conf; in pi3usb30532_set_conf() 49 enum typec_orientation orientation) in pi3usb30532_sw_set() argument 55 mutex_lock(&pi->lock); in pi3usb30532_sw_set() 56 new_conf = pi->conf; in pi3usb30532_sw_set() [all …]
|
D | fsa4480.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2021-2022 Linaro Ltd. 4 * Copyright (C) 2018-2020 The Linux Foundation 57 /* Accesses only done under fsa4480->lock */ 62 enum typec_orientation orientation) in fsa4480_switch_set() argument 67 mutex_lock(&fsa->lock); in fsa4480_switch_set() 69 if (orientation == TYPEC_ORIENTATION_REVERSE) in fsa4480_switch_set() 72 if (new_sel == fsa->cur_select) in fsa4480_switch_set() 75 if (fsa->cur_enable & FSA4480_ENABLE_SBU) { in fsa4480_switch_set() 76 /* Disable SBU output while re-configuring the switch */ in fsa4480_switch_set() [all …]
|
/Linux-v6.1/drivers/gpu/drm/ |
D | drm_panel_orientation_quirks.c | 1 /* SPDX-License-Identifier: MIT */ 3 * drm_panel_orientation_quirks.c -- Quirks for non-normal panel orientation 30 int orientation; member 36 .orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP, 44 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 52 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 60 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 69 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 77 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 84 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, [all …]
|
/Linux-v6.1/drivers/gpu/drm/msm/dp/ |
D | dp_hpd.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. 21 * struct dp_usbpd - DisplayPort status 23 * @orientation: plug orientation configuration 26 * @multi_func: multi-function preferred 27 * @usb_config_req: request to switch to usb 35 enum plug_orientation orientation; member 49 * struct dp_usbpd_cb - callback functions provided by the client 64 * dp_hpd_get() - setup hpd module
|
/Linux-v6.1/drivers/staging/fbtft/ |
D | fb_uc1701.c | 1 // SPDX-License-Identifier: GPL-2.0+ 33 /* 8: select orientation */ 37 /* 10: show memory content or switch all pixels on */ 43 /* 15: output mode select (turns display upside-down) */ 58 /* column offset for normal orientation */ 60 /* column offset for bottom view orientation */ 65 par->fbtftops.reset(par); in init_display() 74 /* select orientation BOTTOMVIEW */ in init_display() 77 /* output mode select (turns display upside-down) */ in init_display() 120 u16 *vmem16 = (u16 *)par->info->screen_buffer; in write_vmem() [all …]
|
/Linux-v6.1/drivers/media/pci/intel/ipu3/ |
D | cio2-bridge.c | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <media/v4l2-fwnode.h> 11 #include "cio2-bridge.h" 15 * plus the number of link-frequencies expected by their drivers, along with 35 .clock_frequency = "clock-frequency", 37 .orientation = "orientation", 38 .bus_type = "bus-type", 39 .data_lanes = "data-lanes", 40 .remote_endpoint = "remote-endpoint", 41 .link_frequencies = "link-frequencies", [all …]
|
/Linux-v6.1/Documentation/driver-api/usb/ |
D | typec.rst | 3 USB Type-C connector class 7 ------------ 9 The typec class is meant for describing the USB Type-C ports in a system to the 14 The platforms are expected to register every USB Type-C port they have with the 15 class. In a normal case the registration will be done by a USB Type-C or PD PHY 18 considers the component registering the USB Type-C ports with the class as "port 26 attributes are described in Documentation/ABI/testing/sysfs-class-typec. 29 -------------------- 36 "port0-partner". Full path to the device would be 37 /sys/class/typec/port0/port0-partner/. [all …]
|
/Linux-v6.1/include/linux/input/ |
D | adxl34x.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 152 * result in the function appearing un-responsive if the 162 * holds the threshold value for Free-Fall detection. 163 * The data format is unsigned. The root-sum-square(RSS) value 167 * result in undesirable behavior if Free-Fall interrupt is 178 * free_fall_threshold to generate a Free-Fall interrupt. The 180 * undesirable behavior if Free-Fall interrupt is enabled. 189 * RATE = 3200 Hz / (2^(15 - x)). Default value is 0x0A, or 100 Hz 201 * in Full-Resolution Mode, where the output resolution increases 203 * bit is cleared the device is in 10-bit Mode and RANGE determine the [all …]
|
/Linux-v6.1/drivers/iio/accel/ |
D | mxc6255.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * MXC6255 - MEMSIC orientation sensing accelerometer 7 * IIO driver for MXC6255 (7-bit I2C slave address 0x15). 29 * MXC6255 has only one measurement range: +/- 2G. 30 * The acceleration output is an 8-bit value. 33 * (2 + 2) * 9.80665 / (2^8 - 1) = 0.153829 35 * Scale value for +/- 2G measurement range 57 switch (mask) { in mxc6255_read_raw() 59 ret = regmap_read(data->regmap, chan->address, ®); in mxc6255_read_raw() 61 dev_err(&data->client->dev, in mxc6255_read_raw() [all …]
|
D | bmc150-accel-core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * 3-axis accelerometer driver supporting many Bosch-Sensortec chips 26 #include "bmc150-accel.h" 212 struct device *dev = regmap_get_device(data->regmap); in bmc150_accel_set_mode() 216 int dur_val = -1; in bmc150_accel_set_mode() 231 return -EINVAL; in bmc150_accel_set_mode() 238 ret = regmap_write(data->regmap, BMC150_ACCEL_REG_PMU_LPW, lpw_bits); in bmc150_accel_set_mode() 256 ret = regmap_write(data->regmap, in bmc150_accel_set_bw() 262 data->bw_bits = in bmc150_accel_set_bw() 268 return -EINVAL; in bmc150_accel_set_bw() [all …]
|
D | kxsd9.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Copyright (c) 2008-2009 Jonathan Cameron <jic23@kernel.org> 60 #define KXSD9_CTRL_B_ST BIT(5) /* Self-test */ 65 * struct kxsd9_state - device related storage 68 * @orientation: mounting matrix, flipped axis etc 75 struct iio_mount_matrix orientation; member 88 #define KXSD9_ZERO_G_OFFSET -2048 108 return -EINVAL; in kxsd9_write_scale() 110 ret = regmap_update_bits(st->map, in kxsd9_write_scale() 118 st->scale = i; in kxsd9_write_scale() [all …]
|
/Linux-v6.1/Documentation/userspace-api/media/v4l/ |
D | ext-ctrls-camera.rst | 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 3 .. _camera-controls: 13 .. _camera-control-id: 23 .. _v4l2-exposure-auto-type: 28 enum v4l2_exposure_auto_type - 37 .. flat-table:: 38 :header-rows: 0 39 :stub-columns: 0 41 * - ``V4L2_EXPOSURE_AUTO`` 42 - Automatic exposure time, automatic iris aperture. [all …]
|
D | vidioc-enuminput.rst | 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 13 VIDIOC_ENUMINPUT - Enumerate video inputs 45 .. flat-table:: struct v4l2_input 46 :header-rows: 0 47 :stub-columns: 0 50 * - __u32 51 - ``index`` 52 - Identifies the input, set by the application. 53 * - __u8 54 - ``name``\ [32] [all …]
|
/Linux-v6.1/drivers/input/mouse/ |
D | bcm5974.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * Scott Shawcroft as part of the touchd user-space driver project: 13 * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com) 16 * Copyright (C) 2005 Frank Arnold (frank@scirocco-5v-turbo.de) 18 * Copyright (C) 2005 Michael Hanselmann (linux-kernel@hansmi.ch) 182 /* trackpad finger data offsets, le16-aligned */ 209 /* usb control message mode switch data */ 219 /* trackpad finger structure, le16-aligned */ 228 __le16 orientation; /* 16384 when point, else 15 bit angle */ member 240 /* device-specific parameters */ [all …]
|
/Linux-v6.1/drivers/media/rc/img-ir/ |
D | img-ir-hw.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 5 * Copyright 2010-2014 Imagination Technologies Ltd. 12 #include <media/rc-core.h> 18 #define IMG_IR_CODETYPE_BIPHASE 0x2 /* RC-5/6 */ 19 #define IMG_IR_CODETYPE_2BITPULSEPOS 0x3 /* RC-MM */ 25 * struct img_ir_control - Decoder control settings 31 * @bitorien: Bit orientation (1=MSB first) 33 * @bitinv: Bit inversion switch (1=don't invert) 35 * @bitoriend2: Bit orientation (1=MSB first) 36 * @bitinvd2: Secondary decoder bit inversion switch (1=don't invert) [all …]
|
/Linux-v6.1/drivers/iio/orientation/ |
D | hid-sensor-rotation.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 #include <linux/hid-sensor-hub.h> 15 #include "../common/hid-sensors/hid-sensor-trigger.h" 57 chan->scan_type.sign = 's'; in dev_rot_adjust_channel_bit_mask() 59 chan->scan_type.realbits = size * 8; in dev_rot_adjust_channel_bit_mask() 61 chan->scan_type.storagebits = sizeof(u32) * 8; in dev_rot_adjust_channel_bit_mask() 62 chan->scan_type.repeat = 4; in dev_rot_adjust_channel_bit_mask() 78 switch (mask) { in dev_rot_read_raw() 82 vals[i] = rot_state->scan.sampled_vals[i]; in dev_rot_read_raw() 86 ret_type = -EINVAL; in dev_rot_read_raw() [all …]
|
/Linux-v6.1/drivers/pinctrl/ |
D | pinctrl-amd.c | 1 // SPDX-License-Identifier: GPL-2.0-only 31 #include <linux/pinctrl/pinconf-generic.h> 35 #include "pinctrl-utils.h" 36 #include "pinctrl-amd.h" 44 raw_spin_lock_irqsave(&gpio_dev->lock, flags); in amd_gpio_get_direction() 45 pin_reg = readl(gpio_dev->base + offset * 4); in amd_gpio_get_direction() 46 raw_spin_unlock_irqrestore(&gpio_dev->lock, flags); in amd_gpio_get_direction() 60 raw_spin_lock_irqsave(&gpio_dev->lock, flags); in amd_gpio_direction_input() 61 pin_reg = readl(gpio_dev->base + offset * 4); in amd_gpio_direction_input() 63 writel(pin_reg, gpio_dev->base + offset * 4); in amd_gpio_direction_input() [all …]
|