/linux/drivers/power/supply/ |
H A 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 …]
|
H A D | max77650-charger.c | 1 // SPDX-License-Identifier: GPL-2.0 6 // Battery charger driver for MAXIM 77650/77651 charger/power-supply. 28 /* Charger is in fast-charge constant current mode. */ 30 /* Charger is in JEITA modified fast-charge constant-current mode. */ 32 /* Charger is in fast-charge constant-voltage mode. */ 34 /* Charger is in JEITA modified fast-charge constant-voltage mode. */ 36 /* Charger is in top-off mode. */ 38 /* Charger is in JEITA modified top-off mode. */ 46 /* Charger is suspended due to a fast-charge timer fault. */ 88 static int max77650_charger_set_vchgin_min(struct max77650_charger_data *chg, in max77650_charger_set_vchgin_min() argument [all …]
|
H A 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> 47 static int max14577_get_charger_state(struct max14577_charger *chg, int *val) in max14577_get_charger_state() argument 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() 61 * - handle properly dead-battery charging (respect timer) in max14577_get_charger_state() 62 * - handle timers (fast-charge and prequal) /MBCCHGERR/ in max14577_get_charger_state() [all …]
|
H A D | max8903_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * max8903_charger.c - Maxim 8903 USB/Adapter Charger Driver 23 * chg, flt, dcm and usus are optional. 30 struct gpio_desc *chg; /* Charger status output */ member 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() 56 /* CHG asserted */ in max8903_get_property() [all …]
|
H A D | mt6360_charger.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/devm-helpers.h> 163 ret = regmap_read(mci->regmap, MT6360_PMU_FOD_STAT, ®val); in mt6360_get_chrdet_ext_stat() 179 val->intval = pwr_rdy ? true : false; in mt6360_charger_get_online() 186 int status, ret; in mt6360_charger_get_status() local 194 status = POWER_SUPPLY_STATUS_DISCHARGING; in mt6360_charger_get_status() 198 ret = regmap_read(mci->regmap, MT6360_PMU_CHG_STAT, ®val); in mt6360_charger_get_status() 205 status = POWER_SUPPLY_STATUS_NOT_CHARGING; in mt6360_charger_get_status() 208 status = POWER_SUPPLY_STATUS_CHARGING; in mt6360_charger_get_status() 211 status = POWER_SUPPLY_STATUS_FULL; in mt6360_charger_get_status() [all …]
|
H A D | mt6370-charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/devm-helpers.h> 184 ret = regmap_field_read(priv->rmap_fields[fd], ®_val); in mt6370_chg_field_get() 210 val = r->max_sel; in mt6370_chg_field_set() 216 return regmap_field_write(priv->rmap_fields[fd], val); in mt6370_chg_field_set() 238 struct mt6370_priv *priv = rcfg->driver_data; in mt6370_chg_otg_of_parse_cb() 240 rcfg->ena_gpiod = fwnode_gpiod_get_index(of_fwnode_handle(of), in mt6370_chg_otg_of_parse_cb() 243 rdesc->name); in mt6370_chg_otg_of_parse_cb() 244 if (IS_ERR(rcfg->ena_gpiod)) { in mt6370_chg_otg_of_parse_cb() 245 rcfg->ena_gpiod = NULL; in mt6370_chg_otg_of_parse_cb() [all …]
|
/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_flex_pipe.c | 1 // SPDX-License-Identifier: GPL-2.0 77 * ice_sect_id - returns section ID 90 * ice_hw_ptype_ena - check if the PTYPE is enabled or not 97 test_bit(ptype, hw->hw_ptype); in ice_hw_ptype_ena() 112 * ice_gen_key_word - generate 16-bits of a key/mask word 120 * This function generates 16-bits from a 8-bit value, an 8-bit don't care mask 121 * and an 8-bit never match mask. The 16-bits of output are divided into 8 bits 133 * ------------------------------ 145 return -EIO; in ice_gen_key_word() 150 /* encode the 8 bits into 8-bit key and 8-bit key invert */ in ice_gen_key_word() [all …]
|
/linux/arch/arm/boot/dts/qcom/ |
H A D | pm8226.dtsi | 1 // SPDX-License-Identifier: BSD-3-Clause 2 #include <dt-bindings/iio/qcom,spmi-vadc.h> 3 #include <dt-bindings/input/linux-event-codes.h> 4 #include <dt-bindings/interrupt-controller/irq.h> 5 #include <dt-bindings/spmi/spmi.h> 8 thermal-zones { 9 pm8226-thermal { 10 polling-delay-passive = <100>; 11 polling-delay = <0>; 12 thermal-sensors = <&pm8226_temp>; [all …]
|
H A D | pm8941.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 2 #include <dt-bindings/iio/qcom,spmi-vadc.h> 3 #include <dt-bindings/interrupt-controller/irq.h> 4 #include <dt-bindings/spmi/spmi.h> 8 thermal-zones { 9 pm8941-thermal { 10 polling-delay-passive = <100>; 11 polling-delay = <0>; 12 thermal-sensors = <&pm8941_temp>; 40 compatible = "qcom,pm8941", "qcom,spmi-pmic"; [all …]
|
/linux/drivers/usb/gadget/udc/aspeed-vhub/ |
H A D | hub.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 5 * hub.c - virtual hub handling 25 #include <linux/dma-mapping.h> 37 * - We may need to indicate TT support 38 * - We may need a device qualifier descriptor 40 * - Make vid/did overridable 41 * - make it look like usb1 if usb1 mode forced 144 * These strings converted to UTF-16 must be smaller than 176 * Mark it as self-powered, I doubt the BMC is powered off in ast_vhub_hub_dev_status() [all …]
|
/linux/Documentation/devicetree/bindings/power/supply/ |
H A D | maxim,max8903.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Sebastian Reichel <sre@kernel.org> 13 - $ref: power-supply.yaml# 19 dok-gpios: 23 uok-gpios: 27 cen-gpios: 31 chg-gpios: 33 description: Charger status pin (active low, input) [all …]
|
H A D | charger-manager.yaml | 1 # 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# 10 - Sebastian Reichel <sre@kernel.org> 18 const: charger-manager 20 cm-chargers: 22 $ref: /schemas/types.yaml#/definitions/string-array 24 cm-num-chargers: 28 cm-fuel-gauge: [all …]
|
/linux/drivers/gpu/drm/msm/hdmi/ |
H A D | hdmi_hpd.c | 1 // SPDX-License-Identifier: GPL-2.0-only 65 const struct hdmi_platform_config *config = hdmi->config; in enable_hpd_clocks() 66 struct device *dev = &hdmi->pdev->dev; in enable_hpd_clocks() 70 for (i = 0; i < config->hpd_clk_cnt; i++) { in enable_hpd_clocks() 71 if (config->hpd_freq && config->hpd_freq[i]) { in enable_hpd_clocks() 72 ret = clk_set_rate(hdmi->hpd_clks[i], in enable_hpd_clocks() 73 config->hpd_freq[i]); in enable_hpd_clocks() 77 config->hpd_clk_names[i], ret); in enable_hpd_clocks() 80 ret = clk_prepare_enable(hdmi->hpd_clks[i]); in enable_hpd_clocks() 84 config->hpd_clk_names[i], ret); in enable_hpd_clocks() [all …]
|
/linux/Documentation/devicetree/bindings/gpio/ |
H A D | gpio-pca95xx.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/gpio/gpio-pca95xx.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Krzysztof Kozlowski <krzk@kernel.org> 19 - items: 20 - const: diodes,pi4ioe5v6534q 21 - const: nxp,pcal6534 22 - items: 23 - enum: [all …]
|
/linux/arch/arm/boot/dts/rockchip/ |
H A 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/sound/pci/echoaudio/ |
H A D | echoaudio_dsp.h | 3 Copyright Echo Digital Audio Corporation (c) 1998 - 2004 21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, 22 MA 02111-1307, USA. 26 Translation from C++ and adaptation for use in ALSA-Driver 41 /**** Echo24: Gina24, Layla24, Mona, Mia, Mia-midi ****/ 81 * These are the offsets for the memory-mapped DSP registers; the DSP base 133 #define MIDI_IN_SKIP_DATA (-1) 136 /*---------------------------------------------------------------------------- 151 -Set the clock select bits in the control register to 0xe (see the #define 154 -Set double-speed mode if you want to use sample rates above 50 kHz [all …]
|
/linux/drivers/usb/host/ |
H A D | max3421-hcd.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Author: David Mosberger-Tang <davidm@egauge.net> 7 * (C) Copyright 2014 David Mosberger-Tang <davidm@egauge.net> 9 * MAX3421 is a chip implementing a USB 2.0 Full-/Low-Speed host 16 * https://www.hdl.co.jp/ftpdata/utl-001/AN3785.pdf 24 * Important note on worst-case (full-speed) packet size constraints 27 * - control: 64 bytes 28 * - isochronous: 1023 bytes 29 * - interrupt: 64 bytes 30 * - bulk: 64 bytes [all …]
|
/linux/drivers/scsi/sym53c8xx_2/ |
H A D | sym_hipd.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * of PCI-SCSI IO processors. 6 * Copyright (C) 1999-2001 Gerard Roudier <groudier@free.fr> 7 * Copyright (c) 2003-2005 Matthew Wilcox <matthew@wil.cx> 10 * Copyright (C) 1998-2000 Gerard Roudier 13 * a port of the FreeBSD ncr driver to Linux-1.2.13. 17 * Stefan Esser <se@mi.Uni-Koeln.de> 25 *----------------------------------------------------------------------------- 55 while (n-- > 0) in sym_printl_hex() 62 sym_print_addr(cp->cmd, "%s: ", label); in sym_print_msg() [all …]
|
/linux/mm/ |
H A D | hugetlb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 106 if (spool->count) in subpool_is_free() 108 if (spool->max_hpages != -1) in subpool_is_free() 109 return spool->used_hpages == 0; in subpool_is_free() 110 if (spool->min_hpages != -1) in subpool_is_free() 111 return spool->rsv_hpages == spool->min_hpages; in subpool_is_free() 119 spin_unlock_irqrestore(&spool->lock, irq_flags); in unlock_or_release_subpool() 125 if (spool->min_hpages != -1) in unlock_or_release_subpool() 126 hugetlb_acct_memory(spool->hstate, in unlock_or_release_subpool() 127 -spool->min_hpages); in unlock_or_release_subpool() [all …]
|
/linux/arch/arm/boot/dts/nxp/imx/ |
H A D | imx6sl-kobo-aura2.dts | 1 // SPDX-License-Identifier: GPL-2.0 5 * Name on mainboard is: 37NB-E60QL0+4B1 11 /dts-v1/; 13 #include <dt-bindings/input/input.h> 14 #include <dt-bindings/gpio/gpio.h> 15 #include <dt-bindings/leds/common.h> 28 stdout-path = &uart1; 31 gpio_keys: gpio-keys { 32 compatible = "gpio-keys"; 33 pinctrl-names = "default"; [all …]
|
H A D | imx6sl-tolino-shine2hd.dts | 1 // SPDX-License-Identifier: GPL-2.0 5 * Name on mainboard is: 37NB-E60QF0+4A2 or 37NB-E60QF0+4A3 11 /dts-v1/; 13 #include <dt-bindings/input/input.h> 14 #include <dt-bindings/gpio/gpio.h> 19 compatible = "kobo,tolino-shine2hd", "fsl,imx6sl"; 22 compatible = "pwm-backlight"; 24 power-supply = <&backlight_regulator>; 27 backlight_regulator: regulator-backlight { 28 compatible = "regulator-fixed"; [all …]
|
/linux/arch/arm64/boot/dts/mediatek/ |
H A D | mt8195-demo.dts | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 6 /dts-v1/; 11 #include <dt-bindings/gpio/gpio.h> 12 #include <dt-bindings/input/input.h> 13 #include <dt-bindings/pinctrl/mt8195-pinfunc.h> 14 #include <dt-bindings/regulator/mediatek,mt6360-regulator.h> 18 compatible = "mediatek,mt8195-demo", "mediatek,mt8195"; 25 stdout-path = "serial0:921600n8"; 30 compatible = "linaro,optee-tz"; 35 gpio-keys { [all …]
|
/linux/drivers/gpio/ |
H A D | gpiolib-cdev.c | 1 // SPDX-License-Identifier: GPL-2.0 36 #include "gpiolib-cdev.h" 39 * Array sizes must ensure 64-bit alignment and not create holes in the 46 * Check that uAPI structs are 64-bit aligned for 32/64-bit compatibility 69 * struct linehandle_state - contains the state of a userspace handle 100 return -EINVAL; in linehandle_validate_flags() 108 return -EINVAL; in linehandle_validate_flags() 117 return -EINVAL; in linehandle_validate_flags() 123 return -EINVAL; in linehandle_validate_flags() 131 return -EINVAL; in linehandle_validate_flags() [all …]
|
/linux/sound/soc/codecs/ |
H A D | pcm6240.c | 1 // SPDX-License-Identifier: GPL-2.0 5 // Copyright (C) 2022 - 2024 Texas Instruments Incorporated 12 // Author: Shenghao Ding <shenghao-ding@ti.com> 500 -10000, 2700); 502 -12750, 0); 504 -25500, 0); 506 -11450, 2000); 508 -10050, 2700); 511 -10000, 2700); 514 -8050, 4700); [all …]
|
/linux/drivers/mfd/ |
H A 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 /*-------------------------------------------------------------------------*/ 45 * to tps65010 and tps65012. The tps65013 has a NO_CHG status/irq. 47 * battery-insert != device-on. 84 /*-------------------------------------------------------------------------*/ 184 struct tps65010 *tps = s->private; in dbg_show() 190 switch (tps->model) { in dbg_show() [all …]
|