Home
last modified time | relevance | path

Searched +full:orientation +full:- +full:switch (Results 1 – 25 of 119) sorted by relevance

12345

/linux/drivers/usb/typec/mux/
H A Dptn36502.c1 // SPDX-License-Identifier: GPL-2.0+
3 * NXP PTN36502 Type-C driver
11 #include <drm/bridge/aux-bridge.h>
72 struct mutex lock; /* protect non-concurrent retimer & switch */
74 enum typec_orientation orientation; member
81 bool reverse = (ptn->orientation == TYPEC_ORIENTATION_REVERSE); in ptn36502_set()
86 switch (ptn->mode) { in ptn36502_set()
89 regmap_write(ptn->regmap, PTN36502_MODE_CTRL1_REG, in ptn36502_set()
96 * Normal Orientation (CC1) in ptn36502_set()
97 * A -> USB RX in ptn36502_set()
[all …]
H A Dnb7vpq904m.c1 // SPDX-License-Identifier: GPL-2.0+
3 * OnSemi NB7VPQ904M Type-C driver
14 #include <drm/bridge/aux-bridge.h>
74 struct mutex lock; /* protect non-concurrent retimer & switch */
76 enum typec_orientation orientation; member
97 regmap_update_bits(nb7->regmap, EQ_SETTING_REG(channel), in nb7vpq904m_set_channel()
99 regmap_update_bits(nb7->regmap, OUTPUT_COMPRESSION_AND_POL_REG(channel), in nb7vpq904m_set_channel()
101 regmap_update_bits(nb7->regmap, FLAT_GAIN_REG(channel), in nb7vpq904m_set_channel()
103 regmap_update_bits(nb7->regmap, LOSS_MATCH_REG(channel), in nb7vpq904m_set_channel()
109 bool reverse = (nb7->orientation == TYPEC_ORIENTATION_REVERSE); in nb7vpq904m_set()
[all …]
H A Dfsa4480.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2021-2022 Linaro Ltd.
4 * Copyright (C) 2018-2020 The Linux Foundation
62 enum typec_orientation orientation; member
74 /* Accesses only done under fsa4480->lock */
80 bool reverse = (fsa->orientation == TYPEC_ORIENTATION_REVERSE); in fsa4480_set()
84 if (fsa->swap_sbu_lanes) in fsa4480_set()
88 if (fsa->mode < TYPEC_STATE_MODAL || in fsa4480_set()
89 (!fsa->svid && (fsa->mode == TYPEC_MODE_USB2 || in fsa4480_set()
90 fsa->mode == TYPEC_MODE_USB3))) { in fsa4480_set()
[all …]
H A Dwcd939x-usbss.c1 // SPDX-License-Identifier: GPL-2.0-only
72 #define WCD_USBSS_SWITCH_SELECT0_DP_AUXP_SWITCHES BIT(7) /* 1-> MG2 */
73 #define WCD_USBSS_SWITCH_SELECT0_DP_AUXM_SWITCHES BIT(6) /* 1-> MG2 */
76 #define WCD_USBSS_SWITCH_SELECT0_SENSE_SWITCHES BIT(1) /* 1-> SBU2 */
77 #define WCD_USBSS_SWITCH_SELECT0_MIC_SWITCHES BIT(0) /* 1-> MG2 */
89 #define WCD_USBSS_SWITCH_SELECT1_AGND_SWITCHES BIT(0) /* 1-> MG2 */
197 enum typec_orientation orientation; member
242 bool reverse = (usbss->orientation == TYPEC_ORIENTATION_REVERSE); in wcd939x_usbss_set()
249 if (usbss->mode < TYPEC_STATE_MODAL || in wcd939x_usbss_set()
250 (!usbss->svid && (usbss->mode == TYPEC_MODE_USB2 || in wcd939x_usbss_set()
[all …]
H A Dpi3usb30532.c1 // 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 …]
H A Dit5205.c1 // SPDX-License-Identifier: GPL-2.0
3 * ITE IT5205 Type-C USB alternate mode passive mux
25 #define IT5205FN_CHIP_ID 0x35303235 /* "5025" -> "5205" */
53 /* CSBU Switch Register */
57 /* Interrupt Switch Register */
69 static int it5205_switch_set(struct typec_switch_dev *sw, enum typec_orientation orientation) in it5205_switch_set() argument
73 switch (orientation) { in it5205_switch_set()
75 regmap_update_bits(it->regmap, IT5205_REG_MUXCR, in it5205_switch_set()
79 regmap_update_bits(it->regmap, IT5205_REG_MUXCR, in it5205_switch_set()
85 regmap_write(it->regmap, IT5205_REG_MUXCR, 0); in it5205_switch_set()
[all …]
/linux/drivers/usb/typec/
H A Dmux.c1 // 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 …]
/linux/Documentation/devicetree/bindings/usb/
H A Dqcom,wcd939x-usbss.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/usb/qcom,wcd939x-usbss.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Qualcomm WCD9380/WCD9385 USB SubSystem Altmode/Analog Audio Switch
10 - Neil Armstrong <neil.armstrong@linaro.org>
13 Qualcomm WCD9390/WCD9395 is a standalone Hi-Fi audio codec IC with a
14 functionally separate USB SubSystem for Altmode/Analog Audio Switch
17 USB-C Mux subsystems are external to the IC, thus requiring DT port-endpoint
18 graph description to handle USB-C altmode & orientation switching for Audio
[all …]
H A Dusb-switch.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/usb/usb-switch.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: USB Orientation and Mode Switches Common Properties
10 - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 Common properties for devices handling USB mode and orientation switching.
16 mode-switch:
20 orientation-switch:
21 description: Possible handler of orientation switching
[all …]
H A Dnxp,ptn36502.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: NXP PTN36502 Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo redriver
10 - Luca Weiss <luca.weiss@fairphone.com>
15 - nxp,ptn36502
20 vdd18-supply:
23 orientation-switch: true
24 retimer-switch: true
31 description: Super Speed (SS) Output endpoint to the Type-C connector
[all …]
H A Donnn,nb7vpq904m.yaml1 # 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 Type-C DisplayPort ALT Mode Linear Redriver
10 - Neil Armstrong <neil.armstrong@linaro.org>
15 - onnn,nb7vpq904m
20 vcc-supply:
23 enable-gpios: true
24 orientation-switch: true
25 retimer-switch: true
[all …]
/linux/drivers/iio/imu/inv_mpu6050/
H A Dinv_mpu_magn.c1 // 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/Documentation/devicetree/bindings/sound/
H A Dqcom,wcd939x.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
13 Qualcomm WCD9390/WCD9395 Codec is a standalone Hi-Fi audio codec IC.
15 The WCD9390/WCD9395 IC has a functionally separate USB-C Mux subsystem
17 The Audio Headphone and Microphone data path between the Codec and the USB-C Mux
18 subsystems are external to the IC, thus requiring DT port-endpoint graph description
19 to handle USB-C altmode & orientation switching for Audio Accessory Mode.
22 - $ref: dai-common.yaml#
[all …]
/linux/arch/arm64/boot/dts/qcom/
H A Dqcs8550-aim300-aiot.dts1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
6 /dts-v1/;
8 #include <dt-bindings/leds/common.h>
9 #include "qcs8550-aim300.dtsi"
16 compatible = "qcom,qcs8550-aim300-aiot", "qcom,qcs8550-aim300", "qcom,qcs8550",
24 stdout-path = "serial0:115200n8";
27 gpio-keys {
28 compatible = "gpio-keys";
30 pinctrl-0 = <&volume_up_n>;
[all …]
/linux/drivers/staging/fbtft/
H A Dfb_uc1701.c1 // 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/drivers/phy/samsung/
H A Dphy-exynos5-usbdrd.c1 // SPDX-License-Identifier: GPL-2.0-only
25 #include <linux/soc/samsung/exynos-regs-pmu.h>
196 /* Exynos9 - GS101 */
330 for (; (tune)->region != PTR_INVALID; ++(tune))
384 * struct exynos5_usbdrd_phy - driver data for USB 3.0 PHY
398 * @sw: TypeC orientation switch handle
399 * @orientation: TypeC connector orientation - normal or flipped
421 enum typec_orientation orientation; member
428 phys[(inst)->index]); in to_usbdrd_phy()
439 switch (rate) { in exynos5_rate_to_clk()
[all …]
/linux/Documentation/driver-api/usb/
H A Dtypec.rst3 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/drivers/media/pci/intel/
H A Dipu-bridge.c1 // SPDX-License-Identifier: GPL-2.0
16 #include <media/ipu-bridge.h>
17 #include <media/v4l2-fwnode.h>
19 #define ADEV_DEV(adev) ACPI_PTR(&((adev)->dev))
22 * 92335fcf-3203-4472-af93-7b4453ac29da
40 * plus the number of link-frequencies expected by their drivers, along with
67 /* Hynix Hi-556 */
90 .clock_frequency = "clock-frequency",
92 .orientation = "orientation",
93 .bus_type = "bus-type",
[all …]
/linux/include/linux/input/
H A Dadxl34x.h1 /* 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/drivers/usb/typec/ucsi/
H A Ducsi_glink.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
90 mutex_lock(&ucsi->lock); in pmic_glink_ucsi_read()
91 memset(ucsi->read_buf, 0, sizeof(ucsi->read_buf)); in pmic_glink_ucsi_read()
92 reinit_completion(&ucsi->read_ack); in pmic_glink_ucsi_read()
94 ret = pmic_glink_send(ucsi->client, &req, sizeof(req)); in pmic_glink_ucsi_read()
96 dev_err(ucsi->dev, "failed to send UCSI read request: %d\n", ret); in pmic_glink_ucsi_read()
100 left = wait_for_completion_timeout(&ucsi->read_ack, 5 * HZ); in pmic_glink_ucsi_read()
102 dev_err(ucsi->dev, "timeout waiting for UCSI read response\n"); in pmic_glink_ucsi_read()
103 ret = -ETIMEDOUT; in pmic_glink_ucsi_read()
[all …]
/linux/drivers/iio/accel/
H A Dmxc6255.c1 // 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, &reg); in mxc6255_read_raw()
61 dev_err(&data->client->dev, in mxc6255_read_raw()
[all …]
H A Dmma7660.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Freescale MMA7660FC 3-Axis Accelerometer
7 * IIO driver for Freescale MMA7660FC; 7-bit I2C address: 0x4c.
32 * -1.5g - +1.5g (6-bit, signed)
34 * scale = (1.5 + 1.5) * 9.81 / (2^6 - 1) = 0.467142857
50 struct iio_mount_matrix orientation; member
59 return &data->orientation; in mma7660_get_mount_matrix()
98 struct i2c_client *client = data->client; in mma7660_set_mode()
100 if (mode == data->mode) in mma7660_set_mode()
105 dev_err(&client->dev, "failed to read sensor mode\n"); in mma7660_set_mode()
[all …]
H A Dbmc150-accel-core.c1 // 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 …]
H A Dkxsd9.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (c) 2008-2009 Jonathan Cameron <jic23@kernel.org>
61 #define KXSD9_CTRL_B_ST BIT(5) /* Self-test */
66 * struct kxsd9_state - device related storage
69 * @orientation: mounting matrix, flipped axis etc
76 struct iio_mount_matrix orientation; member
89 #define KXSD9_ZERO_G_OFFSET -2048
109 return -EINVAL; in kxsd9_write_scale()
111 ret = regmap_update_bits(st->map, in kxsd9_write_scale()
119 st->scale = i; in kxsd9_write_scale()
[all …]
/linux/Documentation/userspace-api/media/v4l/
H A Dext-ctrls-camera.rst1 .. 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 …]

12345