Home
last modified time | relevance | path

Searched +full:enable +full:- +full:otg +full:- +full:charging (Results 1 – 20 of 20) sorted by relevance

/linux/Documentation/devicetree/bindings/power/supply/
H A Dsummit,smb347-charger.yaml1 # 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 …]
H A Drichtek,rt9467.yaml1 # 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 Dqcom,pm8941-charger.yaml1 # 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 Drichtek,rt9471.yaml1 # 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
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:
29 description: GPIO used to turn on and off charging.
[all …]
/linux/drivers/power/supply/
H A Drt5033_charger.c1 // SPDX-License-Identifier: GPL-2.0-only
9 #include <linux/devm-helpers.h>
18 #include <linux/mfd/rt5033-private.h>
38 bool otg; member
45 struct regmap *regmap = charger->regmap; in rt5033_get_charger_state()
71 /* For OTG mode, RT5033 would still report "charging" */ in rt5033_get_charger_state()
72 if (charger->otg) in rt5033_get_charger_state()
80 struct regmap *regmap = charger->regmap; in rt5033_get_charger_type()
102 struct regmap *regmap = charger->regmap; in rt5033_get_charger_current_limit()
118 struct regmap *regmap = charger->regmap; in rt5033_get_charger_const_voltage()
[all …]
H A Daxp288_charger.c1 // 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 …]
H A Dsmb347-charger.c1 // 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 …]
H A Disp1704_charger.c1 // 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 …]
H A Dqcom_smbb.c1 // 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 Dtwl4030_charger.c1 // 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 */
132 int usb_mode, ac_mode; /* charging mode requested */
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
211 * CGAIN == 1: (val * 1.6618 - 0.85 * 1000) * 2
219 return (regval * 16618 - 8500 * 1000) / 5; in regval2ua()
221 return (regval * 16618 - 8500 * 1000) / 10; in regval2ua()
[all …]
H A Dbq25890_charger.c1 // SPDX-License-Identifier: GPL-2.0-or-later
90 u8 ilim_en; /* enable ILIM pin */
113 char name[28]; /* "bq25890-charger-%d" */
272 * Most of the val -> idx conversions can be computed, given the minimum,
322 0, -10, -20, -30, -40, -60, -70, -80,
323 -90, -10, -120, -140, -150, -170, -190, -210,
367 ret = regmap_field_read(bq->rmap_fields[field_id], &val); in bq25890_field_read()
377 return regmap_field_write(bq->rmap_fields[field_id], val); in bq25890_field_write()
394 rtbl_size = (rtbl->max - rtbl->min) / rtbl->step + 1; in bq25890_find_idx()
397 idx < rtbl_size && (idx * rtbl->step + rtbl->min <= value); in bq25890_find_idx()
[all …]
H A Dmt6360_charger.c1 // SPDX-License-Identifier: GPL-2.0
6 #include <linux/devm-helpers.h>
163 ret = regmap_read(mci->regmap, MT6360_PMU_FOD_STAT, &regval); in mt6360_get_chrdet_ext_stat()
179 val->intval = pwr_rdy ? true : false; in mt6360_charger_get_online()
198 ret = regmap_read(mci->regmap, MT6360_PMU_CHG_STAT, &regval); in mt6360_charger_get_status()
214 ret = -EIO; in mt6360_charger_get_status()
218 val->intval = status; in mt6360_charger_get_status()
229 ret = regmap_read(mci->regmap, MT6360_PMU_CHG_STAT, &regval); in mt6360_charger_get_charge_type()
241 case 0x00: /* Not Charging */ in mt6360_charger_get_charge_type()
249 val->intval = type; in mt6360_charger_get_charge_type()
[all …]
H A Drt9455_charger.c1 // SPDX-License-Identifier: GPL-2.0-or-later
21 #define RT9455_DRIVER_NAME "rt9455-charger"
165 #define GET_MASK(fid) (BIT(rt9455_reg_fields[fid].msb + 1) - \
169 * Each array initialised below shows the possible real-world values for a
171 * ascending order. The index of each real-world value represents the value
265 for (i = 0; i < tbl_size - 1; i++) in rt9455_find_idx()
269 return (tbl_size - 1); in rt9455_find_idx()
279 ret = regmap_field_read(info->regmap_fields[field], &v); in rt9455_get_field_val()
283 v = (v >= tbl_size) ? (tbl_size - 1) : v; in rt9455_get_field_val()
295 return regmap_field_write(info->regmap_fields[field], idx); in rt9455_set_field_val()
[all …]
H A Drk817_charger.c1 // 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 …]
H A Dbq24190_charger.c1 // SPDX-License-Identifier: GPL-2.0-only
19 #include <linux/extcon-provider.h>
32 #define BQ24190_REG_POC 0x01 /* Power-On Configuration */
63 #define BQ24190_REG_PCTCC 0x03 /* Pre-charge/Termination Current Cntl */
162 * The tables below provide a 2-way mapping for the value that goes in
163 * the register field and the real-world value that it represents.
165 * number at that index in the array is the real-world value that it
255 int (*set_otg_vbus)(struct bq24190_dev_info *bdi, bool enable);
271 * 'val'. The index range returned is 0 to 'tbl_size' - 1. Assumes that
283 return i - 1; in bq24190_find_idx()
[all …]
/linux/drivers/mfd/
H A Dtps65010.c1 // 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/drivers/extcon/
H A Dextcon-lc824206xa.c1 // SPDX-License-Identifier: GPL-2.0-or-later
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()
152 dev_err(&data->client->dev, "Error %d writing reg 0x%02x\n", ret, reg); in lc824206xa_write_reg()
[all …]
/linux/arch/arm64/boot/dts/freescale/
H A Dimx8mp-msc-sm2s.dtsi1 // 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 …]
/linux/arch/arm/boot/dts/nvidia/
H A Dtegra30-asus-nexus7-grouper-common.dtsi1 // SPDX-License-Identifier: GPL-2.0
3 #include <dt-bindings/input/gpio-keys.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/power/summit,smb347-charger.h>
6 #include <dt-bindings/thermal/thermal.h>
9 #include "tegra30-cpu-opp.dtsi"
10 #include "tegra30-cpu-opp-microvolt.dtsi"
11 #include "tegra30-asus-lvds-display.dtsi"
27 * pre-existing /chosen node to be available to insert the
33 trusted-foundations {
[all …]
/linux/arch/arm/boot/dts/samsung/
H A Dexynos4412-p4note.dtsi1 // SPDX-License-Identifier: GPL-2.0
4 * Based on exynos4412-midas.dtsi.
10 /dts-v1/;
12 #include "exynos4412-ppmu-common.dtsi"
14 #include <dt-bindings/clock/maxim,max77686.h>
15 #include <dt-bindings/gpio/gpio.h>
16 #include <dt-bindings/input/linux-event-codes.h>
17 #include <dt-bindings/interrupt-controller/irq.h>
18 #include <dt-bindings/power/summit,smb347-charger.h>
19 #include "exynos-pinctrl.h"
[all …]