/linux/drivers/regulator/ |
H A D | vctrl-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Driver for voltage controller regulators 27 struct vctrl_voltage_range ctrl; member 32 int ctrl; member 50 struct vctrl_voltage_range *ctrl = &vctrl->vrange.ctrl; in vctrl_calc_ctrl_voltage() local 51 struct vctrl_voltage_range *out = &vctrl->vrange.out; in vctrl_calc_ctrl_voltage() 53 return ctrl->min_uV + in vctrl_calc_ctrl_voltage() 54 DIV_ROUND_CLOSEST_ULL((s64)(out_uV - out->min_uV) * in vctrl_calc_ctrl_voltage() 55 (ctrl->max_uV - ctrl->min_uV), in vctrl_calc_ctrl_voltage() 56 out->max_uV - out->min_uV); in vctrl_calc_ctrl_voltage() [all …]
|
H A D | qcom_spmi-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. 8 #include <linux/devm-helpers.h> 47 /* Soft start strength of a voltage switch type regulator */ 57 * struct spmi_regulator_init_data - spmi-regulator initialization data 76 * voltage switch type regulators. Its value 328 /* Minimum voltage stepper delay for each step. */ 350 /* Minimum voltage stepper delay for each step. */ 361 /* VSET value to decide the range of ULT SMPS */ 365 * struct spmi_voltage_range - regulator set point voltage mapping description [all …]
|
H A D | bd718x7-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // bd71837-regulator.c ROHM BD71837MWV/BD71847MWV regulator driver 10 #include <linux/mfd/rohm-bd718x7.h> 51 * controlled by software - or by PMIC internal HW state machine. Whether 52 * regulator should be under SW or HW control can be defined from device-tree. 103 * Note for next hacker - these PMICs have a register where the HW state can be 104 * read. If assuming RUN appears to be false in your use-case - you can 123 ret = regmap_read(rdev->regmap, rdev->desc->enable_reg, &val); in bd71837_get_buck34_enable_hwctrl() 138 * guarantee minimum of 1ms sleep - it shouldn't matter if we in voltage_change_done() 143 ret = regmap_clear_bits(rdev->regmap, BD718XX_REG_MVRFLTMASK2, in voltage_change_done() [all …]
|
H A D | bd9576-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include <linux/mfd/rohm-bd957x.h> 11 #include <linux/mfd/rohm-generic.h> 137 const struct regulator_desc *desc = rdev->desc; in bd957x_vout34_list_voltage() 138 int multiplier = selector & desc->vsel_mask & 0x7f; in bd957x_vout34_list_voltage() 145 return desc->fixed_uV - tune; in bd957x_vout34_list_voltage() 147 return desc->fixed_uV + tune; in bd957x_vout34_list_voltage() 153 const struct regulator_desc *desc = rdev->desc; in bd957x_list_voltage() 154 int index = selector & desc->vsel_mask & 0x7f; in bd957x_list_voltage() 157 index += desc->n_voltages/2; in bd957x_list_voltage() [all …]
|
/linux/arch/arm64/boot/dts/rockchip/ |
H A D | rk3399-gru.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 5 * Copyright 2016-2017 Google, Inc 8 #include <dt-bindings/input/input.h> 9 #include "rk3399-op1.dtsi" 18 stdout-path = "serial2:115200n8"; 27 * - Rails that only connect to the EC (or devices that the EC talks to) 29 * - Rails _are_ included if the rails go to the AP even if the AP 38 * - The EC controls the enable and the EC always enables a rail as 40 * - The rails are actually connected to each other by a jumper and 45 ppvar_sys: regulator-ppvar-sys { [all …]
|
H A D | rk3399-gru-scarlet.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * Google Gru-scarlet board device tree source 8 #include "rk3399-gru.dtsi" 11 chassis-type = "tablet"; 16 pp1250_s3: regulator-pp1250-s3 { 17 compatible = "regulator-fixed"; 18 regulator-name = "pp1250_s3"; 21 regulator-always-on; 22 regulator-boot-on; 23 regulator-min-microvolt = <1250000>; [all …]
|
H A D | rk3566-powkiddy-rk2023.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 /dts-v1/; 5 #include <dt-bindings/gpio/gpio.h> 6 #include <dt-bindings/input/linux-event-codes.h> 7 #include <dt-bindings/leds/common.h> 8 #include <dt-bindings/pinctrl/rockchip.h> 9 #include <dt-bindings/soc/rockchip,vop2.h> 13 chassis-type = "handset"; 21 adc-joystick { 22 compatible = "adc-joystick"; [all …]
|
H A D | rk3399-gru-chromebook.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * Google Gru-Chromebook shared properties 8 #include "rk3399-gru.dtsi" 11 pp900_ap: regulator-pp900-ap { 12 compatible = "regulator-fixed"; 13 regulator-name = "pp900_ap"; 16 regulator-always-on; 17 regulator-boot-on; 18 regulator-min-microvolt = <900000>; 19 regulator-max-microvolt = <900000>; [all …]
|
H A D | rk3588s-gameforce-ace.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 /dts-v1/; 5 #include <dt-bindings/gpio/gpio.h> 6 #include <dt-bindings/input/linux-event-codes.h> 7 #include <dt-bindings/leds/common.h> 8 #include <dt-bindings/pinctrl/rockchip.h> 9 #include <dt-bindings/pwm/pwm.h> 10 #include <dt-bindings/thermal/thermal.h> 11 #include <dt-bindings/usb/pd.h> 16 chassis-type = "handset"; [all …]
|
/linux/drivers/soc/rockchip/ |
H A D | io-domain.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Rockchip IO Voltage Domain driver 21 * The max voltage for 1.8V and 3.3V come from the Rockchip datasheet under 26 * - If the voltage on a rail is above the "1.8" voltage (1.98V) we'll tell the 28 * - If the voltage on a rail is above the "3.3" voltage (3.6V) we'll consider 88 struct rockchip_iodomain *iod = supply->iod; in rk3568_iodomain_write() 93 switch (supply->idx) { in rk3568_iodomain_write() 97 b = supply->idx; in rk3568_iodomain_write() 99 b = supply->idx + 4; in rk3568_iodomain_write() 102 regmap_write(iod->grf, RK3568_PMU_GRF_IO_VSEL2, val0); in rk3568_iodomain_write() [all …]
|
/linux/drivers/comedi/drivers/ |
H A D | cb_pcidda.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 * Driver for the ComputerBoards / MeasurementComputing PCI-DDA series. 9 * COMEDI - Linux Control and Measurement Device Interface 10 * Copyright (C) 1997-8 David A. Schleef <ds@schleef.org> 15 * Description: MeasurementComputing PCI-DDA series 16 * Devices: [Measurement Computing] PCI-DDA08/12 (pci-dda08/12), 17 * PCI-DDA04/12 (pci-dda04/12), PCI-DDA02/12 (pci-dda02/12), 18 * PCI-DDA08/16 (pci-dda08/16), PCI-DDA04/16 (pci-dda04/16), 19 * PCI-DDA02/16 (pci-dda02/16) 46 #define CB_DDA_DA_CTRL_RANGE2V5 (0 << 6) /* 2.5V range */ [all …]
|
H A D | me4000.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 * Source code for the Meilhaus ME-4000 board family. 6 * COMEDI - Linux Control and Measurement Device Interface 12 * Description: Meilhaus ME-4000 series boards 13 * Devices: [Meilhaus] ME-4650 (me4000), ME-4670i, ME-4680, ME-4680i, 14 * ME-4680is 16 * Updated: Mon, 18 Mar 2002 15:34:01 -0800 20 * - Analog Input 21 * - Analog Output 22 * - Digital I/O [all …]
|
/linux/Documentation/hwmon/ |
H A D | max197.rst | 14 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX197.pdf 20 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX199.pdf 23 ----------- 25 The A/D converters MAX197, and MAX199 are both 8-Channel, Multi-Range, 5V, 26 12-Bit DAS with 8+4 Bus Interface and Fault Protection. 28 The available ranges for the MAX197 are {0,-5V} to 5V, and {0,-10V} to 10V, 29 while they are {0,-2V} to 2V, and {0,-4V} to 4V on the MAX199. 32 ------------- 37 int convert(u8 ctrl); 39 ctrl is the control byte to write to start a new conversion. [all …]
|
/linux/drivers/input/misc/ |
H A D | pmic8xxx-pwrkey.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 45 /* Buck CTRL register */ 71 * struct pmic8xxx_pwrkey - pmic8xxx pwrkey information 107 enable_irq_wake(pwrkey->key_press_irq); in pmic8xxx_pwrkey_suspend() 117 disable_irq_wake(pwrkey->key_press_irq); in pmic8xxx_pwrkey_resume() 132 if (pwrkey->shutdown_fn) { in pmic8xxx_pwrkey_shutdown() 133 error = pwrkey->shutdown_fn(pwrkey, reset); in pmic8xxx_pwrkey_shutdown() 149 regmap_update_bits(pwrkey->regmap, PON_CNTL_1, mask, val); in pmic8xxx_pwrkey_shutdown() 153 * Set an SMPS regulator to be disabled in its CTRL register, but enabled [all …]
|
/linux/arch/arm/boot/dts/arm/ |
H A D | vexpress-v2p-ca15_a7.dts | 1 // SPDX-License-Identifier: GPL-2.0 6 * Cortex-A15_A7 MPCore (V2P-CA15_A7) 8 * HBI-0249A 11 /dts-v1/; 12 #include "vexpress-v2m-rs1.dtsi" 15 model = "V2P-CA15_CA7"; 18 compatible = "arm,vexpress,v2p-ca15_a7", "arm,vexpress"; 19 interrupt-parent = <&gic>; 20 #address-cells = <2>; 21 #size-cells = <2>; [all …]
|
/linux/drivers/clk/tegra/ |
H A D | clk-dfll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * clk-dfll.c - Tegra DFLL clock source common code 5 * Copyright (C) 2012-2019 NVIDIA Corporation. All rights reserved. 12 * "CL-DVFS". To try to avoid confusion, this code refers to them 16 * supply voltage noise. Tegra124 uses it to clock the fast CPU 18 * DFLL can be operated in either open-loop mode or closed-loop mode. 19 * In open-loop mode, the DFLL generates an output clock appropriate 20 * to the supply voltage. In closed-loop mode, when configured with a 21 * target frequency, the DFLL minimizes supply voltage while 27 * performance-measurement code and any code that relies on the CPU [all …]
|
/linux/drivers/mmc/host/ |
H A D | sdhci-msm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drivers/mmc/host/sdhci-msm.c - Qualcomm SDHCI Platform driver 5 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. 23 #include "sdhci-cqhci.h" 24 #include "sdhci-pltfm.h" 123 #define INVALID_TUNING_PHASE -1 140 /* Max load for eMMC Vdd-io supply */ 146 /* Max load for SD Vdd-io supply */ 150 msm_host->var_ops->msm_readl_relaxed(host, offset) 153 msm_host->var_ops->msm_writel_relaxed(val, host, offset) [all …]
|
H A D | sdhci-tegra.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/dma-mapping.h> 20 #include <linux/mmc/slot-gpio.h> 32 #include "sdhci-cqhci.h" 33 #include "sdhci-pltfm.h" 192 const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data; in tegra_sdhci_readw() 194 if (unlikely((soc_data->nvquirks & NVQUIRK_FORCE_SDHCI_SPEC_200) && in tegra_sdhci_readw() 200 return readw(host->ioaddr + reg); in tegra_sdhci_readw() 213 pltfm_host->xfer_mode_shadow = val; in tegra_sdhci_writew() 216 writel((val << 16) | pltfm_host->xfer_mode_shadow, in tegra_sdhci_writew() [all …]
|
/linux/drivers/media/i2c/ |
H A D | imx283.c | 1 // SPDX-License-Identifier: GPL-2.0 13 * Copyright (C) 2019-2020 Raspberry Pi (Trading) Ltd 32 #include <media/v4l2-cci.h> 33 #include <media/v4l2-ctrls.h> 34 #include <media/v4l2-device.h> 35 #include <media/v4l2-fwnode.h> 36 #include <media/v4l2-mediabus.h> 93 #define IMX283_HMAX_MAX (BIT(16) - 1) 97 #define IMX283_VMAX_MAX (BIT(16) - 1) 105 * Gain [dB] = -20log{(2048 - value [10:0]) /2048} [all …]
|
/linux/drivers/media/radio/si4713/ |
H A D | si4713.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * drivers/media/radio/si4713-i2c.c 19 #include <media/v4l2-device.h> 20 #include <media/v4l2-ioctl.h> 21 #include <media/v4l2-common.h> 28 MODULE_PARM_DESC(debug, "Debug level (0 - 2)"); 46 #define DEFAULT_ACOMP_THRESHOLD (-0x28) 160 int rval = -EINVAL; in usecs_to_dev() 176 v4l2_dbg(2, debug, &sdev->sd, in si4713_handler() 178 complete(&sdev->work); in si4713_handler() [all …]
|
/linux/drivers/media/usb/gspca/ |
H A D | ov519.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2008-2011 Jean-François Moine <moinejf@free.fr> 8 * This module is adapted from the ov51x-jpeg package, which itself 13 * Copyright (c) 1999-2006 Mark W. McClelland 20 * ov51x-jpeg original copyright is: 22 * Copyright (c) 2004-2007 Romain Beauxis <toots@rastageeks.org> 38 MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>"); 482 /*jfm: this value does not work for 800x600 - see isoc_init */ 539 #define OV7670_R14_COM9 0x14 /* Control 9 - gain ceiling */ 605 /* ms-win traces */ [all …]
|
/linux/drivers/gpu/drm/panel/ |
H A D | panel-novatek-nt35510.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 * per-panel, e.g. for physical size. 108 #define NT35510_P1_VGHCTR 0xBF /* VGH output ctrl */ 147 * struct nt35510_config - the display-specific NT35510 configuration 159 * V0, V1, V3 ... V255, with 0x0000 being the lowest voltage and 160 * 0x03FF being the highest voltage. 173 * +-------------------------------------------> 207 * @bt1ctr: setting for boost power control for the AVDD step-up 210 * frequency for the step-up circuit: 220 * amplification for the step-up circuit: [all …]
|
/linux/drivers/memory/tegra/ |
H A D | tegra124-emc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/clk-provider.h> 15 #include <linux/interconnect-provider.h> 512 /* protect shared rate-change code path */ 521 writel(value, emc->regs + EMC_CCFIFO_DATA); in emc_ccfifo_writel() 522 writel(offset, emc->regs + EMC_CCFIFO_ADDR); in emc_ccfifo_writel() 530 writel(1, emc->regs + EMC_TIMING_CONTROL); in emc_seq_update_timing() 533 value = readl(emc->regs + EMC_STATUS); in emc_seq_update_timing() 539 dev_err(emc->dev, "timing update timed out\n"); in emc_seq_update_timing() 547 writel(0, emc->regs + EMC_AUTO_CAL_INTERVAL); in emc_seq_disable_auto_cal() [all …]
|
/linux/Documentation/spi/ |
H A D | spi-summary.rst | 5 02-Feb-2012 8 ------------ 17 clocking modes through which data is exchanged; mode-0 and mode-3 are most 32 - SPI may be used for request/response style device protocols, as with 35 - It may also be used to stream data in either direction (half duplex), 38 - Some devices may use eight bit words. Others may use different word 39 lengths, such as streams of 12-bit or 20-bit digital samples. 41 - Words are usually sent with their most significant bit (MSB) first, 44 - Sometimes SPI is used to daisy-chain devices, like shift registers. 51 SPI is only one of the names used by such four-wire protocols, and [all …]
|
/linux/drivers/net/ethernet/wangxun/libwx/ |
H A D | wx_type.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright (c) 2015 - 2022 Beijing WangXun Technology Co., Ltd. */ 18 /* MSI-X capability fields masks */ 51 /* Sensors for PVT(Process Voltage Temperature) */ 341 #define WX_PX_TR_CFG_SWFLSH BIT(26) /* Tx Desc. wr-bk flushing */ 371 #define WX_HI_MAX_BLOCK_BYTE_LENGTH 256 /* Num of bytes in range */ 393 #define WX_BT2KB(BT) (((BT) + (8 * 1024 - 1)) / (8 * 1024)) 508 /* Packet type non-ip values */ 537 ((le32_to_cpu((_rxd)->wb.lower.lo_dword.data) >> 9) & 0xFF) 539 ((le32_to_cpu((_rxd)->wb.lower.lo_dword.data) >> 6) & 0x1) [all …]
|