/openbmc/linux/drivers/acpi/ |
H A D | sbs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * sbs.c - ACPI Smart Battery System Driver ($Revision: 2.0 $) 6 * Copyright (c) 2005-2007 Vladimir Lebedev <vladimir.p.lebedev@intel.com> 24 #include <acpi/battery.h> 28 #define ACPI_SBS_CLASS "sbs" 30 #define ACPI_SBS_DEVICE_NAME "Smart Battery System" 38 MODULE_DESCRIPTION("Smart Battery System ACPI interface driver"); 57 struct acpi_sbs *sbs; member 89 struct acpi_battery battery[MAX_SBS_BAT]; member 99 static int acpi_battery_get_state(struct acpi_battery *battery); [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/power/supply/ |
H A D | sbs,sbs-battery.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/sbs,sbs-battery.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: SBS compliant battery 10 - Sebastian Reichel <sre@kernel.org> 13 Battery compatible with the smart battery system specifications 16 - $ref: power-supply.yaml# 21 - items: 22 - enum: [all …]
|
H A D | sbs,sbs-manager.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/sbs,sbs-manager.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: SBS compliant manager 10 - Sebastian Reichel <sre@kernel.org> 13 - $ref: power-supply.yaml# 18 - items: 19 - enum: 20 - lltc,ltc1760 [all …]
|
H A D | sbs,sbs-charger.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/sbs,sbs-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: SBS compliant charger 10 - Sebastian Reichel <sre@kernel.org> 13 Charger compatible with the smart battery system specifications 16 - $ref: power-supply.yaml# 21 - items: 22 - enum: [all …]
|
/openbmc/u-boot/arch/arm/dts/ |
H A D | cros-ec-sbs.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3 * Smart battery dts fragment for devices that use cros-ec-sbs 9 battery: sbs-battery@b { label 10 compatible = "sbs,sbs-battery"; 12 sbs,i2c-retry-count = <2>; 13 sbs,poll-retry-count = <1>;
|
H A D | exynos5800-peach-pi.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * SAMSUNG/GOOGLE Peach-Pit board device tree source 9 /dts-v1/; 14 cpu-model = "Exynos5800"; 16 compatible = "google,pit-rev#", "google,pit", 20 google,bad-wake-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>; 21 hwid = "PIT TEST A-A 7848"; 22 lazy-init = <1>; 33 compatible = "pwm-backlight"; 35 brightness-levels = <0 100 500 1000 1500 2000 2500 2800>; [all …]
|
H A D | exynos5420-peach-pit.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * SAMSUNG/GOOGLE Peach-Pit board device tree source 9 /dts-v1/; 11 #include <dt-bindings/clock/maxim,max77802.h> 12 #include <dt-bindings/regulator/maxim,max77802.h> 17 compatible = "google,pit-rev#", "google,pit", 21 google,bad-wake-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>; 22 hwid = "PIT TEST A-A 7848"; 23 lazy-init = <1>; 34 compatible = "pwm-backlight"; [all …]
|
H A D | exynos5250-snow.dts | 12 /dts-v1/; 13 #include <dt-bindings/gpio/gpio.h> 14 #include <dt-bindings/interrupt-controller/irq.h> 15 #include <dt-bindings/input/input.h> 51 stdout-path = "serial3:115200n8"; 59 samsung,bl1-offset = <0x1400>; 60 samsung,bl2-offset = <0x3400>; 61 u-boot-memory = "/memory"; 62 u-boot-offset = <0x3e00000 0x100000>; 67 #address-cells = <1>; [all …]
|
H A D | tegra124-nyan.dtsi | 1 #include <dt-bindings/input/input.h> 19 vdd-supply = <&vdd_3v3_hdmi>; 20 pll-supply = <&vdd_hdmi_pll>; 21 hdmi-supply = <&vdd_5v0_hdmi>; 23 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 24 nvidia,hpd-gpio = 36 vdd-supply = <&vdd_3v3_panel>; 52 clock-frequency = <100000>; 54 acodec: audio-codec@10 { 57 interrupt-parent = <&gpio>; [all …]
|
/openbmc/linux/arch/arm/boot/dts/ |
H A D | cros-ec-sbs.dtsi | 2 * Smart battery dts fragment for devices that use cros-ec-sbs 6 * This file is dual-licensed: you can use it either under the terms 46 battery: sbs-battery@b { label 47 compatible = "sbs,sbs-battery"; 49 sbs,i2c-retry-count = <2>; 50 sbs,poll-retry-count = <1>;
|
/openbmc/linux/Documentation/devicetree/bindings/i2c/ |
H A D | google,cros-ec-i2c-tunnel.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $id: http://devicetree.org/schemas/i2c/google,cros-ec-i2c-tunnel.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: I2C bus that tunnels through the ChromeOS EC (cros-ec) 11 - Doug Anderson <dianders@chromium.org> 12 - Benson Leung <bleung@chromium.org> 17 other side of the EC (like a battery and PMIC). To get access to 20 The node for this device should be under a cros-ec node like 21 google,cros-ec-spi or google,cros-ec-i2c. [all …]
|
H A D | i2c-arb-gpio-challenge.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/i2c/i2c-arb-gpio-challenge.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: GPIO-based I2C Arbitration Using a Challenge & Response Mechanism 10 - Doug Anderson <dianders@chromium.org> 11 - Peter Rosin <peda@axentia.se> 18 standard I2C multi-master rules. Using GPIOs is generally useful in the case 30 others can see. These are all active low with pull-ups enabled. We'll 51 const: i2c-arb-gpio-challenge [all …]
|
/openbmc/linux/drivers/power/supply/ |
H A D | sbs-battery.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Gas Gauge driver for SBS Compliant Batteries 10 #include <linux/devm-helpers.h> 20 #include <linux/power/sbs-battery.h> 66 /* Battery Mode defines */ 79 /* battery status value bits */ 102 SBS_DATA(-1, 0x03, 0, 65535), 108 SBS_DATA(POWER_SUPPLY_PROP_CURRENT_NOW, 0x0A, -32768, 32767), 110 SBS_DATA(POWER_SUPPLY_PROP_CURRENT_AVG, 0x0B, -32768, 32767), 228 return chip->strings[i]; in sbs_get_string_buf() [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 36 battery class devices. 39 tristate "Generic battery support using IIO" 42 Say Y here to enable support for the generic battery driver 51 which include a battery charger and a boost converter. 54 tristate "MAX8925 battery charger support" 57 Say Y here to enable support for the battery charger in the Maxim 61 tristate "WM831X backup battery charger support" 64 Say Y here to enable support for the backup battery charger 87 tristate "Marvell 88PM860x battery driver" [all …]
|
H A D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0 2 subdir-ccflags-$(CONFIG_POWER_SUPPLY_DEBUG) := -DDEBUG 4 power_supply-y := power_supply_core.o 5 power_supply-$(CONFIG_SYSFS) += power_supply_sysfs.o 6 power_supply-$(CONFIG_LEDS_TRIGGERS) += power_supply_leds.o 8 obj-$(CONFIG_POWER_SUPPLY) += power_supply.o 9 obj-$(CONFIG_POWER_SUPPLY_HWMON) += power_supply_hwmon.o 10 obj-$(CONFIG_GENERIC_ADC_BATTERY) += generic-adc-battery.o 12 obj-$(CONFIG_APM_POWER) += apm_power.o 13 obj-$(CONFIG_AXP20X_POWER) += axp20x_usb_power.o [all …]
|
H A D | sbs-charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * This adds support for sbs-charger compilant chips as defined here: 6 * http://sbs-forum.org/specs/sbc110.pdf 8 * Implemetation based on sbs-battery.c 21 #include <linux/devm-helpers.h> 50 reg = chip->last_state; in sbs_get_property() 54 val->intval = !!(reg & SBS_CHARGER_STATUS_BATTERY_PRESENT); in sbs_get_property() 58 val->intval = !!(reg & SBS_CHARGER_STATUS_AC_PRESENT); in sbs_get_property() 62 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in sbs_get_property() 65 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in sbs_get_property() [all …]
|
H A D | sbs-manager.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Driver for SBS compliant Smart Battery System Managers 10 * Datasheet SBSM: http://sbs-forum.org/specs/sbsm100b.pdf 13 * Karl-Heinz Schneider <karl-heinz@schneider-inet.de> 19 #include <linux/i2c-mux.h> 62 for (retries = SBSM_RETRY_CNT; retries > 0; retries--) { in sbsm_read_word() 69 dev_err(&client->dev, "failed to read register 0x%02x\n", in sbsm_read_word() 80 for (retries = SBSM_RETRY_CNT; retries > 0; retries--) { in sbsm_write_word() 86 dev_err(&client->dev, "failed to write to register 0x%02x\n", in sbsm_write_word() 101 regval = sbsm_read_word(data->client, SBSM_CMD_BATSYSSTATECONT); in sbsm_get_property() [all …]
|
H A D | acer_a500_battery.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Battery driver for Acer Iconia Tab A500. 5 * Copyright 2020 GRATE-driver project. 8 * Based on NVIDIA Gas Gauge driver for SBS Compliant Batteries. 68 err = regmap_read(bat->regmap, ec_data[REG_CAPACITY].reg, &capacity); in a500_battery_update_capacity() 75 if (bat->capacity != capacity) { in a500_battery_update_capacity() 76 bat->capacity = capacity; in a500_battery_update_capacity() 85 if (bat->capacity < 100) { in a500_battery_get_status() 86 if (power_supply_am_i_supplied(bat->psy)) in a500_battery_get_status() 106 val->intval *= base_unit_conversion; in a500_battery_unit_adjustment() [all …]
|
/openbmc/linux/arch/arm/boot/dts/nxp/imx/ |
H A D | imx6dl-b1x5pv2.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 OR MIT 6 // Copyright 2018-2021 General Electric Company 7 // Copyright 2018-2021 Collabora 9 #include <dt-bindings/input/input.h> 10 #include "imx6dl-qmx6.dtsi" 14 stdout-path = &uart3; 20 operating-points = < 25 fsl,soc-operating-points = < 26 /* ARM kHz SOC-PU uV */ 33 operating-points = < [all …]
|
H A D | imx6q-evi.dts | 4 * This file is dual-licensed: you can use it either under the terms 44 /dts-v1/; 46 #include <dt-bindings/gpio/gpio.h> 47 #include <dt-bindings/interrupt-controller/irq.h> 51 compatible = "uniwest,imx6q-evi", "fsl,imx6q"; 58 reg_usbh1_vbus: regulator-usbhubreset { 59 compatible = "regulator-fixed"; 60 regulator-name = "usbh1_vbus"; 61 regulator-min-microvolt = <5000000>; 62 regulator-max-microvolt = <5000000>; [all …]
|
/openbmc/linux/arch/arm/boot/dts/samsung/ |
H A D | exynos5250-snow-common.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <dt-bindings/gpio/gpio.h> 9 #include <dt-bindings/clock/maxim,max77686.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/sound/samsung-i2s.h> 30 stdout-path = "serial3:115200n8"; 33 gpio-keys { 34 compatible = "gpio-keys"; 35 pinctrl-names = "default"; [all …]
|
H A D | exynos5420-peach-pit.dts | 1 // SPDX-License-Identifier: GPL-2.0 8 /dts-v1/; 9 #include <dt-bindings/input/input.h> 10 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/interrupt-controller/irq.h> 12 #include <dt-bindings/clock/maxim,max77802.h> 13 #include <dt-bindings/regulator/maxim,max77802.h> 14 #include <dt-bindings/sound/samsung-i2s.h> 16 #include "exynos5420-cpus.dtsi" 21 compatible = "google,pit-rev16", [all …]
|
H A D | exynos5800-peach-pi.dts | 1 // SPDX-License-Identifier: GPL-2.0 8 /dts-v1/; 9 #include <dt-bindings/input/input.h> 10 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/interrupt-controller/irq.h> 12 #include <dt-bindings/clock/maxim,max77802.h> 13 #include <dt-bindings/regulator/maxim,max77802.h> 14 #include <dt-bindings/sound/samsung-i2s.h> 16 #include "exynos5420-cpus.dtsi" 21 compatible = "google,pi-rev16", [all …]
|
/openbmc/linux/arch/arm/boot/dts/nvidia/ |
H A D | tegra124-nyan.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 2 #include <dt-bindings/input/input.h> 3 #include <dt-bindings/thermal/thermal.h> 14 stdout-path = "serial0:115200n8"; 20 * missing a unit-address. However, the bootloader on these Chromebook 22 * Adding the unit-address causes the bootloader to create a /memory 34 /delete-node/ memory@80000000; 40 vdd-supply = <&vdd_3v3_hdmi>; 41 pll-supply = <&vdd_hdmi_pll>; 42 hdmi-supply = <&vdd_5v0_hdmi>; [all …]
|
/openbmc/linux/arch/arm64/boot/dts/mediatek/ |
H A D | mt8173-elm.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <dt-bindings/input/input.h> 7 #include <dt-bindings/input/linux-event-codes.h> 8 #include <dt-bindings/regulator/dlg,da9211-regulator.h> 9 #include <dt-bindings/gpio/gpio.h> 25 compatible = "pwm-backlight"; 27 power-supply = <&bl_fixed_reg>; 28 enable-gpios = <&pio 95 GPIO_ACTIVE_HIGH>; 30 pinctrl-names = "default"; 31 pinctrl-0 = <&panel_backlight_en_pins>; [all …]
|