/Linux-v6.1/drivers/acpi/ |
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> 31 #define ACPI_BATTERY_DIR_NAME "BAT%i" 55 struct power_supply *bat; member 79 u8 present:1; member 105 while (log--) in battery_scale() 112 return battery_scale((battery->spec & 0x0f00) >> 8); in acpi_battery_vscale() 117 return battery_scale((battery->spec & 0xf000) >> 12); in acpi_battery_ipscale() 122 return (battery->mode & 0x8000); in acpi_battery_mode() [all …]
|
D | battery.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * battery.c - ACPI Battery Driver (Revision: 2.0) 6 * Copyright (C) 2004-2007 Vladimir Lebedev <vladimir.p.lebedev@intel.com> 79 * Pre-2010 and 2012 models appear to always report in mWh and 81 * and x230). Also, in mid-2012 Lenovo issued a BIOS update for 83 * post-1.29 BIOS), but as of Nov. 2012, no such update is 96 struct power_supply *bat; member 134 return battery->device->status.battery_present; in acpi_battery_present() 139 if (!strcasecmp("NiCd", battery->type)) in acpi_battery_technology() 141 if (!strcasecmp("NiMH", battery->type)) in acpi_battery_technology() [all …]
|
/Linux-v6.1/drivers/power/supply/ |
D | surface_battery.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Battery driver for 7th-generation Microsoft Surface devices via Surface 6 * Copyright (C) 2019-2021 Maximilian Luz <luzmaximilian@gmail.com> 22 /* -- SAM interface. -------------------------------------------------------- */ 112 /* -- Device structures. ---------------------------------------------------- */ 140 /* -- Module parameters. ---------------------------------------------------- */ 147 /* -- State management. ----------------------------------------------------- */ 155 static bool spwr_battery_present(struct spwr_battery_device *bat) in spwr_battery_present() argument 157 lockdep_assert_held(&bat->lock); in spwr_battery_present() 159 return le32_to_cpu(bat->sta) & SAM_BATTERY_STA_PRESENT; in spwr_battery_present() [all …]
|
D | twl4030_madc_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 57 return (madc_read(bt->channel_ichg) > 0) ? 1 : 0; in twl4030_madc_bat_get_charging_status() 62 return madc_read(bt->channel_vbat); in twl4030_madc_bat_get_voltage() 67 return madc_read(bt->channel_ichg) * 1000; in twl4030_madc_bat_get_current() 72 return madc_read(bt->channel_temp) * 10; in twl4030_madc_bat_get_temp() 75 static int twl4030_madc_bat_voltscale(struct twl4030_madc_battery *bat, in twl4030_madc_bat_voltscale() argument 82 if (twl4030_madc_bat_get_charging_status(bat)) in twl4030_madc_bat_voltscale() 83 calibration = bat->pdata->charging; in twl4030_madc_bat_voltscale() 85 calibration = bat->pdata->discharging; in twl4030_madc_bat_voltscale() 93 /* interval found - interpolate within range */ in twl4030_madc_bat_voltscale() [all …]
|
D | collie_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Battery and Power Management code for the Sharp SL-5x00 21 #include <asm/mach-types.h> 35 bool (*is_present)(struct collie_bat *bat); 54 static unsigned long collie_read_bat(struct collie_bat *bat) in collie_read_bat() argument 58 if (!bat->gpio_bat || bat->adc_bat < 0) in collie_read_bat() 61 gpiod_set_value(bat->gpio_bat, 1); in collie_read_bat() 64 value = ucb1x00_adc_read(ucb, bat->adc_bat, UCB_SYNC); in collie_read_bat() 66 gpiod_set_value(bat->gpio_bat, 0); in collie_read_bat() 68 value = value * 1000000 / bat->adc_bat_divider; in collie_read_bat() [all …]
|
D | tosa_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Battery and Power Management code for the Sharp SL-6000x 17 #include <asm/mach-types.h> 29 bool (*is_present)(struct tosa_bat *bat); 50 static unsigned long tosa_read_bat(struct tosa_bat *bat) in tosa_read_bat() argument 54 if (!bat->gpiod_bat || bat->adc_bat < 0) in tosa_read_bat() 58 gpiod_set_value(bat->gpiod_bat, 1); in tosa_read_bat() 60 value = wm97xx_read_aux_adc(dev_get_drvdata(bat->psy->dev.parent), in tosa_read_bat() 61 bat->adc_bat); in tosa_read_bat() 62 gpiod_set_value(bat->gpiod_bat, 0); in tosa_read_bat() [all …]
|
D | ds2760_battery.c | 5 * 2004-2007 Matt Reimer 111 struct power_supply *bat; member 127 mutex_lock(&sl->master->bus_mutex); in w1_ds2760_io() 134 count = DS2760_DATA_SIZE - addr; in w1_ds2760_io() 138 w1_write_8(sl->master, W1_DS2760_READ_DATA); in w1_ds2760_io() 139 w1_write_8(sl->master, addr); in w1_ds2760_io() 140 count = w1_read_block(sl->master, buf, count); in w1_ds2760_io() 142 w1_write_8(sl->master, W1_DS2760_WRITE_DATA); in w1_ds2760_io() 143 w1_write_8(sl->master, addr); in w1_ds2760_io() 144 w1_write_block(sl->master, buf, count); in w1_ds2760_io() [all …]
|
D | max1721x_battery.c | 2 * 1-Wire implementation for Maxim Semiconductor 32 #define MAX1721X_REG_NRSENSE 0x1CF /* RSense in 10^-5 Ohm */ 60 struct power_supply *bat; member 108 * RSense stored in 10^-5 Ohm, so measurement voltage must be 109 * in 10^-11 Volts for get current in uA. 110 * 16 bit current reg fullscale +/-51.2mV is 102400 uV. 140 * present or unaccessible via W1. in max1721x_battery_get_property() 142 val->intval = in max1721x_battery_get_property() 143 regmap_read(info->regmap, MAX172XX_REG_STATUS, in max1721x_battery_get_property() 147 ret = regmap_read(info->regmap, MAX172XX_REG_REPSOC, ®); in max1721x_battery_get_property() [all …]
|
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 …]
|
D | ab8500_btemp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 31 #include <linux/fixp-arith.h> 33 #include "ab8500-bm.h" 35 #define BTEMP_THERMAL_LOW_LIMIT -10 51 * struct ab8500_btemp_interrupts - ab8500 interrupts 77 * struct ab8500_btemp - ab8500 BTEMP device information 125 * ab8500_btemp_batctrl_volt_to_res() - convert batctrl voltage to resistance 137 if (is_ab8500_1p1_or_earlier(di->parent)) { in ab8500_btemp_batctrl_volt_to_res() 142 return (450000 * (v_batctrl)) / (1800 - v_batctrl); in ab8500_btemp_batctrl_volt_to_res() [all …]
|
/Linux-v6.1/net/batman-adv/ |
D | multicast.c | 1 // SPDX-License-Identifier: GPL-2.0 55 #include "hard-interface.h" 60 #include "soft-interface.h" 61 #include "translation-table.h" 67 * batadv_mcast_start_timer() - schedule the multicast periodic worker 68 * @bat_priv: the bat priv with all the soft interface information 72 queue_delayed_work(batadv_event_workqueue, &bat_priv->mcast.work, in batadv_mcast_start_timer() 77 * batadv_mcast_get_bridge() - get the bridge on top of the softif if it exists 102 * batadv_mcast_mla_rtr_flags_softif_get_ipv4() - get mcast router flags from 110 * Return: BATADV_NO_FLAGS if present, BATADV_MCAST_WANT_NO_RTR4 otherwise. [all …]
|
D | distributed-arp-table.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include "distributed-arp-table.h" 43 #include "hard-interface.h" 49 #include "soft-interface.h" 50 #include "translation-table.h" 93 #define BATADV_DHCP_YIADDR_LEN sizeof(((struct batadv_dhcp_packet *)0)->yiaddr) 94 #define BATADV_DHCP_CHADDR_LEN sizeof(((struct batadv_dhcp_packet *)0)->chaddr) 99 * batadv_dat_start_timer() - initialise the DAT periodic worker 100 * @bat_priv: the bat priv with all the soft interface information 104 INIT_DELAYED_WORK(&bat_priv->dat.work, batadv_dat_purge); in batadv_dat_start_timer() [all …]
|
D | translation-table.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include "translation-table.h" 46 #include "hard-interface.h" 51 #include "soft-interface.h" 78 * batadv_compare_tt() - check if two TT entries are the same 93 return (tt1->vid == tt2->vid) && batadv_compare_eth(data1, data2); in batadv_compare_tt() 97 * batadv_choose_tt() - return the index of the tt entry in the hash table 110 hash = jhash(&tt->addr, ETH_ALEN, hash); in batadv_choose_tt() 111 hash = jhash(&tt->vid, sizeof(tt->vid), hash); in batadv_choose_tt() 117 * batadv_tt_hash_find() - look for a client in the given hash table [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/power/supply/ |
D | qcom,pm8941-charger.yaml | 1 # 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 …]
|
/Linux-v6.1/arch/arm/boot/dts/ |
D | qcom-pm8226.dtsi | 1 // SPDX-License-Identifier: BSD-3-Clause 2 #include <dt-bindings/interrupt-controller/irq.h> 3 #include <dt-bindings/spmi/spmi.h> 4 #include <dt-bindings/iio/qcom,spmi-vadc.h> 8 compatible = "qcom,pm8226", "qcom,spmi-pmic"; 10 #address-cells = <1>; 11 #size-cells = <0>; 14 compatible = "qcom,pm8941-pwrkey"; 18 bias-pull-up; 22 compatible = "qcom,pm8226-charger"; [all …]
|
D | qcom-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> 9 compatible = "qcom,pm8941", "qcom,spmi-pmic"; 11 #address-cells = <1>; 12 #size-cells = <0>; 15 compatible = "qcom,pm8941-rtc"; 18 reg-names = "rtc", "alarm"; 23 compatible = "qcom,pm8941-pwrkey"; [all …]
|
/Linux-v6.1/arch/powerpc/kvm/ |
D | book3s_emulate.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <asm/asm-prototypes.h> 73 if (vcpu->arch.papr_enabled && (level > PRIV_SUPER)) in spr_allowed() 86 memcpy(&vcpu->arch.gpr_tm[0], &vcpu->arch.regs.gpr[0], in kvmppc_copyto_vcpu_tm() 87 sizeof(vcpu->arch.gpr_tm)); in kvmppc_copyto_vcpu_tm() 88 memcpy(&vcpu->arch.fp_tm, &vcpu->arch.fp, in kvmppc_copyto_vcpu_tm() 90 memcpy(&vcpu->arch.vr_tm, &vcpu->arch.vr, in kvmppc_copyto_vcpu_tm() 92 vcpu->arch.ppr_tm = vcpu->arch.ppr; in kvmppc_copyto_vcpu_tm() 93 vcpu->arch.dscr_tm = vcpu->arch.dscr; in kvmppc_copyto_vcpu_tm() 94 vcpu->arch.amr_tm = vcpu->arch.amr; in kvmppc_copyto_vcpu_tm() [all …]
|
/Linux-v6.1/drivers/mfd/ |
D | twl6030-irq.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * twl6030-irq.c - TWL6030 irq support 5 * Copyright (C) 2005-2009 Texas Instruments, Inc. 17 * Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com> 32 #include "twl-core.h" 41 * We set up IRQs starting at a platform-specified base. An interrupt map table, 57 BATDETECT_INTR_OFFSET, /* Bit 9 BAT */ 86 BATDETECT_INTR_OFFSET, /* Bit 9 BAT */ 104 /*----------------------------------------------------------------------*/ 128 chained_wakeups = atomic_read(&pdata->wakeirqs); in twl6030_irq_pm_notifier() [all …]
|
/Linux-v6.1/arch/powerpc/kernel/ |
D | head_book3s_32.S | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 4 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 9 * Low-level exception handlers and MMU support 14 * This file contains the low-level support and setup for the 28 #include <asm/asm-offsets.h> 33 #include <asm/feature-fixups.h> 39 /* see the comment for clear_bats() -- Cort */ \ 64 * -- Cort 76 * pointer (r1) points to just below the end of the half-meg region 77 * from 0x380000 - 0x400000, which is mapped in already. [all …]
|
/Linux-v6.1/arch/x86/kernel/ |
D | apm_32.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* -*- linux-c -*- 4 * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au) 16 * (Thanks to Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>) 40 * 0.9: only call bios if bios is present, Linux 1.3.72 43 * 1.1: support user-space standby and suspend, power off after system 46 * is only incorrect by 30-60mS (vs. 1S previously) (Gabor J. Toth 48 * screen-blanking and gpm (Stephen Rothwell); Linux 1.99.4 63 * <echter@informatik.uni-rostock.de> 109 * <Walter.Hofmann@physik.stud.uni-erlangen.de>). [all …]
|
/Linux-v6.1/Documentation/ABI/testing/ |
D | sysfs-class-power | 5 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 43 Contact: linux-pm@vger.kernel.org 66 Contact: linux-pm@vger.kernel.org 81 Contact: linux-pm@vger.kernel.org 94 read-only reporting, unless the 'online' state of the supply 106 Contact: linux-pm@vger.kernel.org 124 Contact: linux-pm@vger.kernel.org [all …]
|
/Linux-v6.1/drivers/platform/surface/aggregator/ |
D | trace.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 * Copyright (C) 2020-2022 Maximilian Luz <luzmaximilian@gmail.com> 95 #define SSAM_U8_FIELD_NOT_APPLICABLE ((u16)-1) 96 #define SSAM_SEQ_NOT_APPLICABLE ((u16)-1) 97 #define SSAM_RQID_NOT_APPLICABLE ((u32)-1) 104 * ssam_trace_ptr_uid() - Convert the pointer to a non-pointer UID string. 118 memcpy(uid_str, &buf[ARRAY_SIZE(buf) - SSAM_PTR_UID_LEN], in ssam_trace_ptr_uid() 123 * ssam_trace_get_packet_seq() - Read the packet's sequence ID. 126 * Return: Returns the packet's sequence ID (SEQ) field if present, or 131 if (!p->data.ptr || p->data.len < SSH_MESSAGE_LENGTH(0)) in ssam_trace_get_packet_seq() [all …]
|
/Linux-v6.1/drivers/misc/echo/ |
D | echo.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * SpanDSP - a series of DSP components for telephony 5 * echo.c - A line echo canceller. This code is being developed 14 * bat, 15 years of failed attempts by David and a few fried brain 30 especially for double talk - there were always cases where my DTD 40 At present no special treatment is provided for tones, which 50 on 4 real-world samples. 54 on the real-world samples. I have no idea why, perhaps a scaling 59 dot product) compared to the current sample-by-sample update. 66 Path Models", IEEE Transactions on communications, COM-25, [all …]
|
/Linux-v6.1/arch/arm/mach-s3c/ |
D | mach-mini2440.c | 1 // SPDX-License-Identifier: GPL-2.0 4 // Based on mach-anubis.c by Ben Dooks <ben@simtec.co.uk> 33 #include <linux/platform_data/fb-s3c2410.h> 34 #include <asm/mach-types.h> 36 #include "regs-gpio.h" 37 #include <linux/platform_data/leds-s3c24xx.h> 39 #include "gpio-samsung.h" 40 #include <linux/platform_data/mtd-nand-s3c2410.h> 41 #include <linux/platform_data/i2c-s3c2410.h> 42 #include <linux/platform_data/mmc-s3cmci.h> [all …]
|
/Linux-v6.1/drivers/gpu/drm/i915/gem/selftests/ |
D | i915_gem_mman.c | 2 * SPDX-License-Identifier: MIT 39 return (offset & BIT_ULL(bit)) >> (bit - 6); in swizzle_bit() 46 if (tile->tiling == I915_TILING_NONE) in tiled_offset() 49 y = div64_u64_rem(v, tile->stride, &x); in tiled_offset() 50 v = div64_u64_rem(y, tile->height, &y) * tile->stride * tile->height; in tiled_offset() 52 if (tile->tiling == I915_TILING_X) { in tiled_offset() 53 v += y * tile->width; in tiled_offset() 54 v += div64_u64_rem(x, tile->width, &x) << tile->size; in tiled_offset() 56 } else if (tile->width == 128) { in tiled_offset() 72 switch (tile->swizzle) { in tiled_offset() [all …]
|