/linux/drivers/power/supply/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 104 tristate "Active-semi ACT8945A charger driver" 108 Active-semi ActivePath ACT8945A charger. 153 Li+ batteries. 158 tristate "DS2782/DS2786 standalone gas-gauge" 162 gas-gauge. 208 tristate "Sharp SL-5500 (collie) battery" 212 SL-5500 (collie) models. 223 called ingenic-battery. 242 Say Y to include support for SBS battery driver for SBS-compliant [all …]
|
H A D | lego_ev3_battery.c | 46 val->intval = batt->technology; in lego_ev3_battery_get_property() 50 ret = iio_read_channel_processed(batt->iio_v, &val->intval); in lego_ev3_battery_get_property() 54 val->intval *= 2000; in lego_ev3_battery_get_property() 55 val->intval += 50000; in lego_ev3_battery_get_property() 58 ret = iio_read_channel_processed(batt->iio_i, &val2); in lego_ev3_battery_get_property() 64 val->intval += val2; in lego_ev3_battery_get_property() 67 val->intval = batt->v_max; in lego_ev3_battery_get_property() 70 val->intval = batt->v_min; in lego_ev3_battery_get_property() 74 ret = iio_read_channel_processed(batt->iio_i, &val->intval); in lego_ev3_battery_get_property() 78 val->intval *= 20000; in lego_ev3_battery_get_property() [all …]
|
H A D | power_supply_sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 117 [POWER_SUPPLY_TECHNOLOGY_LION] = "Li-ion", 118 [POWER_SUPPLY_TECHNOLOGY_LIPO] = "Li-poly", 141 [POWER_SUPPLY_CHARGE_BEHAVIOUR_INHIBIT_CHARGE] = "inhibit-charge", 142 [POWER_SUPPLY_CHARGE_BEHAVIOUR_FORCE_DISCHARGE] = "force-discharge", 237 return to_ps_attr(attr) - power_supply_attrs; in dev_attr_psp() 262 return -EINVAL; in power_supply_show_enum_with_available() 266 buf[count - 1] = '\n'; in power_supply_show_enum_with_available() 281 value.intval = psy->desc->type; in power_supply_show_property() 286 if (ret == -ENODATA) in power_supply_show_property() [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 | max17040_battery.c | 1 // SPDX-License-Identifier: GPL-2.0 4 // fuel-gauge systems for lithium-ion (Li+) batteries 160 return regmap_write(chip->regmap, MAX17040_CMD, chip->data.reset_val); in max17040_reset() 165 level = 32 - level * (chip->quirk_double_soc ? 2 : 1); in max17040_set_low_soc_alert() 166 return regmap_update_bits(chip->regmap, MAX17040_CONFIG, in max17040_set_low_soc_alert() 172 return regmap_update_bits(chip->regmap, MAX17040_CONFIG, in max17040_set_soc_alert() 178 u16 mask = chip->data.rcomp_bytes == 2 ? in max17040_set_rcomp() 181 return regmap_update_bits(chip->regmap, MAX17040_CONFIG, mask, rcomp); in max17040_set_rcomp() 186 struct chip_data *d = &chip->data; in max17040_raw_vcell_to_uvolts() 188 return (vcell >> d->vcell_shift) * d->vcell_mul / d->vcell_div; in max17040_raw_vcell_to_uvolts() [all …]
|
H A D | surface_battery.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Battery driver for 7th-generation Microsoft Surface devices via Surface 6 * Copyright (C) 2019-2021 Maximilian Luz <luzmaximilian@gmail.com> 22 /* -- SAM interface. -------------------------------------------------------- */ 112 /* -- Device structures. ---------------------------------------------------- */ 140 /* -- Module parameters. ---------------------------------------------------- */ 147 /* -- State management. ----------------------------------------------------- */ 157 lockdep_assert_held(&bat->lock); in spwr_battery_present() 159 return le32_to_cpu(bat->sta) & SAM_BATTERY_STA_PRESENT; in spwr_battery_present() 164 lockdep_assert_held(&bat->lock); in spwr_battery_load_sta() [all …]
|
H A D | ab8500_fg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson AB 2012 5 * Main and Back-up battery management driver. 7 * Note: Backup battery management is required in case of Li-Ion battery and not 37 #include <linux/fixp-arith.h> 39 #include "ab8500-bm.h" 49 /* Currents higher than -500mA (dissipating) will make compensation unstable */ 50 #define IGNORE_VBAT_HIGHCUR -500000 63 * struct ab8500_fg_interrupts - ab8500 fg interrupts 153 * struct ab8500_fg - ab8500 FG device information [all …]
|
/linux/Documentation/devicetree/bindings/power/supply/ |
H A D | richtek,rt9471.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Alina Yu <alina_yu@richtek.com> 11 - ChiYuan Huang <cy_huang@richtek.com> 14 RT9471 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for 19 https://www.richtek.com/assets/product_file/RT9471=RT9471D/DS9471D-02.pdf 28 charge-enable-gpios: 32 wakeup-source: true 37 usb-otg-vbus-regulator: [all …]
|
H A D | richtek,rt9467.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - ChiYuan Huang <cy_huang@richtek.com> 11 - ChiaEn Wu <chiaen_wu@richtek.com> 14 RT9467 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for 16 MOSFETs, input current sensing and regulation, high-accuracy voltage 20 The RT9467 also features USB On-The-Go (OTG) support. It also integrates 21 D+/D- pin for USB host/charging port detection. 24 https://www.richtek.com/assets/product_file/RT9467/DS9467-01.pdf [all …]
|
H A D | lego,ev3-battery.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/lego,ev3-battery.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - David Lechner <david@lechnology.com> 11 - Sebastian Reichel <sre@kernel.org> 14 LEGO MINDSTORMS EV3 has some built-in capability for monitoring the battery. 15 It uses 6 AA batteries or a special Li-ion rechargeable battery pack that is 19 - $ref: power-supply.yaml# 23 const: lego,ev3-battery [all …]
|
H A D | bq256xx.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Andrew Davis <afd@ti.com> 14 The bq256xx devices are a family of highly-integrated battery charge 15 management and system power management ICs for single cell Li-ion and Li- 19 - https://www.ti.com/lit/ds/symlink/bq25600.pdf 20 - https://www.ti.com/lit/ds/symlink/bq25601.pdf 21 - https://www.ti.com/lit/ds/symlink/bq25600d.pdf 22 - https://www.ti.com/lit/ds/symlink/bq25601d.pdf [all …]
|
H A D | bq24190.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: TI BQ2419x Li-Ion Battery Charger 11 - Sebastian Reichel <sre@kernel.org> 14 - $ref: power-supply.yaml# 19 - ti,bq24190 20 - ti,bq24192 21 - ti,bq24192i 22 - ti,bq24196 [all …]
|
H A D | bq2415x.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: TI bq2415x Li-Ion Charger 11 - Sebastian Reichel <sre@kernel.org> 14 - $ref: power-supply.yaml# 19 - ti,bq24150 20 - ti,bq24150a 21 - ti,bq24151 22 - ti,bq24151a [all …]
|
H A D | bq24735.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: TI BQ24735 Li-Ion Battery Charger 11 - Sebastian Reichel <sre@kernel.org> 14 - $ref: power-supply.yaml# 27 ti,ac-detect-gpios: 35 ti,charge-current: 43 ti,charge-voltage: 51 ti,input-current: [all …]
|
H A D | bq25890.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Bq25890, bq25892, bq25895 and bq25896 Li-Ion Charger 11 - Sebastian Reichel <sre@kernel.org> 14 - $ref: power-supply.yaml# 19 - enum: 20 - ti,bq25890 21 - items: 22 - enum: [all …]
|
H A D | bq24257.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Bq24250, bq24251 and bq24257 Li-Ion Charger 11 - Sebastian Reichel <sre@kernel.org> 14 - $ref: power-supply.yaml# 19 - ti,bq24250 20 - ti,bq24251 21 - ti,bq24257 29 ti,battery-regulation-voltage: [all …]
|
/linux/tools/testing/selftests/power_supply/ |
H A D | test_power_supply_properties.sh | 2 # SPDX-License-Identifier: GPL-2.0 11 DIR="$(dirname "$(readlink -f "$0")")" 36 if [ $# -eq 0 ]; then 47 if [ ! -d "$SYSFS_SUPPLIES"/"$DEVNAME" ]; then 77 test_sysfs_prop_optional_list technology "Unknown","NiMH","Li-ion","Li-poly","LiFe","NiCd","LiMn" 86 # Technically the power-supply class does not limit reported values. 87 # E.g. one could expose an RTC backup-battery, which goes below 1.5V or 89 # have a step-up capable regulator behind the battery and operate with 91 # 1.8V-60V to catch drivers reporting incorrectly scaled values. E.g. a
|
/linux/Documentation/devicetree/bindings/mfd/ |
H A D | mediatek,mt6370.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - ChiYuan Huang <cy_huang@richtek.com> 13 MT6370 is a highly-integrated smart power management IC, which includes a 14 single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C & 26 wakeup-source: true 31 interrupt-controller: true 33 "#interrupt-cells": 46 const: mediatek,mt6370-adc [all …]
|
/linux/arch/arm/mach-sa1100/ |
H A D | assabet.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/arch/arm/mach-sa1100/assabet.c 7 * This file contains all Assabet-specific tweaks. 14 #include <linux/gpio/gpio-reg.h> 18 #include <linux/platform_data/sa11x0-serial.h> 34 #include <asm/mach-types.h> 37 #include <asm/pgtable-hwdef.h> 44 #include <linux/platform_data/mfd-mcp-sa11x0.h> 83 assabet_bcr_gc->set_multiple(assabet_bcr_gc, &m, &v); in ASSABET_BCR_frob() 93 gc = gpio_reg_init(NULL, reg, -1, 32, "assabet", 0xff000000, def_val, in assabet_init_gpio() [all …]
|
/linux/arch/arm/boot/dts/ti/davinci/ |
H A D | da850-lego-ev3.dts | 1 // SPDX-License-Identifier: GPL-2.0-only 8 /dts-v1/; 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/linux-event-codes.h> 11 #include <dt-bindings/pwm/pwm.h> 32 compatible = "gpio-keys"; 34 pinctrl-names = "default"; 35 pinctrl-0 = <&button_bias>; 75 * The EV3 has two built-in bi-color LEDs behind the buttons. 78 compatible = "gpio-leds"; [all …]
|
/linux/include/linux/ |
H A D | power_supply.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 226 /* Run-time specific power supply configuration */ 356 * struct power_supply_maintenance_charge_table - setting for maintenace charging 389 * +-------------------------------------------------------------------> t 391 * Practically this means that the Li-ions are wandering back and forth in the 402 * +-------------------------------------------------------------------> t 413 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged 428 * the expected stand-by current. Also overvoltage protection will be applied 440 * struct power_supply_battery_info - information about batteries 567 * for example 10 for +/- 10%, if the bti_resistance is set to 7000 and the [all …]
|
/linux/Documentation/ABI/testing/ |
H A D | sysfs-class-power | 5 Contact: linux-pm@vger.kernel.org 14 Contact: linux-pm@vger.kernel.org 23 Contact: linux-pm@vger.kernel.org 32 Contact: linux-pm@vger.kernel.org 43 Contact: linux-pm@vger.kernel.org 66 Contact: linux-pm@vger.kernel.org 81 Contact: linux-pm@vger.kernel.org 94 read-only reporting, unless the 'online' state of the supply 106 Contact: linux-pm@vger.kernel.org 124 Contact: linux-pm@vger.kernel.org [all …]
|
/linux/drivers/media/usb/gspca/ |
H A D | mr97310a.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 14 * Thomas Kaiser <thomas@kaiser-linux.li> 21 * Thomas Kaiser <thomas@kaiser-linux.li> and 63 MODULE_DESCRIPTION("GSPCA/Mars-Semi MR97310A USB Camera Driver"); 67 static int force_sensor_type = -1; 69 MODULE_PARM_DESC(force_sensor_type, "Force sensor type (-1 (auto), 0 or 1)"); 122 /* the bytes to write are in gspca_dev->usb_buf */ 127 rc = usb_bulk_msg(gspca_dev->dev, in mr_write() 128 usb_sndbulkpipe(gspca_dev->dev, 4), in mr_write() 129 gspca_dev->usb_buf, len, NULL, 500); in mr_write() [all …]
|
/linux/drivers/platform/x86/x86-android-tablets/ |
H A D | lenovo.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * Copyright (C) 2021-2023 Hans de Goede <hdegoede@redhat.com> 27 #include "shared-psy-info.h" 28 #include "x86-android-tablets.h" 33 * The Android kernels have a hack in the i915 driver to write a non-standard 34 * panel specific DSI register to set the duty-cycle of the LCD's PWM output. 46 * But on some models the panel's PWM output defaults to a duty-cycle of 65 PROPERTY_ENTRY_U32("hid-descr-addr", 0x0001), 66 PROPERTY_ENTRY_U32("post-reset-deassert-delay-ms", 150), 75 * The HiDeep IST940E touchscreen comes up in I2C-HID mode. The native protocol [all …]
|
/linux/drivers/acpi/ |
H A D | battery.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * battery.c - ACPI Battery Driver (Revision: 2.0) 6 * Copyright (C) 2004-2007 Vladimir Lebedev <vladimir.p.lebedev@intel.com> 79 * Pre-2010 and 2012 models appear to always report in mWh and 81 * and x230). Also, in mid-2012 Lenovo issued a BIOS update for 83 * post-1.29 BIOS), but as of Nov. 2012, no such update is 134 return battery->device->status.battery_present; in acpi_battery_present() 139 if (!strcasecmp("NiCd", battery->type)) in acpi_battery_technology() 141 if (!strcasecmp("NiMH", battery->type)) in acpi_battery_technology() 143 if (!strcasecmp("LION", battery->type)) in acpi_battery_technology() [all …]
|