Home
last modified time | relevance | path

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

12345678910>>...20

/kernel/linux/linux-6.6/drivers/power/supply/
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
26 #define DRV_NAME "cros-usbpd-charger"
42 struct charger_data *charger; member
93 return port->port_number >= port->charger->num_usbpd_ports; in cros_usbpd_charger_port_is_dedicated()
96 static int cros_usbpd_charger_ec_command(struct charger_data *charger, in cros_usbpd_charger_ec_command() argument
104 struct cros_ec_dev *ec_dev = charger->ec_dev; in cros_usbpd_charger_ec_command()
110 return -ENOMEM; in cros_usbpd_charger_ec_command()
112 msg->version = version; in cros_usbpd_charger_ec_command()
[all …]
Dact8945a_charger.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Power supply driver for the Active-semi ACT8945A PMIC
19 static const char *act8945a_charger_manufacturer = "Active-semi";
22 * ACT8945A Charger Register Map
209 static int act8945a_get_capacity_level(struct act8945a_charger *charger, in act8945a_get_capacity_level() argument
214 int lbo_level = gpiod_get_value(charger->lbo_gpio); in act8945a_get_capacity_level()
268 * Riset(K) = 2336 * (1V/Ichg(mA)) - 0.205
276 static int act8945a_get_current_max(struct act8945a_charger *charger, in act8945a_get_current_max() argument
282 int chgin_level = gpiod_get_value(charger->chglev_gpio); in act8945a_get_current_max()
346 struct act8945a_charger *charger = power_supply_get_drvdata(psy); in act8945a_charger_get_property() local
[all …]
Dmax8903_charger.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * max8903_charger.c - Maxim 8903 USB/Adapter Charger Driver
27 struct gpio_desc *cen; /* Charger Enable input */
30 struct gpio_desc *chg; /* Charger status output */
32 struct gpio_desc *dcm; /* Current-Limit Mode input (1: DC, 2: USB) */
40 POWER_SUPPLY_PROP_STATUS, /* Charger status output */
53 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in max8903_get_property()
54 if (data->chg) { in max8903_get_property()
55 if (gpiod_get_value(data->chg)) in max8903_get_property()
57 val->intval = POWER_SUPPLY_STATUS_CHARGING; in max8903_get_property()
[all …]
Dab8500_charger.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2012
5 * Charger driver for AB8500
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 */
174 * struct ab8500_charger_interrupts - ab8500 interrupts
[all …]
Dtps65217_charger.c1 // SPDX-License-Identifier: GPL-2.0
2 // Battery charger driver for TI's tps65217
8 * Battery charger driver for TI's tps65217
44 static int tps65217_config_charger(struct tps65217_charger *charger) in tps65217_config_charger() argument
53 * is not recommended to do so. In sleep mode, the charger continues in tps65217_config_charger()
55 * values. Therefore, the charger would get the wrong temperature in tps65217_config_charger()
61 * NTC TYPE (for battery temperature measurement) in tps65217_config_charger()
66 ret = tps65217_clear_bits(charger->tps, TPS65217_REG_CHGCONFIG1, in tps65217_config_charger()
70 dev_err(charger->dev, in tps65217_config_charger()
78 static int tps65217_enable_charging(struct tps65217_charger *charger) in tps65217_enable_charging() argument
[all …]
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 …]
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>
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
88 int type = POWER_SUPPLY_TYPE_USB_DCP; in isp1704_charger_type() local
103 /* Enable strong pull-up on DP (1.5K) and reset */ in isp1704_charger_type()
110 type = POWER_SUPPLY_TYPE_USB_CDP; in isp1704_charger_type()
[all …]
/kernel/linux/linux-5.10/drivers/power/supply/
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 …]
Dact8945a_charger.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Power supply driver for the Active-semi ACT8945A PMIC
19 static const char *act8945a_charger_manufacturer = "Active-semi";
22 * ACT8945A Charger Register Map
209 static int act8945a_get_capacity_level(struct act8945a_charger *charger, in act8945a_get_capacity_level() argument
214 int lbo_level = gpiod_get_value(charger->lbo_gpio); in act8945a_get_capacity_level()
268 * Riset(K) = 2336 * (1V/Ichg(mA)) - 0.205
276 static int act8945a_get_current_max(struct act8945a_charger *charger, in act8945a_get_current_max() argument
282 int chgin_level = gpiod_get_value(charger->chglev_gpio); in act8945a_get_current_max()
346 struct act8945a_charger *charger = power_supply_get_drvdata(psy); in act8945a_charger_get_property() local
[all …]
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>
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
216 * struct ab8500_charger - ab8500 Charger device information
[all …]
Dtps65217_charger.c1 // SPDX-License-Identifier: GPL-2.0
2 // Battery charger driver for TI's tps65217
8 * Battery charger driver for TI's tps65217
45 static int tps65217_config_charger(struct tps65217_charger *charger) in tps65217_config_charger() argument
54 * is not recommended to do so. In sleep mode, the charger continues in tps65217_config_charger()
56 * values. Therefore, the charger would get the wrong temperature in tps65217_config_charger()
62 * NTC TYPE (for battery temperature measurement) in tps65217_config_charger()
67 ret = tps65217_clear_bits(charger->tps, TPS65217_REG_CHGCONFIG1, in tps65217_config_charger()
71 dev_err(charger->dev, in tps65217_config_charger()
79 static int tps65217_enable_charging(struct tps65217_charger *charger) in tps65217_enable_charging() argument
[all …]
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 …]
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>
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
88 int type = POWER_SUPPLY_TYPE_USB_DCP; in isp1704_charger_type() local
103 /* Enable strong pull-up on DP (1.5K) and reset */ in isp1704_charger_type()
110 type = POWER_SUPPLY_TYPE_USB_CDP; in isp1704_charger_type()
[all …]
/kernel/linux/linux-6.6/drivers/usb/phy/
Dphy.c1 // SPDX-License-Identifier: GPL-2.0+
3 * phy.c -- USB phy handling
5 * Copyright (C) 2004-2013 Texas Instruments
17 /* Default current range by charger type. */
52 enum usb_phy_type type) in __usb_find_phy() argument
57 if (phy->type != type) in __usb_find_phy()
63 return ERR_PTR(-ENODEV); in __usb_find_phy()
71 return ERR_PTR(-ENODEV); in __of_usb_find_phy()
74 if (node != phy->dev->of_node) in __of_usb_find_phy()
80 return ERR_PTR(-EPROBE_DEFER); in __of_usb_find_phy()
[all …]
/kernel/linux/linux-5.10/drivers/usb/phy/
Dphy.c1 // SPDX-License-Identifier: GPL-2.0+
3 * phy.c -- USB phy handling
5 * Copyright (C) 2004-2013 Texas Instruments
17 /* Default current range by charger type. */
46 enum usb_phy_type type) in __usb_find_phy() argument
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 …]
/kernel/linux/linux-6.6/Documentation/power/
Dcharger-manager.rst2 Charger Manager
7 Charger Manager provides in-kernel battery charger management that
8 requires temperature monitoring during suspend-to-RAM state
12 Charger Manager is a platform_driver with power-supply-class entries.
13 An instance of Charger Manager (a platform-device created with Charger-Manager)
16 the system may need multiple instances of Charger Manager.
21 Charger Manager supports the following:
25 they may be activated at the same time. Each charger may have its
26 own power-supply-class and each power-supply-class can provide
28 aggregates charger-related information from multiple sources and
[all …]
/kernel/linux/linux-5.10/Documentation/power/
Dcharger-manager.rst2 Charger Manager
7 Charger Manager provides in-kernel battery charger management that
8 requires temperature monitoring during suspend-to-RAM state
12 Charger Manager is a platform_driver with power-supply-class entries.
13 An instance of Charger Manager (a platform-device created with Charger-Manager)
16 the system may need multiple instances of Charger Manager.
21 Charger Manager supports the following:
25 they may be activated at the same time. Each charger may have its
26 own power-supply-class and each power-supply-class can provide
28 aggregates charger-related information from multiple sources and
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/power/supply/
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 …]
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)
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
25 interrupt-parent = <&gpio5>; /* base = 128 */
[all …]
Dqcom_smbb.txt1 Qualcomm Switch-Mode Battery Charger and Boost
4 - compatible:
6 Value type: <stringlist>
8 - "qcom,pm8941-charger"
10 - reg:
12 Value type: <prop-encoded-array>
15 - interrupts:
17 Value type: <prop-encoded-array>
21 - charge done
22 - charge fast mode
[all …]
Dqcom,coincell-charger.txt1 Qualcomm Coincell Charger:
7 - compatible:
9 Value type: <string>
10 Definition: must be: "qcom,pm8941-coincell"
12 - reg:
14 Value type: <u32>
15 Definition: base address of the coincell charger registers
17 - qcom,rset-ohms:
19 Value type: <u32>
20 Definition: resistance (in ohms) for current-limiting resistor
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/power/supply/
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 …]
Dti,lp8727.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: TI/National Semiconductor LP8727 Charger
10 - Sebastian Reichel <sre@kernel.org>
13 - $ref: power-supply.yaml#
25 debounce-ms:
30 type: object
34 charger-type:
36 - ac
[all …]
Dcharger-manager.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/power/supply/charger-manager.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Charger Manager
10 - Sebastian Reichel <sre@kernel.org>
13 Binding for the legacy charger manager driver.
18 const: charger-manager
20 cm-chargers:
22 $ref: /schemas/types.yaml#/definitions/string-array
[all …]
/kernel/linux/linux-6.6/drivers/phy/ti/
Dphy-tusb1210.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * tusb1210.c - TUSB1210 USB ULPI PHY driver
42 /* TUSB1210 charger detection work states */
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()
108 tusb1210_ulpi_write(tusb, TUSB1210_VENDOR_SPECIFIC2, tusb->vendor_specific2); in tusb1210_power_on()
[all …]

12345678910>>...20