| /kernel/linux/linux-6.6/drivers/power/supply/ |
| D | ab8500_bmdata.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include "ab8500-bm.h" 10 /* Default: between this temp and AB8500_TEMP_UNDER charging is reduced */ 12 /* Default: between this temp and AB8500_TEMP_OVER charging is reduced */ 14 /* Default: over this temp, charging is stopped */ 47 * Note that the batres_vs_temp table must be strictly sorted by falling 48 * temperature values to work. Factory resistance is 300 mOhm and the 49 * resistance values to the right are percentages of 300 mOhm. 52 { .temp = 40, .resistance = 40 /* 120 mOhm */ }, 53 { .temp = 30, .resistance = 45 /* 135 mOhm */ }, [all …]
|
| D | power_supply_core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 24 #include <linux/fixp-arith.h> 26 #include "samsung-sdi-battery.h" 44 if (!supply->supplied_from && !supplier->supplied_to) in __power_supply_is_supplied_by() 48 if (supply->supplied_from) { in __power_supply_is_supplied_by() 49 if (!supplier->desc->name) in __power_supply_is_supplied_by() 51 for (i = 0; i < supply->num_supplies; i++) in __power_supply_is_supplied_by() 52 if (!strcmp(supplier->desc->name, supply->supplied_from[i])) in __power_supply_is_supplied_by() 55 if (!supply->desc->name) in __power_supply_is_supplied_by() 57 for (i = 0; i < supplier->num_supplicants; i++) in __power_supply_is_supplied_by() [all …]
|
| D | sc27xx_fuel_gauge.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include <linux/nvmem-consumer.h> 81 * @internal_resist: the battery internal resistance in mOhm 89 * @table_len: the capacity table length 90 * @resist_table_len: the resistance table length 93 * @calib_resist: the real resistance of coulomb counter chip in uOhm 94 * @cap_table: capacity table with corresponding ocv 95 * @resist_table: resistance percent table with corresponding temperature 128 static int sc27xx_fgu_get_temp(struct sc27xx_fgu_data *data, int *temp); 139 return DIV_S64_ROUND_CLOSEST(adc * 1000, data->cur_1000ma_adc); in sc27xx_fgu_adc_to_current() [all …]
|
| D | samsung-sdi-battery.c | 1 // SPDX-License-Identifier: GPL-2.0 8 * The BTI (battery type indicator) resistance in the code drops was very 9 * unreliable. The resistance listed here was obtained by simply measuring 10 * the BTI resistance with a multimeter on the battery. 14 #include "samsung-sdi-battery.h" 23 * Voltage to internal resistance tables. The internal resistance varies 24 * depending on the VBAT voltage, so look this up from a table. Different 425 * Temperature to internal resistance scaling tables. 427 * "resistance" is the percentage of the resistance determined from the voltage 430 * FIXME: the proper table is missing: Samsung does not provide the necessary [all …]
|
| /kernel/linux/linux-5.10/include/linux/mfd/ |
| D | abx500.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (C) 2007-2009 ST-Ericsson AB 45 * struct abx500_res_to_temp - defines one point in a temp to res curve. To 48 * @temp: battery pack temperature in Celsius 49 * @resist: NTC resistor net total resistance 52 int temp; member 57 * struct abx500_v_to_cap - Table for translating voltage to capacity 70 * struct abx500_fg_parameters - Fuel gauge algorithm parameters, in seconds 122 * struct abx500_charger_maximization - struct used by the board config. 136 * struct abx500_battery_type - different batteries supported [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/power/supply/ |
| D | battery.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Sebastian Reichel <sre@kernel.org> 14 In smart batteries, these are typically stored in non-volatile memory 16 no appropriate non-volatile memory, or it is unprogrammed/incorrect. 27 Batteries must be referenced by chargers and/or fuel-gauges using a phandle. 28 The phandle's property should be named "monitored-battery". 32 const: simple-battery 34 over-voltage-threshold-microvolt: [all …]
|
| D | sc27xx-fg.txt | 4 - compatible: Should be one of the following: 5 "sprd,sc2720-fgu", 6 "sprd,sc2721-fgu", 7 "sprd,sc2723-fgu", 8 "sprd,sc2730-fgu", 9 "sprd,sc2731-fgu". 10 - reg: The address offset of fuel gauge unit. 11 - battery-detect-gpios: GPIO for battery detection. 12 - io-channels: Specify the IIO ADC channels to get temperature and charge voltage. 13 - io-channel-names: Should be "bat-temp" or "charge-vol". [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/power/supply/ |
| D | battery.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Sebastian Reichel <sre@kernel.org> 14 In smart batteries, these are typically stored in non-volatile memory 16 no appropriate non-volatile memory, or it is unprogrammed/incorrect. 27 Batteries must be referenced by chargers and/or fuel-gauges using a phandle. 28 The phandle's property should be named "monitored-battery". 32 const: simple-battery 34 device-chemistry: [all …]
|
| D | sc27xx-fg.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/sc27xx-fg.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Sebastian Reichel <sre@kernel.org> 13 - $ref: power-supply.yaml# 18 - sprd,sc2720-fgu 19 - sprd,sc2721-fgu 20 - sprd,sc2723-fgu 21 - sprd,sc2730-fgu [all …]
|
| /kernel/linux/linux-5.10/drivers/power/supply/ |
| D | power_supply_core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 42 if (!supply->supplied_from && !supplier->supplied_to) in __power_supply_is_supplied_by() 46 if (supply->supplied_from) { in __power_supply_is_supplied_by() 47 if (!supplier->desc->name) in __power_supply_is_supplied_by() 49 for (i = 0; i < supply->num_supplies; i++) in __power_supply_is_supplied_by() 50 if (!strcmp(supplier->desc->name, supply->supplied_from[i])) in __power_supply_is_supplied_by() 53 if (!supply->desc->name) in __power_supply_is_supplied_by() 55 for (i = 0; i < supplier->num_supplicants; i++) in __power_supply_is_supplied_by() 56 if (!strcmp(supplier->supplied_to[i], supply->desc->name)) in __power_supply_is_supplied_by() 69 if (pst->desc->external_power_changed) in __power_supply_changed_work() [all …]
|
| D | sc27xx_fuel_gauge.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include <linux/nvmem-consumer.h> 81 * @internal_resist: the battery internal resistance in mOhm 89 * @table_len: the capacity table length 90 * @resist_table_len: the resistance table length 93 * @calib_resist: the real resistance of coulomb counter chip in uOhm 94 * @cap_table: capacity table with corresponding ocv 95 * @resist_table: resistance percent table with corresponding temperature 128 static int sc27xx_fgu_get_temp(struct sc27xx_fgu_data *data, int *temp); 139 return DIV_S64_ROUND_CLOSEST(adc * 1000, data->cur_1000ma_adc); in sc27xx_fgu_adc_to_current() [all …]
|
| D | ab8500_btemp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 28 #include <linux/mfd/abx500/ab8500-bm.h> 33 #define BTEMP_THERMAL_LOW_LIMIT -10 49 * struct ab8500_btemp_interrupts - ab8500 interrupts 75 * struct ab8500_btemp - ab8500 BTEMP device information 123 * ab8500_btemp_get() - returns a reference to the primary AB8500 BTEMP 133 * ab8500_btemp_batctrl_volt_to_res() - convert batctrl voltage to resistance 138 * This function returns the battery resistance that is 147 if (is_ab8500_1p1_or_earlier(di->parent)) { in ab8500_btemp_batctrl_volt_to_res() [all …]
|
| /kernel/linux/linux-6.6/drivers/iio/adc/ |
| D | qcom-vadc-common.c | 1 // SPDX-License-Identifier: GPL-2.0 5 #include <linux/fixp-arith.h> 6 #include <linux/iio/adc/qcom-vadc-common.h> 14 * struct vadc_map_pt - Map the graph representation for ADC channel 17 * resistance. 26 {1758, -40000 }, 27 {1742, -35000 }, 28 {1719, -30000 }, 29 {1691, -25000 }, 30 {1654, -20000 }, [all …]
|
| /kernel/linux/linux-5.10/drivers/iio/adc/ |
| D | qcom-vadc-common.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include "qcom-vadc-common.h" 15 {1758, -40}, 16 {1742, -35}, 17 {1719, -30}, 18 {1691, -25}, 19 {1654, -20}, 20 {1608, -15}, 21 {1551, -10}, 22 {1483, -5}, [all …]
|
| D | qcom-vadc-common.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 14 /* Max ADC code represents full-scale range of 1.8V */ 32 /* Default decimation - 1024 for rev2, 840 for pmic5 */ 45 #define PMI_CHG_SCALE_1 -138890 55 #define DIE_TEMP_ADC7_SCALE_1 -60000 61 * struct vadc_map_pt - Map the graph representation for ADC channel 64 * resistance. 82 * struct vadc_linear_graph - Represent ADC characteristics. 97 * struct vadc_prescale_ratio - Represent scaling ratio for ADC input. 107 * enum vadc_scale_fn_type - Scaling function to convert ADC code to [all …]
|
| /kernel/linux/linux-6.6/include/linux/ |
| D | power_supply.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 226 /* Run-time specific power supply configuration */ 349 int temp; /* celsius */ member 350 int resistance; /* internal resistance percent */ member 355 int ri_uohm; /* Internal resistance in microohm */ 359 * struct power_supply_maintenance_charge_table - setting for maintenace charging 392 * +-------------------------------------------------------------------> t 394 * Practically this means that the Li-ions are wandering back and forth in the 405 * +-------------------------------------------------------------------> t 407 * Maintenance charging uses the voltages from this table: a table of settings [all …]
|
| /kernel/linux/linux-5.10/include/linux/mfd/abx500/ |
| D | ab8500-bm.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright ST-Ericsson 2012. 277 * struct res_to_temp - defines one point in a temp to res curve. To 280 * @temp: battery pack temperature in Celsius 281 * @resist: NTC resistor net total resistance 284 int temp; member 289 * struct batres_vs_temp - defines one point in a temp vs battery internal 290 * resistance curve. 291 * @temp: battery pack temperature in Celsius 295 int temp; member [all …]
|
| /kernel/linux/linux-5.10/drivers/hwmon/ |
| D | ab8500.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson 2010 - 2013 17 #include <linux/hwmon-sysfs.h> 19 #include <linux/mfd/abx500/ab8500-bm.h> 57 * VCC----[ R_up ]-----[ NTC ]----GND 58 * where R_up is pull-up resistance, and GPADC measures voltage on NTC. 59 * and res_to_temp table is strictly sorted by falling resistance values. 62 int v_ntc, int *temp) in ab8500_voltage_to_temp() argument 64 int r_ntc, i = 0, tbl_sz = cfg->tbl_sz; in ab8500_voltage_to_temp() 65 const struct abx500_res_to_temp *tbl = cfg->temp_tbl; in ab8500_voltage_to_temp() [all …]
|
| D | ntc_thermistor.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ntc_thermistor.c - NTC Thermistors 33 * Used as index in a zero-terminated array, holes not allowed so 63 * A compensation table should be sorted by the values of .ohm 69 { .temp_c = -40, .ohm = 1747920 }, 70 { .temp_c = -35, .ohm = 1245428 }, 71 { .temp_c = -30, .ohm = 898485 }, 72 { .temp_c = -25, .ohm = 655802 }, 73 { .temp_c = -20, .ohm = 483954 }, 74 { .temp_c = -15, .ohm = 360850 }, [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | power_supply.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 217 /* Run-time specific power supply configuration */ 339 int temp; /* celsius */ member 340 int resistance; /* internal resistance percent */ member 350 * The default field value is -EINVAL. 355 int energy_full_design_uwh; /* microWatt-hours */ 356 int charge_full_design_uah; /* microAmp-hours */ 404 extern int power_supply_ocv2cap_simple(struct power_supply_battery_ocv_table *table, 408 int temp, int *table_len); 410 int ocv, int temp); [all …]
|
| /kernel/linux/linux-6.6/drivers/hwmon/ |
| D | ntc_thermistor.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ntc_thermistor.c - NTC Thermistors 16 #include <linux/fixp-arith.h> 35 * Used as index in a zero-terminated array, holes not allowed so 68 * A compensation table should be sorted by the values of .ohm 74 { .temp_c = -40, .ohm = 1747920 }, 75 { .temp_c = -35, .ohm = 1245428 }, 76 { .temp_c = -30, .ohm = 898485 }, 77 { .temp_c = -25, .ohm = 655802 }, 78 { .temp_c = -20, .ohm = 483954 }, [all …]
|
| /kernel/linux/linux-6.6/Documentation/hwmon/ |
| D | vt1211.rst | 10 Addresses scanned: none, address read from Super-I/O config space 24 ----------------- 29 configuration for channels 1-5. 30 Legal values are in the range of 0-31. Bit 0 maps to 47 ----------- 49 The VIA VT1211 Super-I/O chip includes complete hardware monitoring 52 implements 5 universal input channels (UCH1-5) that can be individually 60 connected to the PWM outputs of the VT1211 :-(). 62 The following table shows the relationship between the vt1211 inputs and the 66 Sensor Voltage Mode Temp Mode Default Use (from the datasheet) [all …]
|
| /kernel/linux/linux-5.10/Documentation/hwmon/ |
| D | vt1211.rst | 10 Addresses scanned: none, address read from Super-I/O config space 24 ----------------- 29 configuration for channels 1-5. 30 Legal values are in the range of 0-31. Bit 0 maps to 47 ----------- 49 The VIA VT1211 Super-I/O chip includes complete hardware monitoring 52 implements 5 universal input channels (UCH1-5) that can be individually 60 connected to the PWM outputs of the VT1211 :-(). 62 The following table shows the relationship between the vt1211 inputs and the 66 Sensor Voltage Mode Temp Mode Default Use (from the datasheet) [all …]
|
| /kernel/linux/linux-5.10/drivers/iio/chemical/ |
| D | bme680_core.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Bosch BME680 - Temperature, Pressure, Humidity & Gas Sensor 5 * Copyright (C) 2017 - 2018 Bosch Sensortec GmbH 9 * https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME680-DS001-00.pdf 111 struct device *dev = regmap_get_device(data->regmap); in bme680_read_calib() 117 ret = regmap_bulk_read(data->regmap, BME680_T1_LSB_REG, in bme680_read_calib() 123 calib->par_t1 = le16_to_cpu(buf); in bme680_read_calib() 125 ret = regmap_bulk_read(data->regmap, BME680_T2_LSB_REG, in bme680_read_calib() 131 calib->par_t2 = le16_to_cpu(buf); in bme680_read_calib() 133 ret = regmap_read(data->regmap, BME680_T3_REG, &tmp); in bme680_read_calib() [all …]
|
| /kernel/linux/linux-6.6/drivers/iio/chemical/ |
| D | bme680_core.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Bosch BME680 - Temperature, Pressure, Humidity & Gas Sensor 5 * Copyright (C) 2017 - 2018 Bosch Sensortec GmbH 9 * https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME680-DS001-00.pdf 114 struct device *dev = regmap_get_device(data->regmap); in bme680_read_calib() 120 ret = regmap_bulk_read(data->regmap, BME680_T1_LSB_REG, in bme680_read_calib() 126 calib->par_t1 = le16_to_cpu(buf); in bme680_read_calib() 128 ret = regmap_bulk_read(data->regmap, BME680_T2_LSB_REG, in bme680_read_calib() 134 calib->par_t2 = le16_to_cpu(buf); in bme680_read_calib() 136 ret = regmap_read(data->regmap, BME680_T3_REG, &tmp); in bme680_read_calib() [all …]
|