/Linux-v6.1/Documentation/devicetree/bindings/power/supply/ |
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: [all …]
|
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 …]
|
/Linux-v6.1/drivers/power/supply/ |
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> 126 /* OTG/Host mode */ 132 } otg; member 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() [all …]
|
D | smb347-charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 23 #include <dt-bindings/power/summit,smb347-charger.h> 26 #define SMB3XX_SOFT_TEMP_COMPENSATE_DEFAULT -1 29 #define SMB3XX_TEMP_USE_DEFAULT -273 34 * reloaded from non-volatile registers after POR. 136 * struct smb347_charger - smb347 charger instance 149 * @pre_charge_current: current (in uA) to use in pre-charging phase 151 * charging cycle terminates 153 * pre-charge to fast charge mode 158 * current [%100 - %130] (in degree C) [all …]
|
D | isp1704_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (C) 2012 - 2013 Pali Rohár <pali@kernel.org> 22 #include <linux/usb/otg.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() 77 * Determine is the charging port DCP (dedicated charger) or CDP (Host/HUB 80 * REVISIT: The method is defined in Battery Charging Specification and is 103 /* Enable strong pull-up on DP (1.5K) and reset */ in isp1704_charger_type() 138 /* Clear the DP and DM pull-down bits */ in isp1704_charger_verify() [all …]
|
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 …]
|
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 5 Say Y here to enable power supply class support. This allows 15 Say Y here to enable debugging messages for power supply class 36 Say Y here to enable generic power driver for PDAs and phones with 44 Say Y here to enable support APM status emulation using 51 Say Y here to enable support for the generic battery driver 66 Say Y here to enable support for the battery charger in the Maxim 73 Say Y here to enable support for the backup battery charger 80 Say Y here to enable support for the power management unit 87 Say Y here to enable support for the power management unit [all …]
|
D | twl4030_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 20 #include <linux/usb/otg.h> 72 #define TWL4030_ICHGEOC BIT(4) /* Battery current end-of-charge */ 131 int usb_mode, ac_mode; /* charging mode requested */ 206 * CGAIN == 0: ICHG = (BCIICHG * 1.7) / (2^10 - 1) - 0.85 207 * CGAIN == 1: ICHG = (BCIICHG * 3.4) / (2^10 - 1) - 1.7 209 * CGAIN == 0: val * 1.6618 - 0.85 * 1000 210 * CGAIN == 1: (val * 1.6618 - 0.85 * 1000) * 2 218 return (regval * 16618 - 8500 * 1000) / 5; in regval2ua() 220 return (regval * 16618 - 8500 * 1000) / 10; in regval2ua() [all …]
|
D | ab8500_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 32 #include <linux/usb/otg.h> 36 #include "ab8500-bm.h" 37 #include "ab8500-chargalg.h" 94 /* Lowest charger voltage is 3.39V -> 0x4E */ 112 /* UsbLineStatus register - usb types */ 174 * struct ab8500_charger_interrupts - ab8500 interrupts 218 * struct ab8500_charger - ab8500 Charger device information 359 dev_dbg(di->dev, "SW Fallback: %d\n", fallback); in ab8500_enable_disable_sw_fallback() [all …]
|
D | bq25890_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 90 u8 ilim_en; /* enable ILIM pin */ 262 * Most of the val -> idx conversions can be computed, given the minimum, 312 0, -10, -20, -30, -40, -60, -70, -80, 313 -90, -10, -120, -140, -150, -170, -190, -210, 357 ret = regmap_field_read(bq->rmap_fields[field_id], &val); in bq25890_field_read() 367 return regmap_field_write(bq->rmap_fields[field_id], val); in bq25890_field_write() 384 rtbl_size = (rtbl->max - rtbl->min) / rtbl->step + 1; in bq25890_find_idx() 387 idx < rtbl_size && (idx * rtbl->step + rtbl->min <= value); in bq25890_find_idx() 392 return idx - 1; in bq25890_find_idx() [all …]
|
D | mt6360_charger.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/devm-helpers.h> 173 ret = regmap_read(mci->regmap, MT6360_PMU_FOD_STAT, ®val); in mt6360_get_chrdet_ext_stat() 189 val->intval = pwr_rdy ? true : false; in mt6360_charger_get_online() 208 ret = regmap_read(mci->regmap, MT6360_PMU_CHG_STAT, ®val); in mt6360_charger_get_status() 224 ret = -EIO; in mt6360_charger_get_status() 228 val->intval = status; in mt6360_charger_get_status() 239 ret = regmap_read(mci->regmap, MT6360_PMU_CHG_STAT, ®val); in mt6360_charger_get_charge_type() 251 case 0x00: /* Not Charging */ in mt6360_charger_get_charge_type() 259 val->intval = type; in mt6360_charger_get_charge_type() [all …]
|
D | rt9455_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 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 264 for (i = 0; i < tbl_size - 1; i++) in rt9455_find_idx() 268 return (tbl_size - 1); in rt9455_find_idx() 278 ret = regmap_field_read(info->regmap_fields[field], &v); in rt9455_get_field_val() 282 v = (v >= tbl_size) ? (tbl_size - 1) : v; in rt9455_get_field_val() 294 return regmap_field_write(info->regmap_fields[field], idx); in rt9455_set_field_val() [all …]
|
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 …]
|
D | cpcap-charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * Copyright (C) 2009-2010 Motorola, Inc. 29 #include <linux/usb/otg.h> 31 #include <linux/mfd/motorola-cpcap.h> 38 * similar. Also see the Motorola Linux kernel cpcap-regbits.h. CPCAP_REG_CHRGR_1 44 #define CPCAP_REG_CRM_RVRSMODE BIT(12) /* USB VBUS output enable */ 90 * values in "Table 8-3. Charge Path Regulator Current Limit 181 channel = ddata->channels[CPCAP_CHARGER_IIO_VOLTAGE]; in cpcap_charger_get_charge_voltage() 184 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error); in cpcap_charger_get_charge_voltage() 197 channel = ddata->channels[CPCAP_CHARGER_IIO_CHRG_CURRENT]; in cpcap_charger_get_charge_current() [all …]
|
/Linux-v6.1/drivers/usb/phy/ |
D | phy-fsl-usb.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Jerry Huang <Chang-Ming.Huang@freescale.com> 32 #include "phy-fsl-usb.h" 43 #define DRIVER_DESC "Freescale USB OTG Transceiver Driver" 46 static const char driver_name[] = "fsl-usb2-otg"; 109 fsl_writel(temp, &usb_dr_regs->ulpiview); in write_ulpi() 113 /* -------------------------------------------------------------*/ 114 /* Operations that will be called from OTG Finite State Machine */ 121 tmp = fsl_readl(&usb_dr_regs->otgsc) & ~OTGSC_INTSTS_MASK; in fsl_otg_chrg_vbus() 124 /* stop discharging, start charging */ in fsl_otg_chrg_vbus() [all …]
|
D | phy-gpio-vbus-usb.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * gpio-vbus.c - simple GPIO VBUS sensing driver for B peripheral devices 20 #include <linux/usb/otg.h> 47 * some bouncing due to current surges (e.g. charging local capacitance) 60 struct regulator *vbus_draw = gpio_vbus->vbus_draw; in set_vbus_draw() 67 enabled = gpio_vbus->vbus_draw_enabled; in set_vbus_draw() 74 gpio_vbus->vbus_draw_enabled = 1; in set_vbus_draw() 81 gpio_vbus->vbus_draw_enabled = 0; in set_vbus_draw() 84 gpio_vbus->mA = mA; in set_vbus_draw() 89 return gpiod_get_value(gpio_vbus->vbus_gpiod); in is_vbus_powered() [all …]
|
D | phy-mxs-usb.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright 2012-2014 Freescale Semiconductor, Inc. 12 #include <linux/usb/otg.h> 188 { .compatible = "fsl,imx6sx-usbphy", .data = &imx6sx_phy_data, }, 189 { .compatible = "fsl,imx6sl-usbphy", .data = &imx6sl_phy_data, }, 190 { .compatible = "fsl,imx6q-usbphy", .data = &imx6q_phy_data, }, 191 { .compatible = "fsl,imx23-usbphy", .data = &imx23_phy_data, }, 192 { .compatible = "fsl,vf610-usbphy", .data = &vf610_phy_data, }, 193 { .compatible = "fsl,imx6ul-usbphy", .data = &imx6ul_phy_data, }, 194 { .compatible = "fsl,imx7ulp-usbphy", .data = &imx7ulp_phy_data, }, [all …]
|
/Linux-v6.1/arch/arm/boot/dts/ |
D | rk3188-bqedison2qc.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 /dts-v1/; 8 #include <dt-bindings/i2c/i2c.h> 9 #include <dt-bindings/input/input.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 14 model = "BQ Edison2 Quad-Core"; 15 compatible = "mundoreader,bq-edison2qc", "rockchip,rk3188"; 29 compatible = "pwm-backlight"; 30 power-supply = <&vsys>; 34 gpio-keys { [all …]
|
/Linux-v6.1/drivers/mfd/ |
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 27 /*-------------------------------------------------------------------------*/ 37 /*-------------------------------------------------------------------------*/ 40 * voltage regulators, lithium ion/polymer battery charging, GPIOs, LEDs, 47 * battery-insert != device-on. 65 unsigned charging:1; member 84 /*-------------------------------------------------------------------------*/ 97 ? " (charging)" : ""), in dbg_chgstat() [all …]
|
/Linux-v6.1/drivers/phy/ti/ |
D | phy-twl4030-usb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * twl4030_usb - TWL4030 USB transceiver, talking to OMAP OTG controller 5 * Copyright (C) 2004-2007 Texas Instruments 10 * - HS USB ULPI mode works. 11 * - 3-pin mode support may be added in future. 21 #include <linux/usb/otg.h> 137 * cable is present and we need to be runtime-enabled 174 /*-------------------------------------------------------------------------*/ 185 dev_dbg(twl->dev, "Write%d[%d,0x%x] wrote %02x but read %02x\n", in twl4030_i2c_write_u8_verify() 193 dev_dbg(twl->dev, "Write%d[%d,0x%x] wrote %02x but read %02x\n", in twl4030_i2c_write_u8_verify() [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> 29 #include <linux/usb/otg.h> 49 * enum usb_chg_state - Different states involved in USB charger detection. 84 unsigned int enable; member 88 * struct rockchip_chg_det_reg - usb charger detect registers 89 * @cp_det: charging port detected successfully. 90 * @dcp_det: dedicated charging port detected successfully. 114 * struct rockchip_usb2phy_port_cfg - usb-phy port configuration. [all …]
|
/Linux-v6.1/drivers/usb/musb/ |
D | tusb6010.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * TUSB6010 USB 2.0 OTG Dual Role controller 9 * - Driver assumes that interface to external host (main CPU) is 24 #include <linux/dma-mapping.h> 46 void __iomem *tbase = musb->ctrl_base; in tusb_get_revision() 63 void __iomem *tbase = musb->ctrl_base; in tusb_print_revision() 66 rev = musb->tusb_revision; in tusb_print_revision() 91 * Workaround for spontaneous WBUS wake-up issue #2 for tusb3.0. 96 void __iomem *tbase = musb->ctrl_base; in tusb_wbus_quirk() 109 dev_dbg(musb->controller, "Enabled tusb wbus quirk ctrl %08x ena %08x\n", in tusb_wbus_quirk() [all …]
|
/Linux-v6.1/arch/arm/mach-pxa/ |
D | magician.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * i-mate JAM, O2 Xda mini, Orange SPV M500, Qtek s100, Qtek s110 5 * and T-Mobile MDA Compact. 7 * Copyright (c) 2006-2007 Philipp Zabel 20 #include <linux/mfd/htc-pasic3.h> 23 #include <linux/platform_data/gpio-htc-egpio.h> 28 #include <linux/regulator/gpio-regulator.h> 30 #include <linux/platform_data/i2c-pxa.h> 32 #include <asm/mach-types.h> 37 #include "addr-map.h" [all …]
|
/Linux-v6.1/drivers/usb/chipidea/ |
D | usbmisc_imx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <linux/usb/otg.h> 80 /* HSIC enable */ 86 /* For imx6dql, it is host-only controller, for later imx6, it is otg's */ 104 /* The default DM/DP value is pull-down */ 145 /* It's called when we need to enable/disable usb wakeup */ 165 struct imx_usbmisc *usbmisc = dev_get_drvdata(data->dev); in usbmisc_imx25_init() 169 if (data->index > 1) in usbmisc_imx25_init() 170 return -EINVAL; in usbmisc_imx25_init() 172 spin_lock_irqsave(&usbmisc->lock, flags); in usbmisc_imx25_init() [all …]
|
/Linux-v6.1/arch/arm64/boot/dts/freescale/ |
D | imx8mp-msc-sm2s.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 6 /dts-v1/; 9 #include <dt-bindings/net/ti-dp83867.h> 18 stdout-path = &uart2; 21 reg_usb0_host_vbus: regulator-usb0-vbus { 22 compatible = "regulator-fixed"; 23 regulator-name = "usb0_host_vbus"; 24 pinctrl-names = "default"; 25 pinctrl-0 = <&pinctrl_usb0_vbus>; 26 regulator-min-microvolt = <5000000>; [all …]
|