/linux/Documentation/devicetree/bindings/power/supply/ |
H A D | summit,smb347-charger.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/power/supply/summit,smb347-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - David Heidelberg <david@ixit.cz> 11 - Dmitry Osipenko <digetx@gmail.com> 16 - summit,smb345 17 - summit,smb347 18 - summit,smb358 26 monitored-battery: true [all …]
|
H A D | qcom,pm8941-charger.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/qcom,pm8941-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Qualcomm Switch-Mode Battery Charger and Boost 10 - Sebastian Reichel <sre@kernel.org> 15 - qcom,pm8226-charger 16 - qcom,pm8941-charger 23 - description: charge done 24 - description: charge fast mode [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 | 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 15 portable applications. It supports USB BC1.2 port detection, current and 16 voltage regulations in both charging and boost mode. 19 https://www.richtek.com/assets/product_file/RT9471=RT9471D/DS9471D-02.pdf 28 charge-enable-gpios: [all …]
|
/linux/drivers/power/supply/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 5 Say Y here to enable power supply class support. This allows 6 power supply (batteries, AC, USB) monitoring by userspace 15 Say Y here to enable debugging messages for power supply class 35 Say Y here to enable support APM status emulation using 42 Say Y here to enable support for the generic battery driver 57 Say Y here to enable support for the battery charger in the Maxim 64 Say Y here to enable support for the backup battery charger 71 Say Y here to enable support for the power management unit 78 Say Y here to enable support for the power management unit [all …]
|
H A D | ab8500-bm.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 16 * USB/ULPI register offsets 61 * Charger / USB control register offsets 253 /* USB Power Path constants for ab8540 */ 267 * struct ab8500_fg_parameters - Fuel gauge algorithm parameters, in seconds 275 * @accu_charging: FG accumulation time while charging 288 * @pcut_enable: Enable power cut feature in ab8505 317 * struct ab8500_charger_maximization - struct used by the board config. 318 * @use_maxi: Enable maximization for this battery type 331 * struct ab8500_bm_capacity_levels - ab8500 capacity level data [all …]
|
H A D | axp288_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * axp288_charger.c - X-power AXP288 PMIC Charger driver 5 * Copyright (C) 2016-2017 Hans de Goede <hdegoede@redhat.com> 18 #include <linux/usb/otg.h> 134 /* SDP/CDP/DCP USB charging cable notifications */ 160 else if (cc > info->max_cc) in axp288_charger_set_cc() 161 cc = info->max_cc; in axp288_charger_set_cc() 163 reg_val = (cc - CHRG_CCCV_CC_OFFSET) / CHRG_CCCV_CC_LSB_RES; in axp288_charger_set_cc() 167 ret = regmap_update_bits(info->regmap, in axp288_charger_set_cc() 171 info->cc = cc; in axp288_charger_set_cc() [all …]
|
H A D | twl4030_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 #include <linux/usb/otg.h> 73 #define TWL4030_ICHGEOC BIT(4) /* Battery current end-of-charge */ 110 MODULE_PARM_DESC(allow_usb, "Allow USB charge drawing default current"); 115 struct power_supply *usb; member 132 int usb_mode, ac_mode; /* charging mode requested */ 137 /* When setting the USB current we slowly increase the 207 * CGAIN == 0: ICHG = (BCIICHG * 1.7) / (2^10 - 1) - 0.85 208 * CGAIN == 1: ICHG = (BCIICHG * 3.4) / (2^10 - 1) - 1.7 210 * CGAIN == 0: val * 1.6618 - 0.85 * 1000 [all …]
|
H A D | max8925_power.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (c) 2009-2010 Marvell International Ltd. 69 struct power_supply *usb; member 85 static int __set_charger(struct max8925_power_info *info, int enable) in __set_charger() argument 87 struct max8925_chip *chip = info->chip; in __set_charger() 88 if (enable) { in __set_charger() 89 /* enable charger in platform */ in __set_charger() 90 if (info->set_charger) in __set_charger() 91 info->set_charger(1); in __set_charger() 92 /* enable charger */ in __set_charger() [all …]
|
H A D | 88pm860x_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 69 /* bit definitions of Measurement Enable 1 Register */ 72 /* bit definitions of Measurement Enable 3 Register */ 86 /* over-temperature on PM8606 setting */ 90 /* over-voltage protect on vchg setting mv */ 102 struct power_supply *usb; member 107 unsigned online:1; /* usb charger */ 113 "battery-monitor", 121 ret = pm860x_bulk_read(info->i2c, PM8607_VCHG_MEAS1, 2, buf); in measure_vchg() 129 dev_dbg(info->dev, "%s, vchg: %d mv\n", __func__, *data); in measure_vchg() [all …]
|
H A D | isp1704_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ISP1704 USB Charger Detection driver 6 * Copyright (C) 2012 - 2013 Pali Rohár <pali@kernel.org> 22 #include <linux/usb/otg.h> 23 #include <linux/usb/ulpi.h> 24 #include <linux/usb/ch9.h> 25 #include <linux/usb/gadget.h> 63 return usb_phy_io_read(isp->phy, reg); in isp1704_read() 68 return usb_phy_io_write(isp->phy, val, reg); in isp1704_write() 73 gpiod_set_value(isp->enable_gpio, on); in isp1704_charger_set_power() [all …]
|
H A D | test_power.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 * http://downloads.pylone.jp/src/virtual_battery/virtual_battery-0.0.1.tar.bz2 36 static int battery_charge_counter = -1000; 37 static int battery_current = -1600; 52 val->intval = ac_online; in test_power_get_ac_property() 55 return -EINVAL; in test_power_get_ac_property() 66 val->intval = usb_online; in test_power_get_usb_property() 69 return -EINVAL; in test_power_get_usb_property() 80 val->strval = "Test battery"; in test_power_get_battery_property() 83 val->strval = "Linux"; in test_power_get_battery_property() [all …]
|
H A D | qcom_smbx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. 7 * This driver is for the switch-mode battery charger and boost 12 #include <linux/devm-helpers.h> 26 /* clang-format off */ 352 /* clang-format on */ 372 * struct smb_chip - smb chip structure 379 * @cable_irq: USB plugin IRQ 419 rc = regmap_read(chip->regmap, chip->base + POWER_PATH_STATUS, &stat); in smb_get_prop_usb_online() 421 dev_err(chip->dev, "Couldn't read power path status: %d\n", rc); in smb_get_prop_usb_online() [all …]
|
H A D | rk817_charger.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <linux/devm-helpers.h> 20 /* Charging statuses reported by hardware register */ 33 * Max charging current read to/written from hardware register. 68 * soc - state of charge - like the BSP this is stored as a percentage, 143 return -EINVAL; in rk817_chg_cur_to_reg() 166 return -EINVAL; in rk817_chg_cur_from_reg() 177 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_VCALIB0_H, in rk817_bat_calib_vol() 181 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_VCALIB1_H, in rk817_bat_calib_vol() 186 charger->voltage_k = (4025 - 2300) * 1000 / in rk817_bat_calib_vol() [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 37 Valid values: "Battery", "UPS", "Mains", "USB", "Wireless" 39 **Battery and USB properties** 43 Contact: linux-pm@vger.kernel.org 52 USB: 61 used for discharging batteries, positive values for charging 62 batteries and for USB IBUS current. [all …]
|
H A D | sysfs-platform-asus-wmi | 6 Change CPU clock configuration (write-only). 9 * 0 -> Super Performance Mode 10 * 1 -> High Performance Mode 11 * 2 -> Power Saving Mode 47 * 0 - normal, 48 * 1 - overboost, 49 * 2 - silent 57 * 0 - default, 58 * 1 - overboost, 59 * 2 - silent [all …]
|
/linux/drivers/platform/x86/lenovo/ |
H A D | yoga-tab2-pro-1380-fastcharger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Support for the custom fast charging protocol found on the Lenovo Yoga 26 #define YT2_1380_FC_PDEV_NAME "lenovo-yoga-tab2-pro-1380-fastcharger" 28 #define YT2_1380_FC_SERDEV_NAME "serial0-0" 29 #define YT2_1380_FC_EXTCON_NAME "i2c-lc824206xa" 49 static int yt2_1380_fc_set_gpio_mode(struct yt2_1380_fc *fc, bool enable) in yt2_1380_fc_set_gpio_mode() argument 51 struct pinctrl_state *state = enable ? fc->gpio_state : fc->uart_state; in yt2_1380_fc_set_gpio_mode() 54 ret = pinctrl_select_state(fc->pinctrl, state); in yt2_1380_fc_set_gpio_mode() 56 dev_err(fc->dev, "Error %d setting pinctrl state\n", ret); in yt2_1380_fc_set_gpio_mode() 66 return extcon_get_state(fc->extcon, EXTCON_CHG_USB_DCP) > 0; in yt2_1380_fc_dedicated_charger_connected() [all …]
|
/linux/drivers/mfd/ |
H A D | tps65010.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * tps65010 - driver for tps6501x power management chips 6 * Copyright (C) 2004-2005 David Brownell 28 /*-------------------------------------------------------------------------*/ 38 /*-------------------------------------------------------------------------*/ 41 * voltage regulators, lithium ion/polymer battery charging, GPIOs, LEDs, 48 * battery-insert != device-on. 66 unsigned charging:1; member 85 /*-------------------------------------------------------------------------*/ 93 (chgstatus & TPS_CHG_USB) ? " USB" : "", in dbg_chgstat() [all …]
|
/linux/drivers/platform/arm64/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 # EC-like Drivers for aarch64 based devices. 7 bool "ARM64 Platform-Specific Device Drivers" 11 Say Y here to get to see options for platform-specific device drivers 12 for arm64 based devices, primarily EC-like device drivers. 27 Say Y here to enable the EC driver for the (Snapdragon-based) 28 Acer Aspire 1 laptop. The EC handles battery and charging 30 and USB Type-C DP HPD events. 45 Say Y here to enable the EC driver for the Huawei Matebook E Go 46 which is a sc8280xp-based 2-in-1 tablet. The driver handles battery [all …]
|
/linux/arch/arm/boot/dts/st/ |
H A D | ste-href-ab8500.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 #include "ste-ab8500.dtsi" 13 pinctrl-names = "default", "sleep"; 14 pinctrl-0 = <&usb_a_1_default>; 15 pinctrl-1 = <&usb_a_1_sleep>; 20 regulator-name = "V-DISPLAY"; 24 regulator-name = "V-eMMC1"; 28 regulator-name = "V-MMC-SD"; 32 regulator-name = "V-INTCORE"; 36 regulator-name = "V-TVOUT"; [all …]
|
H A D | ste-href-ab8505.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 #include "ste-ab8505.dtsi" 13 pinctrl-names = "default", "sleep"; 14 pinctrl-0 = <&usb_a_1_default>; 15 pinctrl-1 = <&usb_a_1_sleep>; 20 regulator-name = "V-DISPLAY"; 24 regulator-name = "V-eMMC1"; 28 regulator-name = "V-MMC-SD"; 32 regulator-name = "V-INTCORE"; 36 regulator-name = "V-TVOUT"; [all …]
|
/linux/drivers/extcon/ |
H A D | extcon-intel-cht-wc.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Copyright (C) 2013-2015 Intel Corporation. All rights reserved. 10 #include <linux/extcon-provider.h> 22 #include <linux/usb/role.h> 24 #include "extcon-intel.h" 67 /* 0 - open drain, 1 - regular push-pull output */ 69 /* 0 - pin is controlled by SW, 1 - by HW */ 125 * According to the spec. we should read the USB-ID pin ADC value here in cht_wc_extcon_get_id() 126 * to determine the resistance of the used pull-down resister and then in cht_wc_extcon_get_id() 129 * a combination of a charging port with one or more USB-A ports, so in cht_wc_extcon_get_id() [all …]
|
H A D | extcon-lc824206xa.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ON Semiconductor LC824206XA Micro USB Switch driver 8 * (ENA2222-D.PDF), but no full datasheet. So there is no documentation 11 * This driver is based on the register info from the extcon-fsa9285.c driver, 22 #include <linux/extcon-provider.h> 57 /* 5 bits? ADC 0x10 GND, 0x1a-0x1f ACA, 0x1f float */ 82 * auto-reset to 0, so these must be set to 0 manually after clearing. 139 ret = i2c_smbus_read_byte_data(data->client, reg); in lc824206xa_read_reg() 141 dev_err(&data->client->dev, "Error %d reading reg 0x%02x\n", ret, reg); in lc824206xa_read_reg() 150 ret = i2c_smbus_write_byte_data(data->client, reg, val); in lc824206xa_write_reg() [all …]
|
/linux/Documentation/devicetree/bindings/mfd/ |
H A D | mediatek,mt6357.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Flora Fu <flora.fu@mediatek.com> 11 - Alexandre Mergnat <amergnat@baylibre.com> 16 USB battery charging, fuel gauge, RTC 19 - Regulator 20 - RTC 21 - Keys 35 interrupt-controller: true [all …]
|
/linux/include/linux/platform_data/x86/ |
H A D | asus-wmi.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 67 /* This can only be used to disable the screen, not re-enable */ 69 /* Writing a brightness re-enables the screen if disabled */ 116 /* Maximum charging percentage */ 122 /* Charging mode - 1=Barrel, 2=USB */ 180 return -ENODEV; in asus_wmi_set_devstate() 185 return -ENODEV; in asus_wmi_evaluate_method() 189 /* To be used by both hid-asus and asus-wmi to determine which controls kbd_brightness */
|