Home
last modified time | relevance | path

Searched +full:bat +full:- +full:present (Results 1 – 25 of 34) sorted by relevance

12

/openbmc/linux/drivers/acpi/
H A Dsbs.c1 // 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
104 while (log--) in battery_scale()
111 return battery_scale((battery->spec & 0x0f00) >> 8); in acpi_battery_vscale()
116 return battery_scale((battery->spec & 0xf000) >> 12); in acpi_battery_ipscale()
121 return (battery->mode & 0x8000); in acpi_battery_mode()
[all …]
H A Dbattery.c1 // 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>
81 * Pre-2010 and 2012 models appear to always report in mWh and
83 * and x230). Also, in mid-2012 Lenovo issued a BIOS update for
85 * post-1.29 BIOS), but as of Nov. 2012, no such update is
98 struct power_supply *bat; member
136 return battery->device->status.battery_present; in acpi_battery_present()
141 if (!strcasecmp("NiCd", battery->type)) in acpi_battery_technology()
143 if (!strcasecmp("NiMH", battery->type)) in acpi_battery_technology()
[all …]
/openbmc/linux/drivers/power/supply/
H A Dsurface_battery.c1 // 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 …]
H A Dtwl4030_madc_battery.c1 // 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 …]
H A Dcollie_battery.c1 // 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 …]
H A Dds2760_battery.c5 * 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 …]
H A Dmax1721x_battery.c2 * 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, &reg); in max1721x_battery_get_property()
[all …]
H A Dqcom_smbb.c1 // 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 Dqcom_battmgr.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
190 /* mWh or mAh, based on info->power_unit */
227 bool present; member
321 reinit_completion(&battmgr->ack); in qcom_battmgr_request()
323 battmgr->error = 0; in qcom_battmgr_request()
325 ret = pmic_glink_send(battmgr->client, data, len); in qcom_battmgr_request()
329 left = wait_for_completion_timeout(&battmgr->ack, HZ); in qcom_battmgr_request()
331 return -ETIMEDOUT; in qcom_battmgr_request()
333 return battmgr->error; in qcom_battmgr_request()
[all …]
/openbmc/qemu/block/
H A Dvhdx.c2 * Block driver for Hyper-V VHDX Images
11 * https://www.microsoft.com/en-us/download/details.aspx?id=34750
14 * See the COPYING.LIB file in the top-level directory.
22 #include "sysemu/block-backend.h"
27 #include "qemu/error-report.h"
33 #include "qapi/qobject-input-visitor.h"
34 #include "qapi/qapi-visit-block-core.h"
51 * guids in a MS-specific GUID format. */
54 /* ------- Known Region Table GUIDs ---------------------- */
69 /* ------- Known Metadata Entry GUIDs ---------------------- */
[all …]
H A Dvhdx.h2 * Block driver for Hyper-V VHDX Images
11 * https://www.microsoft.com/en-us/download/details.aspx?id=34750
14 * See the COPYING.LIB file in the top-level directory.
25 /* Structures and fields present in the VHDX file */
32 * |----------|---------------|------------|--------------|--------------------|
47 * A note on the use of MS-GUID fields. For more details on the GUID,
51 * bytes are data1-data4. It makes no mention of what algorithm should be used
58 /* ---- HEADER SECTION STRUCTURES ---- */
66 uint16_t creator[256]; /* optional; utf-16 string to identify
72 /* the guid is a 16 byte unique ID - the definition for this used by
[all …]
/openbmc/linux/net/batman-adv/
H A Dmulticast.c1 // SPDX-License-Identifier: GPL-2.0
54 #include "hard-interface.h"
59 #include "soft-interface.h"
60 #include "translation-table.h"
66 * batadv_mcast_start_timer() - schedule the multicast periodic worker
67 * @bat_priv: the bat priv with all the soft interface information
71 queue_delayed_work(batadv_event_workqueue, &bat_priv->mcast.work, in batadv_mcast_start_timer()
76 * batadv_mcast_get_bridge() - get the bridge on top of the softif if it exists
101 * batadv_mcast_mla_rtr_flags_softif_get_ipv4() - get mcast router flags from
109 * Return: BATADV_NO_FLAGS if present, BATADV_MCAST_WANT_NO_RTR4 otherwise.
[all …]
H A Ddistributed-arp-table.c1 // 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 queue_delayed_work(batadv_event_workqueue, &bat_priv->dat.work, in batadv_dat_start_timer()
[all …]
H A Dtranslation-table.c1 // 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 …]
/openbmc/linux/Documentation/devicetree/bindings/power/supply/
H A Dqcom,pm8941-charger.yaml1 # 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 …]
/openbmc/u-boot/doc/
H A DREADME.power-framework5 # SPDX-License-Identifier: GPL-2.0+
9 ------------
11 This document describes the second version of the u-boot's PMIC (Power
16 ----------
18 Boards supported by u-boot are getting increasingly complex. Developers and
20 devices are now available on the board - namely power managers (PMIC), fuel
21 gauges (FG), micro USB interface controllers (MUIC), batteries, multi-function
25 -----------------------------------
28 The same device - e.g. MAX8997 uses two different I2C busses and addresses.
36 one operation - e.g. PMIC enables LDO.
[all …]
/openbmc/linux/arch/powerpc/kvm/
H A Dbook3s_emulate.c1 // 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 …]
/openbmc/linux/arch/arm/boot/dts/qcom/
H A Dpm8226.dtsi1 // 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 Dpm8941.dtsi1 // 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 …]
/openbmc/u-boot/arch/powerpc/include/asm/
H A Dmmu.h28 unsigned long w:1; /* Write-thru cache mode */
47 unsigned long n:1; /* No-execute */
52 /* Block Address Translation (BAT) Registers */
53 typedef struct _P601_BATU { /* Upper part of BAT for 601 processor */
64 typedef struct _BATU { /* Upper part of BAT (all except 601) */
76 typedef struct _P601_BATL { /* Lower part of BAT for 601 processor */
83 typedef struct _BATL { /* Lower part of BAT (all except 601) */
90 unsigned long w:1; /* Write-thru cache */
101 } BAT; typedef
109 * Simulated two-level MMU. This structure is used by the kernel
[all …]
/openbmc/linux/drivers/mfd/
H A Dtwl6030-irq.c1 // 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 …]
/openbmc/linux/arch/powerpc/kernel/
H A Dhead_book3s_32.S1 /* 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
30 #include <asm/asm-offsets.h>
34 #include <asm/feature-fixups.h>
40 /* see the comment for clear_bats() -- Cort */ \
65 * -- Cort
77 * pointer (r1) points to just below the end of the half-meg region
78 * from 0x380000 - 0x400000, which is mapped in already.
[all …]
/openbmc/linux/arch/x86/kernel/
H A Dapm_32.c1 // 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 …]
/openbmc/u-boot/doc/uImage.FIT/
H A Dhowto.txt8 --------
17 behind the scenes, but needs to be present in the $PATH nevertheless. It is
18 important that the dtc used has support for binary includes -- refer to
31 needed by U-Boot to handle the uImage properly. The uImage file is then
35 - mkimage
36 - dtc (with support for binary includes)
37 - image source file (*.its)
38 - image data file(s)
44 + ---------------> image file --------------------> bootm
48 ---------
[all …]
/openbmc/linux/Documentation/ABI/testing/
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
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 …]

12