/Linux-v6.1/Documentation/devicetree/bindings/power/supply/ |
D | mediatek,mt6370-charger.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/power/supply/mediatek,mt6370-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: MediaTek MT6370 Battery Charger 10 - ChiaEn Wu <chiaen_wu@richtek.com> 14 Provides Battery Charger, Boost for OTG devices and BC1.2 detection. 18 const: mediatek,mt6370-charger 22 Specify what irqs are needed to be handled by MT6370 Charger driver. 23 We need to use the IRQ "MT6370_IRQ_OVPCTRL_UVP_D" to know when USB [all …]
|
D | bq2415x.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Binding for 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 …]
|
D | mt6360_charger.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Battery charger driver for MT6360 PMIC from MediaTek Integrated. 10 - Gene Chen <gene_chen@richtek.com> 14 Provides Battery Charger, Boost for OTG devices and BC1.2 detection. 18 const: mediatek,mt6360-chg 20 richtek,vinovp-microvolt: 25 usb-otg-vbus-regulator: 31 - compatible [all …]
|
D | isp1704.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Binding for NXP ISP1704 USB Charger Detection 11 - Sebastian Reichel <sre@kernel.org> 14 - $ref: power-supply.yaml# 20 nxp,enable-gpio: 24 usb-phy: 26 description: USB PHY the ISP1704 is connected to 29 - compatible [all …]
|
D | bq24257.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Binding for 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-v6.1/drivers/phy/ti/ |
D | phy-tusb1210.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * tusb1210.c - TUSB1210 USB ULPI PHY driver 41 /* TUSB1210 charger detection work states */ 67 struct power_supply *charger; member 75 ret = ulpi_write(tusb->ulpi, reg, val); in tusb1210_ulpi_write() 77 dev_err(&tusb->ulpi->dev, "error %d writing val 0x%02x to reg 0x%02x\n", in tusb1210_ulpi_write() 87 ret = ulpi_read(tusb->ulpi, reg); in tusb1210_ulpi_read() 92 dev_err(&tusb->ulpi->dev, "error %d reading reg 0x%02x\n", ret, reg); in tusb1210_ulpi_read() 102 gpiod_set_value_cansleep(tusb->gpio_reset, 1); in tusb1210_power_on() 103 gpiod_set_value_cansleep(tusb->gpio_cs, 1); in tusb1210_power_on() [all …]
|
/Linux-v6.1/drivers/extcon/ |
D | extcon-axp288.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * extcon-axp288.c - X-Power AXP288 PMIC extcon cable detection driver 5 * Copyright (c) 2017-2018 Hans de Goede <hdegoede@redhat.com> 19 #include <linux/extcon-provider.h> 22 #include <linux/usb/role.h> 26 #include <asm/intel-family.h> 53 /* BC USB status register */ 118 "Last wake caused by a charger insertion", 137 ret = regmap_read(info->regmap, AXP288_PS_BOOT_REASON_REG, &val); in axp288_extcon_log_rsi() 139 dev_err(info->dev, "failed to read reset source indicator\n"); in axp288_extcon_log_rsi() [all …]
|
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 11 host USB ports. Many of 30-pin connectors including PDMI are 25 tristate "X-Power AXP288 EXTCON support" 29 Say Y here to enable support for USB peripheral detection 30 and USB MUX switching by X-Power AXP288 PMIC. 39 FSA9480 microUSB switch and accessory detector chip. The FSA9480 is a USB 41 I2C and enables USB data, stereo and mono audio, video, microphone 55 Say Y here to enable extcon support for USB OTG ports controlled by 67 Say Y here to enable extcon support for charger detection / control 74 Say Y here to enable extcon support for charger detection / control [all …]
|
D | extcon-intel-cht-wc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Extcon charger detection driver for Intel Cherrytrail Whiskey Cove PMIC 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() [all …]
|
/Linux-v6.1/drivers/power/supply/ |
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 6 power supply (batteries, AC, USB) monitoring by userspace 37 one or two external power supplies (AC/USB) connected to main and 38 backup batteries, and optional builtin charger. 60 which include a battery charger and a boost converter. 63 tristate "MAX8925 battery charger support" 66 Say Y here to enable support for the battery charger in the Maxim 70 tristate "WM831X backup battery charger support" 73 Say Y here to enable support for the backup battery charger 102 tristate "ADP5061 battery charger driver" [all …]
|
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 …]
|
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 87 struct max8925_chip *chip = info->chip; 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() 93 max8925_set_bits(info->gpm, MAX8925_CHG_CNTL1, 1 << 7, 0); in __set_charger() 96 max8925_set_bits(info->gpm, MAX8925_CHG_CNTL1, 1 << 7, 1 << 7); in __set_charger() [all …]
|
D | ab8500_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 5 * Charger driver for AB8500 32 #include <linux/usb/otg.h> 36 #include "ab8500-bm.h" 37 #include "ab8500-chargalg.h" 39 /* Charger constants */ 94 /* Lowest charger voltage is 3.39V -> 0x4E */ 107 /*External charger control*/ 112 /* UsbLineStatus register - usb types */ [all …]
|
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 …]
|
D | max14577_charger.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // max14577_charger.c - Battery charger driver for the Maxim 14577/77836 11 #include <linux/mfd/max14577-private.h> 17 struct power_supply *charger; member 49 struct regmap *rmap = chg->max14577->regmap; in max14577_get_charger_state() 55 * - CHGCTRL2/MBCHOSTEN == 1 in max14577_get_charger_state() 56 * - STATUS2/CGMBC == 1 in max14577_get_charger_state() 59 * - handle FULL after Top-off timer (EOC register may be off in max14577_get_charger_state() 60 * and the charger won't be charging although MBCHOSTEN is on) in max14577_get_charger_state() 61 * - handle properly dead-battery charging (respect timer) in max14577_get_charger_state() [all …]
|
D | rt9455_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Driver for Richtek RT9455WSC battery charger. 17 #include <linux/usb/phy.h> 22 #define RT9455_DRIVER_NAME "rt9455-charger" 166 #define GET_MASK(fid) (BIT(rt9455_reg_fields[fid].msb + 1) - \ 170 * Each array initialised below shows the possible real-world values for a 172 * ascending order. The index of each real-world value represents the value 181 * When the charger is in charge mode, REG02[7:2] represent battery regulation 197 * When the charger is in boost mode, REG02[7:2] represent boost output 237 struct power_supply *charger; member [all …]
|
D | max14656_charger_detector.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Maxim MAX14656 / AL32 USB Charger Detector driver 8 * Components from Maxim AL32 Charger detection Driver for MX50 Yoshi Board 21 #include <linux/devm-helpers.h> 95 dev_err(&client->dev, in max14656_read_reg() 110 dev_err(&client->dev, in max14656_write_reg() 125 dev_err(&client->dev, "failed to block read reg 0x%x: %d\n", in max14656_read_block_reg() 142 max14656_read_block_reg(chip->client, MAX14656_DEVICE_ID, in max14656_irq_worker() 149 chip->psy_desc.type = chg_type_props[chg_type].type; in max14656_irq_worker() 151 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_irq_worker() [all …]
|
/Linux-v6.1/drivers/usb/common/ |
D | usb-conn-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * USB GPIO Based Connection Detection Driver 9 * Some code borrowed from drivers/extcon/extcon-usb-gpio.c 22 #include <linux/usb/role.h> 44 struct power_supply *charger; member 54 * ------------------------------------ 61 * - VBUS only - we want to distinguish between [1] and [2], so ID is always 1 62 * - ID only - we want to distinguish between [1] and [4], so VBUS = ID 74 id = info->id_gpiod ? in usb_conn_detect_cable() 75 gpiod_get_value_cansleep(info->id_gpiod) : 1; in usb_conn_detect_cable() [all …]
|
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 8 bool "USB LED Triggers" 11 This option adds LED triggers for USB host and/or gadget activity. 13 Say Y here if you are working on a system with led-class supported 14 LEDs and you want to use them as activity indicators for USB host or 18 tristate "USB ULPI PHY interface support" 22 USB 2.0 PHY interface. The ULPI specification defines a standard set 27 The ULPI interfaces (the buses) are registered by the drivers for USB 33 protocol) and USB charger detection. 39 tristate "USB GPIO Based Connection Detection Driver" [all …]
|
/Linux-v6.1/drivers/phy/rockchip/ |
D | phy-rockchip-inno-usb2.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 #include <linux/clk-provider.h> 11 #include <linux/extcon-provider.h> 28 #include <linux/usb/of.h> 29 #include <linux/usb/otg.h> 49 * enum usb_chg_state - Different states involved in USB charger detection. 50 * @USB_CHG_STATE_UNDEFINED: USB charger is not connected or detection 54 * @USB_CHG_STATE_PRIMARY_DONE: Primary detection is completed (Detects 56 * @USB_CHG_STATE_SECONDARY_DONE: Secondary detection is completed (Detects 58 * @USB_CHG_STATE_DETECTED: USB charger type is determined. [all …]
|
/Linux-v6.1/include/linux/usb/ |
D | phy.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * USB PHY defines 5 * These APIs may be used between USB controllers. USB device drivers 15 #include <linux/usb.h> 16 #include <uapi/linux/usb/charger.h> 31 USB_EVENT_CHARGER, /* usb dedicated charger */ 46 /* single-role peripheral, and dual-role default-b */ 51 /* extra dual-role default-b states */ 55 /* dual-role default-a */ 109 /* Support USB charger */ [all …]
|
D | tcpm.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Copyright 2015-2017 Google, Inc 10 #include <linux/usb/typec.h> 54 #define TCPC_MUX_USB_ENABLED BIT(0) /* USB enabled */ 59 * struct tcpc_dev - Port configuration and callback functions 64 * and cc=Rp-def. This allows the tcpm to provide a fallback 65 * current-limit detection method for the cc=Rp-def case. 66 * For example, some tcpcs may include BC1.2 charger detection 82 * Optional; if supported by hardware, called to start dual-role 83 * toggling or single-role connection detection. Toggling stops [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/mfd/ |
D | stericsson,ab8500.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: ST-Ericsson Analog Baseband AB8500 and AB8505 10 - Linus Walleij <linus.walleij@linaro.org> 13 the AB8500 "Analog Baseband" is the mixed-signals integrated circuit 14 handling power management (regulators), analog-to-digital conversion 15 (ADC), battery charging, fuel gauging of the battery, battery-backed 16 RTC, PWM, USB PHY and some GPIO lines in the ST-Ericsson U8500 platforms 20 AB8505 also exist, the difference in AB8505 is that some of the USB and [all …]
|
D | ricoh,rn5t618.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Andreas Kemnade <andreas@kemnade.info> 14 integrates 3 to 5 step-down DCDC converters, 7 to 10 low-dropout regulators, 16 The RN5T618/RC5T619 provides additionally a Li-ion battery charger, 18 The RC5T619 additionally includes USB charger detection and an RTC. 21 - if: 30 "^(DCDC[1-4]|LDO[1-5]|LDORTC[12])$": 33 - if: [all …]
|
/Linux-v6.1/drivers/usb/chipidea/ |
D | usbmisc_imx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <linux/usb/otg.h> 86 /* For imx6dql, it is host-only controller, for later imx6, it is otg's */ 104 /* The default DM/DP value is pull-down */ 141 /* It's called once when probe a usb device */ 143 /* It's called once after adding a usb device */ 145 /* It's called when we need to enable/disable usb wakeup */ 151 /* usb charger detection */ 165 struct imx_usbmisc *usbmisc = dev_get_drvdata(data->dev); in usbmisc_imx25_init() 169 if (data->index > 1) in usbmisc_imx25_init() [all …]
|