Home
last modified time | relevance | path

Searched +full:usb +full:- +full:charger (Results 1 – 25 of 258) sorted by relevance

1234567891011

/OK3568_Linux_fs/kernel/drivers/power/supply/
H A Dda9150-charger.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * DA9150 Charger Driver
19 #include <linux/usb/phy.h>
29 struct power_supply *usb; member
44 static inline int da9150_charger_supply_online(struct da9150_charger *charger, in da9150_charger_supply_online() argument
48 val->intval = (psy == charger->supply_online) ? 1 : 0; in da9150_charger_supply_online()
53 /* Charger Properties */
54 static int da9150_charger_vbus_voltage_now(struct da9150_charger *charger, in da9150_charger_vbus_voltage_now() argument
59 /* Read processed value - mV units */ in da9150_charger_vbus_voltage_now()
60 ret = iio_read_channel_processed(charger->vbus_chan, &v_val); in da9150_charger_vbus_voltage_now()
[all …]
H A Dab8500_charger.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2012
5 * Charger driver for AB8500
31 #include <linux/mfd/abx500/ab8500-bm.h>
33 #include <linux/usb/otg.h>
37 /* Charger constants */
92 /* Lowest charger voltage is 3.39V -> 0x4E */
105 /*External charger control*/
110 /* UsbLineStatus register - usb types */
172 * struct ab8500_charger_interrupts - ab8500 interupts
[all …]
H A DKconfig1 # 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.
55 tristate "MAX8925 battery charger support"
58 Say Y here to enable support for the battery charger in the Maxim
62 tristate "WM831X backup battery charger support"
65 Say Y here to enable support for the backup battery charger
94 tristate "ADP5061 battery charger driver"
99 charger.
[all …]
H A Dcros_usbpd-charger.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Power supply driver for ChromeOS EC based USB PD Charger.
5 * Copyright (c) 2014 - 2018 Google, Inc
25 #define DRV_NAME "cros-usbpd-charger"
41 struct charger_data *charger; member
92 return port->port_number >= port->charger->num_usbpd_ports; in cros_usbpd_charger_port_is_dedicated()
95 static int cros_usbpd_charger_ec_command(struct charger_data *charger, in cros_usbpd_charger_ec_command() argument
103 struct cros_ec_dev *ec_dev = charger->ec_dev; in cros_usbpd_charger_ec_command()
109 return -ENOMEM; in cros_usbpd_charger_ec_command()
111 msg->version = version; in cros_usbpd_charger_ec_command()
[all …]
H A Dmp2629_charger.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * MP2629 battery charger driver
83 struct power_supply *usb; member
148 "mp2629-batt-volt",
149 "mp2629-system-volt",
150 "mp2629-input-volt",
151 "mp2629-batt-current",
152 "mp2629-input-current",
155 static int mp2629_read_adc(struct mp2629_charger *charger, in mp2629_read_adc() argument
162 ret = iio_read_channel_processed(charger->iiochan[ch], &chval); in mp2629_read_adc()
[all …]
H A Disp1704_charger.c1 // 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 Dabx500_chargalg.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2012
32 #include <linux/mfd/abx500/ab8500-bm.h>
38 /* End-of-charge criteria counter */
177 * struct abx500_charge_curr_maximization - Charger maximization parameters
178 * @original_iset: the non optimized/maximised charger current
182 * @condition_cnt: number of iterations needed before a new charger current
184 * @max_current: maximum charger current
185 * @wait_cnt: to avoid too fast current step down in case of charger
208 * struct abx500_chargalg - abx500 Charging algorithm device information
[all …]
H A Dpda_power.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * power supplies (AC/USB) connected to main and backup batteries,
5 * and optional builtin charger.
20 #include <linux/usb/otg.h>
24 return IRQF_SHARED | (res->flags & IRQF_TRIGGER_MASK); in get_irq_flags()
48 static int new_ac_status = -1;
49 static int new_usb_status = -1;
50 static int ac_status = -1;
51 static int usb_status = -1;
59 if (psy->desc->type == POWER_SUPPLY_TYPE_MAINS) in pda_power_get_property()
[all …]
H A Dgpio-charger.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
18 #include <linux/power/gpio-charger.h>
31 struct power_supply *charger; member
44 struct power_supply *charger = devid; in gpio_charger_irq() local
46 power_supply_changed(charger); in gpio_charger_irq()
59 int ndescs = gpio_charger->current_limit_gpios->ndescs; in set_charge_current_limit()
60 struct gpio_desc **gpios = gpio_charger->current_limit_gpios->desc; in set_charge_current_limit()
63 if (!gpio_charger->current_limit_map_size) in set_charge_current_limit()
64 return -EINVAL; in set_charge_current_limit()
[all …]
/OK3568_Linux_fs/kernel/drivers/usb/phy/
H A Dphy.c1 // SPDX-License-Identifier: GPL-2.0+
3 * phy.c -- USB phy handling
5 * Copyright (C) 2004-2013 Texas Instruments
15 #include <linux/usb/phy.h>
17 /* Default current range by charger type. */
51 if (phy->type != type) in __usb_find_phy()
57 return ERR_PTR(-ENODEV); in __usb_find_phy()
65 return ERR_PTR(-ENODEV); in __of_usb_find_phy()
68 if (node != phy->dev->of_node) in __of_usb_find_phy()
74 return ERR_PTR(-EPROBE_DEFER); in __of_usb_find_phy()
[all …]
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/power/supply/
H A Dgpio-charger.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/power/supply/gpio-charger.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Sebastian Reichel <sre@kernel.org>
19 const: gpio-charger
21 charger-type:
23 - unknown
24 - battery
25 - ups
[all …]
H A Dtps65217_charger.txt1 TPS65217 Charger
4 -compatible: "ti,tps65217-charger"
5 -interrupts: TPS65217 interrupt numbers for the AC and USB charger input change.
6 Should be <0> for the USB charger and <1> for the AC adapter.
7 -interrupt-names: Should be "USB" and "AC"
13 tps65217-charger {
14 compatible = "ti,tps65217-charger";
16 interrupt-names = "USB", "AC";
H A Dlp8727_charger.txt1 Binding for TI/National Semiconductor LP8727 Charger
4 - compatible: "ti,lp8727"
5 - reg: I2C slave address 27h
8 - interrupts: interrupt specifier (see interrupt binding[0])
9 - debounce-ms: interrupt debounce time. (u32)
11 AC and USB charging parameters
12 - charger-type: "ac" or "usb" (string)
13 - eoc-level: value of 'enum lp8727_eoc_level' (u8)
14 - charging-current: value of 'enum lp8727_ichg' (u8)
16 [0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
[all …]
H A Dcharger-manager.txt1 charger-manager bindings
5 - compatible : "charger-manager"
6 - <>-supply : for regulator consumer, named according to cm-regulator-name
7 - cm-chargers : name of chargers
8 - cm-fuel-gauge : name of battery fuel gauge
9 - subnode <regulator> :
10 - cm-regulator-name : name of charger regulator
11 - subnode <cable> :
12 - cm-cable-name : name of charger cable - one of USB, USB-HOST,
13 SDP, DCP, CDP, ACA, FAST-CHARGER, SLOW-CHARGER, WPT,
[all …]
H A Dbq24190.txt1 TI BQ24190 Li-Ion Battery Charger
4 - compatible: contains one of the following:
9 - reg: integer, I2C address of the charger.
10 - interrupts[-extended]: configuration for charger INT pin.
13 - monitored-battery: phandle of battery characteristics devicetree node
14 The charger uses the following battery properties:
15 + precharge-current-microamp: maximum charge current during precharge
17 + charge-term-current-microamp: a charge cycle terminates when the
21 - ti,system-minimum-microvolt: when power is connected and the battery is below
25 - usb-otg-vbus:
[all …]
H A Dbq2415x.txt1 Binding for TI bq2415x Li-Ion Charger
4 - compatible: Should contain one of the following:
17 - reg: integer, i2c address of the device.
18 - ti,current-limit: integer, initial maximum current charger can pull
20 - ti,weak-battery-voltage: integer, weak battery voltage threshold in mV.
23 - ti,battery-regulation-voltage: integer, maximum charging voltage in mV.
24 - ti,charge-current: integer, maximum charging current in mA.
25 - ti,termination-current: integer, charge will be terminated when current in
26 constant-voltage phase drops below this value (in mA).
27 - ti,resistor-sense: integer, value of sensing resistor in milliohm.
[all …]
H A Dmax8903-charger.txt1 Maxim Semiconductor MAX8903 Battery Charger bindings
4 - compatible: "maxim,max8903" for MAX8903 Battery Charger
5 - dok-gpios: Valid DC power has been detected (active low, input), optional if uok-gpios is provided
6 - uok-gpios: Valid USB power has been detected (active low, input), optional if dok-gpios is provid…
9 - cen-gpios: Charge enable pin (active low, output)
10 - chg-gpios: Charger status pin (active low, input)
11 - flt-gpios: Fault pin (active low, output)
12 - dcm-gpios: Current limit mode setting (DC=1 or USB=0, output)
13 - usus-gpios: USB suspend pin (active high, output)
18 max8903-charger {
[all …]
/OK3568_Linux_fs/kernel/Documentation/ABI/testing/
H A Dusb-charger-uevent1 What: Raise a uevent when a USB charger is inserted or removed
2 Date: 2020-01-14
4 Contact: linux-usb@vger.kernel.org
5 Description: There are two USB charger states:
7 - USB_CHARGER_ABSENT
8 - USB_CHARGER_PRESENT
10 There are five USB charger types:
13 USB_CHARGER_UNKNOWN_TYPE Charger type is unknown
20 https://www.usb.org/document-library/battery-charging-v12-spec-and-adopters-agreement
22 Here are two examples taken using ``udevadm monitor -p`` when
[all …]
H A Dsysfs-class-power5 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:
62 batteries and for USB IBUS current.
66 Contact: linux-pm@vger.kernel.org
[all …]
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mfd/
H A Dab8500.txt1 * AB8500 Multi-Functional Device (MFD)
4 - compatible : contains "stericsson,ab8500" or "stericsson,ab8505";
5 - interrupts : contains the IRQ line for the AB8500
6 - interrupt-controller : describes the AB8500 as an Interrupt Controller (has its own domain)
7 - #interrupt-cells : should be 2, for 2-cell format
8 - The first cell is the AB8500 local IRQ number
9 - The second cell is used to specify optional parameters
10 - bits[3:0] trigger type and level flags:
11 1 = low-to-high edge triggered
12 2 = high-to-low edge triggered
[all …]
H A Dmax14577.txt1 Maxim MAX14577/77836 Multi-Function Device
3 MAX14577 is a Multi-Function Device with Micro-USB Interface Circuit, Li+
4 Battery Charger and SFOUT LDO output for powering USB devices. It is
13 - compatible : Must be "maxim,max14577" or "maxim,max77836".
14 - reg : I2C slave address for the max14577 chip (0x25 for max14577/max77836)
15 - interrupts : IRQ line for the chip.
19 - charger :
20 Node for configuring the charger driver.
22 - compatible : "maxim,max14577-charger"
23 or "maxim,max77836-charger"
[all …]
/OK3568_Linux_fs/kernel/drivers/power/
H A Duniversal_charger.c2 * universal charger driver
62 struct extcon_dev *edev = cg->cable_edev; in universal_cg_bc_evt_worker()
63 enum charger_t charger = USB_TYPE_UNKNOWN_CHARGER; in universal_cg_bc_evt_worker() local
64 const char *event[5] = {"UN", "NONE", "USB", "AC", "CDP1.5A"}; in universal_cg_bc_evt_worker()
66 /* Determine cable/charger type */ in universal_cg_bc_evt_worker()
68 charger = USB_TYPE_USB_CHARGER; in universal_cg_bc_evt_worker()
70 charger = USB_TYPE_AC_CHARGER; in universal_cg_bc_evt_worker()
72 charger = USB_TYPE_CDP_CHARGER; in universal_cg_bc_evt_worker()
74 charger = USB_TYPE_NONE_CHARGER; in universal_cg_bc_evt_worker()
76 charger = USB_TYPE_NONE_CHARGER; in universal_cg_bc_evt_worker()
[all …]
H A Dsy6982c_charger.c2 * sy6982c/sy6982e charger driver
63 struct extcon_dev *edev = cg->cable_edev; in sy6982c_cg_bc_evt_worker()
64 enum charger_t charger = USB_TYPE_UNKNOWN_CHARGER; in sy6982c_cg_bc_evt_worker() local
65 const char *event[5] = {"UN", "NONE", "USB", "AC", "CDP1.5A"}; in sy6982c_cg_bc_evt_worker()
67 /* Determine cable/charger type */ in sy6982c_cg_bc_evt_worker()
69 charger = USB_TYPE_USB_CHARGER; in sy6982c_cg_bc_evt_worker()
71 charger = USB_TYPE_AC_CHARGER; in sy6982c_cg_bc_evt_worker()
73 charger = USB_TYPE_CDP_CHARGER; in sy6982c_cg_bc_evt_worker()
75 charger = USB_TYPE_NONE_CHARGER; in sy6982c_cg_bc_evt_worker()
77 charger = USB_TYPE_NONE_CHARGER; in sy6982c_cg_bc_evt_worker()
[all …]
/OK3568_Linux_fs/kernel/include/linux/mfd/wm8350/
H A Dsupply.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * supply.h -- Power Supply Driver for Wolfson WM8350 PMIC
15 * Charger registers
22 * R168 (0xA8) - Battery Charger Control 1
39 * R169 (0xA9) - Battery Charger Control 2
54 * R170 (0xAA) - Battery Charger Control 3
61 * Charger Interrupts
75 * Charger Policy
84 #define WM8350_CHG_EOC_mA(x) (((x - 10) & 0x7) << 10)
104 * Policy to control charger state machine.
[all …]
/OK3568_Linux_fs/kernel/include/linux/mfd/abx500/
H A Dab8500-bm.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright ST-Ericsson 2012.
22 * USB/ULPI register offsets
30 * Charger / status register offfsets
41 * Charger / control register offfsets
58 * Charger / main control register offsets
67 * Charger / USB control register offsets
266 /* USB Power Path constants for ab8540 */
277 * struct res_to_temp - defines one point in a temp to res curve. To
289 * struct batres_vs_temp - defines one point in a temp vs battery internal
[all …]

1234567891011