/linux/Documentation/devicetree/bindings/power/supply/ |
H A D | maxim,max17042.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Sebastian Reichel <sre@kernel.org> 13 - $ref: power-supply.yaml# 18 - maxim,max17042 19 - maxim,max17047 20 - maxim,max17050 21 - maxim,max17055 22 - maxim,max77849-battery [all …]
|
H A D | charger-manager.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/charger-manager.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Sebastian Reichel <sre@kernel.org> 18 const: charger-manager 20 cm-chargers: 22 $ref: /schemas/types.yaml#/definitions/string-array 24 cm-num-chargers: 28 cm-fuel-gauge: [all …]
|
/linux/drivers/media/usb/dvb-usb/ |
H A D | af9005.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * USB1.1 DVB-T receiver. 9 * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information 17 "set debugging level (1=info,xfer=2,rc=4,reg=8,i2c=16,fw=32 (or-able))." 48 struct af9005_device_state *st = d->priv; in af9005_generic_read_write() 54 return -EINVAL; in af9005_generic_read_write() 58 return -EINVAL; in af9005_generic_read_write() 61 mutex_lock(&d->data_mutex); in af9005_generic_read_write() 62 st->data[0] = 14; /* rest of buffer length low */ in af9005_generic_read_write() 63 st->data[1] = 0; /* rest of buffer length high */ in af9005_generic_read_write() [all …]
|
/linux/arch/arm64/boot/dts/qcom/ |
H A D | msm8916-motorola-surnia.dts | 1 // SPDX-License-Identifier: GPL-2.0-only 3 /dts-v1/; 5 #include "msm8916-motorola-common.dtsi" 10 chassis-type = "handset"; 20 interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>; 22 pinctrl-0 = <&battery_alert_default>; 23 pinctrl-names = "default"; 25 maxim,rsns-microohm = <10000>; 26 maxim,over-heat-temp = <600>; 27 maxim,cold-temp = <(-200)>; [all …]
|
H A D | msm8916-motorola-osprey.dts | 1 // SPDX-License-Identifier: GPL-2.0-only 3 /dts-v1/; 5 #include "msm8916-motorola-common.dtsi" 10 chassis-type = "handset"; 12 reg_touch_vdda: regulator-touch-vdda { 13 compatible = "regulator-fixed"; 14 regulator-name = "touch_vdda"; 16 enable-active-high; 17 pinctrl-0 = <&touch_vdda_default>; 18 pinctrl-names = "default"; [all …]
|
H A D | msm8916-motorola-harpia.dts | 1 // SPDX-License-Identifier: GPL-2.0-only 3 /dts-v1/; 5 #include "msm8916-motorola-common.dtsi" 10 chassis-type = "handset"; 20 interrupts-extended = <&tlmm 62 IRQ_TYPE_EDGE_FALLING>; 22 pinctrl-0 = <&battery_alert_default>; 23 pinctrl-names = "default"; 25 maxim,rsns-microohm = <10000>; 26 maxim,over-heat-temp = <600>; 27 maxim,cold-temp = <(-200)>; [all …]
|
/linux/drivers/iio/temperature/ |
H A D | max31856.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * Copyright (C) 2018-2019 Rockwell Collins 20 #include <dt-bindings/iio/temperature/thermocouple.h> 65 { /* Cold Junction Temperature */ 90 return spi_write_then_read(data->spi, ®, 1, val, read_size); in max31856_read() 101 return spi_write(data->spi, buf, 2); in max31856_write() 128 reg_cr1_val |= data->thermocouple_type; in max31856_init() 131 reg_cr1_val |= data->averaging << MAX31856_AVERAGING_SHIFT; in max31856_init() 149 if (data->filter_50hz) in max31856_init() 164 switch (chan->channel2) { in max31856_thermocouple_read() [all …]
|
H A D | ltc2983.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Analog Devices LTC2983 Multi-Sensor Digital Temperature Measurement System 60 (((chan - 1) * 4) + LTC2983_CHAN_ASSIGN_START_REG) 62 (((chan - 1) * 4) + LTC2983_TEMP_RES_START_REG) 130 /* cold junction for thermocouples and rsense for rtd's and thermistor's */ 237 __be32 temp __aligned(IIO_DMA_MINALIGN); 312 * instance a resolution of 2^-10 means we have 10 fractional bits. 326 s64 __res = -(s32)val; in __convert_to_raw_sign() 330 return (u32)-__res; in __convert_to_raw_sign() 337 const struct device *dev = &st->spi->dev; in __ltc2983_fault_handler() [all …]
|
/linux/drivers/sbus/char/ |
H A D | bbc_envctrl.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* bbc_envctrl.c: UltraSPARC-III environment control driver. 26 /* Two temperature sensors exist in the SunBLADE-1000 enclosure. 31 * The max1617 is capable of being programmed with power-off 44 * disabled/enabled when entering/exiting the lowest power-saving 59 * before the hardware based power-off event is triggered. 63 * if we cannot interrogate the cpu-fru SEEPROM. 71 { 100, 85, 80, 5, -5, -10 }, 72 { 100, 85, 80, 5, -5, -10 }, 76 { 65, 55, 40, 5, -5, -10 }, [all …]
|
/linux/drivers/hwmon/ |
H A D | adm9240.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 * Alarms 16-bit map of active alarms 26 * Test hardware: Intel SE440BX-2 desktop motherboard --Grant 28 * LM81 extended temp reading not implemented 36 #include <linux/hwmon-sysfs.h> 38 #include <linux/hwmon-vid.h> 74 return (val * mul - div / 2) / div; in SCALE() 93 /* temperature range: -40..125, 127 disables temperature alarm */ 96 val = clamp_val(val, -40000, 127000); in TEMP_TO_REG() 104 return -1; in FAN_FROM_REG() [all …]
|
/linux/drivers/power/supply/ |
H A D | charger-manager.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * during suspend-to-mem. 23 #include <linux/power/charger-manager.h> 35 { "USB-HOST", EXTCON_USB_HOST }, 40 { "FAST-CHARGER", EXTCON_CHG_USB_FAST }, 41 { "SLOW-CHARGER", EXTCON_CHG_USB_SLOW }, 49 { "CHARGE-DOWNSTREAM", EXTCON_CHG_USB_CDP }, 78 /* About in-suspend (suspend-again) monitoring */ 92 * is_batt_present - See if the battery presents in place. 102 switch (cm->desc->battery_present) { in is_batt_present() [all …]
|
H A D | max17042_battery.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <linux/devm-helpers.h> 94 static int max17042_get_temperature(struct max17042_chip *chip, int *temp) in max17042_get_temperature() argument 98 struct regmap *map = chip->regmap; in max17042_get_temperature() 104 *temp = sign_extend32(data, 15); in max17042_get_temperature() 105 /* The value is converted into deci-centigrade scale */ in max17042_get_temperature() 107 *temp = *temp * 10 / 256; in max17042_get_temperature() 117 ret = power_supply_am_i_supplied(chip->battery); in max17042_get_status() 128 * The MAX170xx has builtin end-of-charge detection and will update in max17042_get_status() 133 * continuously once end-of-charge detection kicks in, so allow the in max17042_get_status() [all …]
|
H A D | 88pm860x_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 68 /* OCV -- Open Circuit Voltage */ 83 * corresponding resistor value -- Ohm / C degeree. 85 #define TBAT_NEG_25D 127773 /* -25 */ 86 #define TBAT_NEG_10D 54564 /* -10 */ 151 * register 1 bit[7:0] -- bit[11:4] of measured value of voltage 152 * register 0 bit[3:0] -- bit[3:0] of measured value of voltage 160 ret = pm860x_bulk_read(info->i2c, offset, 2, buf); in measure_12bit_voltage() 188 * bit[11:10] -- bit[7:6] of LDO9(0x18) in measure_vbatt() 189 * bit[9:8] -- bit[7:6] of LDO8(0x17) in measure_vbatt() [all …]
|
H A D | qcom_smbb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * This driver is for the multi-block Switch-Mode Battery Charger and Boost 6 * integrated, single-cell lithium-ion battery charger. 8 * Sub-components: 9 * - Charger core 10 * - Buck 11 * - DC charge-path 12 * - USB charge-path 13 * - Battery interface 14 * - Boost (not implemented) [all …]
|
H A D | bq24190_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 19 #include <linux/extcon-provider.h> 32 #define BQ24190_REG_POC 0x01 /* Power-On Configuration */ 63 #define BQ24190_REG_PCTCC 0x03 /* Pre-charge/Termination Current Cntl */ 161 * The tables below provide a 2-way mapping for the value that goes in 162 * the register field and the real-world value that it represents. 164 * number at that index in the array is the real-world value that it 269 * 'val'. The index range returned is 0 to 'tbl_size' - 1. Assumes that 281 return i - 1; in bq24190_find_idx() 290 ret = i2c_smbus_read_byte_data(bdi->client, reg); in bq24190_read() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/link/protocols/ |
H A D | link_dp_dpia_bw.c | 34 link->ctx->logger 38 // ------------------------------------------------------------------ 40 // ------------------------------------------------------------------ 43 * - Is it USB4 link? 44 * - Is HPD HIGH? 45 * - Is BW Allocation Support Mode enabled on DP-Tx? 49 return (tmp && DISPLAY_ENDPOINT_USB4_DPIA == tmp->ep_type in get_bw_alloc_proceed_flag() 50 && tmp->hpd_status in get_bw_alloc_proceed_flag() 51 && tmp->dpia_bw_alloc_config.bw_alloc_enabled); in get_bw_alloc_proceed_flag() 56 link->dpia_bw_alloc_config.bw_alloc_enabled = false; in reset_bw_alloc_struct() [all …]
|
/linux/drivers/media/dvb-frontends/ |
H A D | m88rs2000.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 40 MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able))."); 44 printk(KERN_DEBUG "m88rs2000-fe: " args); \ 49 printk(KERN_INFO "m88rs2000-fe: " format "\n" , ## arg) 57 .addr = state->config->demod_addr, in m88rs2000_writereg() 63 ret = i2c_transfer(state->i2c, &msg, 1); in m88rs2000_writereg() 69 return (ret != 1) ? -EREMOTEIO : 0; in m88rs2000_writereg() 80 .addr = state->config->demod_addr, in m88rs2000_readreg() 85 .addr = state->config->demod_addr, in m88rs2000_readreg() 92 ret = i2c_transfer(state->i2c, msg, 2); in m88rs2000_readreg() [all …]
|
/linux/include/trace/events/ |
H A D | f2fs.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 12 #define show_dev_ino(entry) show_dev(entry->dev), (unsigned long)entry->ino 22 TRACE_DEFINE_ENUM(COLD); 60 { IPU, "IN-PLACE" }, \ 61 { OPU, "OUT-OF-PLACE" }) 63 #define show_block_temp(temp) \ argument 64 __print_symbolic(temp, \ 67 { COLD, "COLD" }) 91 { CURSEG_COLD_DATA, "Cold DATA" }, \ 94 { CURSEG_COLD_NODE, "Cold NODE" }, \ [all …]
|
/linux/drivers/thermal/tegra/ |
H A D | tegra30-tsensor.c | 1 // SPDX-License-Identifier: GPL-2.0 9 * Copyright (C) 2021 GRATE-DRIVER project 95 err = reset_control_assert(ts->rst); in tegra_tsensor_hw_enable() 97 dev_err(ts->dev, "failed to assert hardware reset: %d\n", err); in tegra_tsensor_hw_enable() 101 err = clk_prepare_enable(ts->clk); in tegra_tsensor_hw_enable() 103 dev_err(ts->dev, "failed to enable clock: %d\n", err); in tegra_tsensor_hw_enable() 109 err = reset_control_deassert(ts->rst); in tegra_tsensor_hw_enable() 111 dev_err(ts->dev, "failed to deassert hardware reset: %d\n", err); in tegra_tsensor_hw_enable() 128 writel_relaxed(val, ts->regs + 0x40 + TSENSOR_SENSOR0_CONFIG0); in tegra_tsensor_hw_enable() 129 writel_relaxed(val, ts->regs + 0x80 + TSENSOR_SENSOR0_CONFIG0); in tegra_tsensor_hw_enable() [all …]
|
/linux/drivers/thermal/ti-soc-thermal/ |
H A D | ti-bandgap.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ 26 * +----------+----------------+ 28 * +---------------------------+ 32 * +-------------------+ +-----------------+ 33 * | struct ti_bandgap |-->| struct device * | 34 * +----------+--------+ +-----------------+ 38 * +------------------------+ 40 * +------------------------+ 44 * +------------+------------------------------------------------------+ [all …]
|
/linux/drivers/net/ethernet/qlogic/qlcnic/ |
H A D | qlcnic_init.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (c) 2009-2013 QLogic Corporation 89 recv_ctx = adapter->recv_ctx; in qlcnic_release_rx_buffers() 90 for (ring = 0; ring < adapter->max_rds_rings; ring++) { in qlcnic_release_rx_buffers() 91 rds_ring = &recv_ctx->rds_rings[ring]; in qlcnic_release_rx_buffers() 92 for (i = 0; i < rds_ring->num_desc; ++i) { in qlcnic_release_rx_buffers() 93 rx_buf = &(rds_ring->rx_buf_arr[i]); in qlcnic_release_rx_buffers() 94 if (rx_buf->skb == NULL) in qlcnic_release_rx_buffers() 97 dma_unmap_single(&adapter->pdev->dev, rx_buf->dma, in qlcnic_release_rx_buffers() 98 rds_ring->dma_size, DMA_FROM_DEVICE); in qlcnic_release_rx_buffers() [all …]
|
/linux/drivers/net/wireless/mediatek/mt7601u/ |
H A D | phy.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * (c) Copyright 2002-2010, Ralink Technology, Inc. 23 if (WARN_ON(!test_bit(MT7601U_STATE_WLAN_RUNNING, &dev->state)) || in mt7601u_rf_wr() 25 return -EINVAL; in mt7601u_rf_wr() 26 if (test_bit(MT7601U_STATE_REMOVED, &dev->state)) in mt7601u_rf_wr() 29 mutex_lock(&dev->reg_atomic_mutex); in mt7601u_rf_wr() 32 ret = -ETIMEDOUT; in mt7601u_rf_wr() 44 mutex_unlock(&dev->reg_atomic_mutex); in mt7601u_rf_wr() 47 dev_err(dev->dev, "Error: RF write %02hhx:%02hhx failed:%d!!\n", in mt7601u_rf_wr() 56 int ret = -ETIMEDOUT; in mt7601u_rf_rr() [all …]
|
/linux/drivers/scsi/qla4xxx/ |
H A D | ql4_nx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (c) 2003-2013 QLogic Corporation 14 #include <linux/io-64-nonatomic-lo-hi.h> 40 if ((off < ha->first_page_group_end) && in qla4_8xxx_pci_base_offsetfset() 41 (off >= ha->first_page_group_start)) in qla4_8xxx_pci_base_offsetfset() 42 return (void __iomem *)(ha->nx_pcibase + off); in qla4_8xxx_pci_base_offsetfset() 344 "Cold", 363 ha->crb_win = CRB_HI(*off); in qla4_82xx_pci_set_crbwindow_2M() 364 writel(ha->crb_win, in qla4_82xx_pci_set_crbwindow_2M() 365 (void __iomem *)(CRB_WINDOW_2M + ha->nx_pcibase)); in qla4_82xx_pci_set_crbwindow_2M() [all …]
|
/linux/drivers/gpu/drm/i915/display/ |
H A D | vlv_dsi.c | 90 struct intel_display *display = to_intel_display(&intel_dsi->base); in vlv_dsi_wait_for_fifo_empty() 98 drm_err(display->drm, "DPI FIFOs are not empty\n"); in vlv_dsi_wait_for_fifo_empty() 110 for (j = 0; j < min_t(u32, len - i, 4); j++) in write_data() 126 for (j = 0; j < min_t(u32, len - i, 4); j++) in read_data() 135 struct intel_dsi *intel_dsi = intel_dsi_host->intel_dsi; in intel_dsi_host_transfer() 136 struct intel_display *display = to_intel_display(&intel_dsi->base); in intel_dsi_host_transfer() 137 enum port port = intel_dsi_host->port; in intel_dsi_host_transfer() 150 if (msg->flags & MIPI_DSI_MSG_USE_LPM) { in intel_dsi_host_transfer() 166 drm_err(display->drm, in intel_dsi_host_transfer() 173 if (msg->rx_len) { in intel_dsi_host_transfer() [all …]
|
/linux/drivers/scsi/qla2xxx/ |
H A D | qla_nx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (c) 2003-2014 QLogic Corporation 8 #include <linux/io-64-nonatomic-lo-hi.h> 14 #define MASK(n) ((1ULL<<(n))-1) 340 [QLA8XXX_DEV_COLD] = "Cold/Re-init", 364 scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); in qla82xx_pci_set_crbwindow_2M() 366 ha->crb_win = CRB_HI(off_in); in qla82xx_pci_set_crbwindow_2M() 367 writel(ha->crb_win, CRB_WINDOW_2M + ha->nx_pcibase); in qla82xx_pci_set_crbwindow_2M() 372 win_read = rd_reg_dword(CRB_WINDOW_2M + ha->nx_pcibase); in qla82xx_pci_set_crbwindow_2M() 373 if (win_read != ha->crb_win) { in qla82xx_pci_set_crbwindow_2M() [all …]
|