/openbmc/linux/Documentation/devicetree/bindings/usb/ |
H A D | gpio-sbu-mux.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: GPIO-based SBU mux 10 - Bjorn Andersson <andersson@kernel.org> 13 In USB Type-C applications the SBU lines needs to be connected, disconnected 14 and swapped depending on the altmode and orientation. This binding describes 21 - enum: 22 - onnn,fsusb43l10x [all …]
|
H A 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 …]
|
H A D | onnn,nb7vpq904m.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 Type-C DisplayPort ALT Mode Linear Redriver 10 - Neil Armstrong <neil.armstrong@linaro.org> 15 - onnn,nb7vpq904m 20 vcc-supply: 23 enable-gpios: true 25 retimer-switch: 29 orientation-switch: [all …]
|
/openbmc/linux/drivers/usb/typec/ |
H A 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 …]
|
/openbmc/linux/drivers/usb/typec/mux/ |
H A D | nb7vpq904m.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * OnSemi NB7VPQ904M Type-C driver 75 struct mutex lock; /* protect non-concurrent retimer & switch */ 77 enum typec_orientation orientation; member 98 regmap_update_bits(nb7->regmap, EQ_SETTING_REG(channel), in nb7vpq904m_set_channel() 100 regmap_update_bits(nb7->regmap, OUTPUT_COMPRESSION_AND_POL_REG(channel), in nb7vpq904m_set_channel() 102 regmap_update_bits(nb7->regmap, FLAT_GAIN_REG(channel), in nb7vpq904m_set_channel() 104 regmap_update_bits(nb7->regmap, LOSS_MATCH_REG(channel), in nb7vpq904m_set_channel() 110 bool reverse = (nb7->orientation == TYPEC_ORIENTATION_REVERSE); in nb7vpq904m_set() 112 switch (nb7->mode) { in nb7vpq904m_set() [all …]
|
H A 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 58 enum typec_orientation orientation; member 69 /* Accesses only done under fsa4480->lock */ 75 bool reverse = (fsa->orientation == TYPEC_ORIENTATION_REVERSE); in fsa4480_set() 80 if (fsa->mode < TYPEC_STATE_MODAL || in fsa4480_set() 81 (!fsa->svid && (fsa->mode == TYPEC_MODE_USB2 || in fsa4480_set() 82 fsa->mode == TYPEC_MODE_USB3))) { in fsa4480_set() 85 } else if (fsa->svid) { in fsa4480_set() [all …]
|
H A D | intel_pmc_mux.c | 1 // SPDX-License-Identifier: GPL-2.0 141 enum typec_orientation orientation; member 170 /* SoC expects the USB Type-C port numbers to start with 0 */ in update_port_status() 171 port_num = port->usb3_port - 1; in update_port_status() 173 port->iom_status = readl(port->pmc->iom_base + in update_port_status() 174 port->pmc->iom_port_status_offset + in update_port_status() 175 port_num * port->pmc->iom_port_status_size); in update_port_status() 180 if (port->sbu_orientation) in sbu_orientation() 181 return port->sbu_orientation - 1; in sbu_orientation() 183 return port->orientation - 1; in sbu_orientation() [all …]
|
H A D | gpio-sbu-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 27 enum typec_orientation orientation) in gpio_sbu_switch_set() argument 33 mutex_lock(&sbu_mux->lock); in gpio_sbu_switch_set() 35 enabled = sbu_mux->enabled; in gpio_sbu_switch_set() 36 swapped = sbu_mux->swapped; in gpio_sbu_switch_set() 38 switch (orientation) { in gpio_sbu_switch_set() 50 if (enabled != sbu_mux->enabled) in gpio_sbu_switch_set() 51 gpiod_set_value(sbu_mux->enable_gpio, enabled); in gpio_sbu_switch_set() 53 if (swapped != sbu_mux->swapped) in gpio_sbu_switch_set() 54 gpiod_set_value(sbu_mux->select_gpio, swapped); in gpio_sbu_switch_set() [all …]
|
H A 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 …]
|
/openbmc/linux/drivers/iio/imu/inv_mpu6050/ |
H A 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 …]
|
/openbmc/linux/drivers/soc/qcom/ |
H A D | pmic_glink_altmode.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. 81 enum typec_orientation orientation; member 117 mutex_lock(&altmode->lock); in pmic_glink_altmode_request() 119 req.hdr.owner = cpu_to_le32(altmode->owner_id); in pmic_glink_altmode_request() 125 ret = pmic_glink_send(altmode->client, &req, sizeof(req)); in pmic_glink_altmode_request() 127 dev_err(altmode->dev, "failed to send altmode request: %#x (%d)\n", cmd, ret); in pmic_glink_altmode_request() 131 left = wait_for_completion_timeout(&altmode->pan_ack, 5 * HZ); in pmic_glink_altmode_request() 133 dev_err(altmode->dev, "timeout waiting for altmode request ack for: %#x\n", cmd); in pmic_glink_altmode_request() 134 ret = -ETIMEDOUT; in pmic_glink_altmode_request() [all …]
|
/openbmc/linux/drivers/gpu/drm/i915/display/ |
H A D | intel_dsi.c | 1 // SPDX-License-Identifier: MIT 19 intel_dsi->panel_power_off_time); in intel_dsi_wait_panel_power_cycle() 21 if (panel_power_off_duration < (s64)intel_dsi->panel_pwr_cycle_delay) in intel_dsi_wait_panel_power_cycle() 22 msleep(intel_dsi->panel_pwr_cycle_delay - panel_power_off_duration); in intel_dsi_wait_panel_power_cycle() 34 int bpp = mipi_dsi_pixel_format_to_bpp(intel_dsi->pixel_format); in intel_dsi_bitrate() 39 return intel_dsi->pclk * bpp / intel_dsi->lane_count; in intel_dsi_bitrate() 44 switch (intel_dsi->escape_clk_div) { in intel_dsi_tlpx_ns() 63 struct drm_i915_private *dev_priv = to_i915(connector->dev); in intel_dsi_mode_valid() 67 int max_dotclk = to_i915(connector->dev)->max_dotclk_freq; in intel_dsi_mode_valid() 70 drm_dbg_kms(&dev_priv->drm, "\n"); in intel_dsi_mode_valid() [all …]
|
/openbmc/linux/drivers/usb/typec/ucsi/ |
H A D | ucsi_glink.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. 91 mutex_lock(&ucsi->lock); in pmic_glink_ucsi_read() 92 memset(ucsi->read_buf, 0, sizeof(ucsi->read_buf)); in pmic_glink_ucsi_read() 93 reinit_completion(&ucsi->read_ack); in pmic_glink_ucsi_read() 95 ret = pmic_glink_send(ucsi->client, &req, sizeof(req)); in pmic_glink_ucsi_read() 97 dev_err(ucsi->dev, "failed to send UCSI read request: %d\n", ret); in pmic_glink_ucsi_read() 101 left = wait_for_completion_timeout(&ucsi->read_ack, 5 * HZ); in pmic_glink_ucsi_read() 103 dev_err(ucsi->dev, "timeout waiting for UCSI read response\n"); in pmic_glink_ucsi_read() 104 ret = -ETIMEDOUT; in pmic_glink_ucsi_read() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/phy/ |
H A D | qcom,sc8280xp-qmp-usb43dp-phy.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Qualcomm QMP USB4-USB3-DP PHY controller (SC8280XP) 10 - Vinod Koul <vkoul@kernel.org> 19 - qcom,sc7180-qmp-usb3-dp-phy 20 - qcom,sc7280-qmp-usb3-dp-phy 21 - qcom,sc8180x-qmp-usb3-dp-phy 22 - qcom,sc8280xp-qmp-usb43dp-phy [all …]
|
/openbmc/linux/drivers/gpu/drm/ |
H A 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 38 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 46 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 54 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 62 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 71 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 79 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, 86 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, [all …]
|
/openbmc/linux/drivers/usb/typec/tcpm/qcom/ |
H A D | qcom_pmic_typec_port.c | 1 // SPDX-License-Identifier: GPL-2.0 48 [TYPEC_CC_RP_DEF] = "Rp-def", 49 [TYPEC_CC_RP_1_5] = "Rp-1.5", 50 [TYPEC_CC_RP_3_0] = "Rp-3.0", 64 [TYPEC_SRC_RP_SEL_80UA] = "Rp-def-80uA", 65 [TYPEC_SRC_RP_SEL_180UA] = "Rp-1.5-180uA", 66 [TYPEC_SRC_RP_SEL_330UA] = "Rp-3.0-330uA", 86 spin_lock_irqsave(&pmic_typec_port->lock, flags); in qcom_pmic_typec_port_cc_debounce() 87 pmic_typec_port->debouncing_cc = false; in qcom_pmic_typec_port_cc_debounce() 88 spin_unlock_irqrestore(&pmic_typec_port->lock, flags); in qcom_pmic_typec_port_cc_debounce() [all …]
|
/openbmc/linux/drivers/staging/fbtft/ |
H A 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 …]
|
/openbmc/linux/Documentation/driver-api/usb/ |
H A 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 …]
|
/openbmc/linux/drivers/media/pci/intel/ |
H A D | ipu-bridge.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #include <media/ipu-bridge.h> 15 #include <media/v4l2-fwnode.h> 17 #define ADEV_DEV(adev) ACPI_PTR(&((adev)->dev)) 20 * 92335fcf-3203-4472-af93-7b4453ac29da 38 * plus the number of link-frequencies expected by their drivers, along with 68 .clock_frequency = "clock-frequency", 70 .orientation = "orientation", 71 .bus_type = "bus-type", 72 .data_lanes = "data-lanes", [all …]
|
/openbmc/linux/include/linux/input/ |
H A 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 …]
|
/openbmc/linux/drivers/iio/accel/ |
H A 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 …]
|
H A 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 …]
|
/openbmc/linux/arch/arm64/boot/dts/qcom/ |
H A D | sc8180x-lenovo-flex-5g.dts | 1 // SPDX-License-Identifier: BSD-3-Clause 3 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2020-2023, Linaro Limited 7 /dts-v1/; 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/gpio-keys.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/regulator/qcom,rpmh-regulator.h> 14 #include "sc8180x-pmics.dtsi" 18 compatible = "lenovo,flex-5g", "qcom,sc8180x"; [all …]
|
H A D | sc8180x-primus.dts | 1 // SPDX-License-Identifier: BSD-3-Clause 3 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2020-2023, Linaro Limited 7 /dts-v1/; 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/gpio-keys.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/regulator/qcom,rpmh-regulator.h> 14 #include "sc8180x-pmics.dtsi" 18 compatible = "qcom,sc8180x-primus", "qcom,sc8180x"; [all …]
|
/openbmc/linux/Documentation/userspace-api/media/v4l/ |
H A 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 …]
|