Home
last modified time | relevance | path

Searched +full:chg +full:- +full:int (Results 1 – 25 of 49) sorted by relevance

12

/linux/drivers/power/supply/
H A Dmax14577_charger.c1 // 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()
50 int ret; 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()
[all …]
H A Dtwl4030_madc_battery.c1 // SPDX-License-Identifier: GPL-2.0-only
45 static int madc_read(struct iio_channel *channel) in madc_read()
47 int val, err; in madc_read()
55 static int twl4030_madc_bat_get_charging_status(struct twl4030_madc_battery *bt) in twl4030_madc_bat_get_charging_status()
57 return (madc_read(bt->channel_ichg) > 0) ? 1 : 0; in twl4030_madc_bat_get_charging_status()
60 static int twl4030_madc_bat_get_voltage(struct twl4030_madc_battery *bt) in twl4030_madc_bat_get_voltage()
62 return madc_read(bt->channel_vbat); in twl4030_madc_bat_get_voltage()
65 static int twl4030_madc_bat_get_current(struct twl4030_madc_battery *bt) in twl4030_madc_bat_get_current()
67 return madc_read(bt->channel_ichg) * 1000; in twl4030_madc_bat_get_current()
70 static int twl4030_madc_bat_get_temp(struct twl4030_madc_battery *bt) in twl4030_madc_bat_get_temp()
[all …]
H A Dab8500_bmdata.c1 // SPDX-License-Identifier: GPL-2.0
6 #include "ab8500-bm.h"
57 { .temp = -10, .resistance = 158 /* 445 mOhm */ },
58 { .temp = -20, .resistance = 198 /* 595 mOhm */ },
113 static const struct ab8500_bm_charger_parameters chg = { variable
136 .chg_params = &chg,
140 int ab8500_bm_of_probe(struct power_supply *psy, in ab8500_bm_of_probe()
144 struct device *dev = &psy->dev; in ab8500_bm_of_probe()
145 int ret; in ab8500_bm_of_probe()
147 ret = power_supply_get_battery_info(psy, &bm->bi); in ab8500_bm_of_probe()
[all …]
/linux/tools/gpio/
H A Dgpio-watch.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * gpio-watch - monitor unrequested lines for property changes using the
23 int main(int argc, char **argv) in main()
25 struct gpio_v2_line_info_changed chg; in main() local
28 int fd, i, j, ret; in main()
41 for (i = 0, j = 2; i < argc - 2; i++, j++) { in main()
64 memset(&chg, 0, sizeof(chg)); in main()
65 rd = read(pfd.fd, &chg, sizeof(chg)); in main()
66 if (rd < 0 || rd != sizeof(chg)) { in main()
67 if (rd != sizeof(chg)) in main()
[all …]
/linux/drivers/net/fddi/skfp/
H A Dess.c1 // SPDX-License-Identifier: GPL-2.0-or-later
27 * FDDI sub-system supporting the SBA application.
50 -------------------------------------------------------------
52 -------------------------------------------------------------
66 -------------------------------------------------------------
68 -------------------------------------------------------------
73 -------------------------------------------------------------
75 -------------------------------------------------------------
79 int sba_cmd);
85 -------------------------------------------------------------
[all …]
/linux/fs/xfs/
H A Dxfs_trans.h1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
33 xfs_lsn_t li_lsn; /* last on-disk lsn */
72 void (*iop_size)(struct xfs_log_item *, int *, int *);
75 void (*iop_unpin)(struct xfs_log_item *, int remove);
77 int (*iop_precommit)(struct xfs_trans *tp, struct xfs_log_item *lip);
100 return lip->li_ops->flags & XFS_ITEM_INTENT; in xlog_item_is_intent()
106 return lip->li_ops->flags & XFS_ITEM_INTENT_DONE; in xlog_item_is_intent_done()
110 int type, const struct xfs_item_ops *ops);
124 unsigned int t_log_res; /* amt of log space resvd */
[all …]
/linux/drivers/net/ethernet/intel/ice/
H A Dice_flex_pipe.c1 // 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 * ------------------------------
136 static int
145 return -EIO; in ice_gen_key_word()
[all …]
/linux/Documentation/devicetree/bindings/gpio/
H A Dgpio-pca95xx.yaml1 # 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: toradex,ecgpiol16
21 - const: nxp,pcal6416
22 - items:
23 - const: diodes,pi4ioe5v6534q
[all …]
/linux/drivers/clk/mediatek/
H A Dclk-pll.c1 // SPDX-License-Identifier: GPL-2.0-only
7 #include <linux/clk-provider.h>
16 #include "clk-pll.h"
33 int mtk_pll_is_prepared(struct clk_hw *hw) in mtk_pll_is_prepared()
37 return (readl(pll->en_addr) & BIT(pll->data->pll_en_bit)) != 0; in mtk_pll_is_prepared()
40 static int mtk_pll_fenc_is_prepared(struct clk_hw *hw) in mtk_pll_fenc_is_prepared()
44 return !!(readl(pll->fenc_addr) & BIT(pll->data->fenc_sta_bit)); in mtk_pll_fenc_is_prepared()
48 u32 pcw, int postdiv) in __mtk_pll_recalc_rate()
50 int pcwbits = pll->data->pcwbits; in __mtk_pll_recalc_rate()
51 int pcwfbits = 0; in __mtk_pll_recalc_rate()
[all …]
/linux/drivers/extcon/
H A Dextcon-sm5502.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * extcon-sm5502.c - Silicon Mitus SM5502 extcon drvier to support USB switches
18 #include <linux/extcon-provider.h>
20 #include "extcon-sm5502.h"
25 unsigned int irq;
27 unsigned int virq;
32 unsigned int val;
45 int irq;
63 unsigned int num_muic_irqs;
67 unsigned int num_reg_data;
[all …]
H A Dextcon-rt8973a.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * extcon-rt8973a.c - Richtek RT8973A extcon driver to support USB switches
19 #include <linux/extcon-provider.h>
21 #include "extcon-rt8973a.h"
26 unsigned int irq;
28 unsigned int virq;
47 unsigned int num_muic_irqs;
48 int irq;
56 unsigned int num_reg_data;
89 static const unsigned int rt8973a_extcon_cable[] = {
[all …]
/linux/drivers/mfd/
H A Dmax8907.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * max8907.c - mfd driver for MAX8907
5 * Copyright (C) 2010 Gyungoh Yoo <jack.yoo@maxim-ic.com>
6 * Copyright (C) 2010-2012, NVIDIA CORPORATION. All rights reserved.
22 { .name = "max8907-regulator", },
23 { .name = "max8907-rtc", },
26 static bool max8907_gen_is_volatile_reg(struct device *dev, unsigned int reg) in max8907_gen_is_volatile_reg()
41 static bool max8907_gen_is_precious_reg(struct device *dev, unsigned int reg) in max8907_gen_is_precious_reg()
54 static bool max8907_gen_is_writeable_reg(struct device *dev, unsigned int reg) in max8907_gen_is_writeable_reg()
69 static bool max8907_rtc_is_volatile_reg(struct device *dev, unsigned int reg) in max8907_rtc_is_volatile_reg()
[all …]
H A Dmt6360-core.c1 // SPDX-License-Identifier: GPL-2.0
32 unsigned int chip_rev;
79 /* reg 0 -> 0 ~ 7 */
84 /* REG 1 -> 8 ~ 15 */
91 /* REG 2 -> 16 ~ 23 */
92 /* REG 3 -> 24 ~ 31 */
99 /* REG 4 -> 32 ~ 39 */
107 /* REG 5 -> 40 ~ 47 */
116 /* REG 6 -> 48 ~ 55 */
124 /* REG 7 -> 56 ~ 63 */
[all …]
H A Dmax77650.c1 // SPDX-License-Identifier: GPL-2.0
6 // Core MFD driver for MAXIM 77650/77651 charger/power-supply.
59 DEFINE_RES_IRQ_NAMED(MAX77650_INT_CHG, "CHG"),
74 .name = "max77650-regulator",
75 .of_compatible = "maxim,max77650-regulator",
77 .name = "max77650-charger",
78 .of_compatible = "maxim,max77650-charger",
82 .name = "max77650-gpio",
83 .of_compatible = "maxim,max77650-gpio",
87 .name = "max77650-led",
[all …]
H A Dtps65010.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * tps65010 - driver for tps6501x power management chips
6 * Copyright (C) 2004-2005 David Brownell
28 /*-------------------------------------------------------------------------*/
38 /*-------------------------------------------------------------------------*/
48 * battery-insert != device-on.
85 /*-------------------------------------------------------------------------*/
119 static void dbg_chgconf(int por, char *buf, size_t len, u8 chgconfig) in dbg_chgconf()
133 ({int p; switch ((chgconfig >> 3) & 3) { in dbg_chgconf()
165 static void show_chgconfig(int por, const char *label, u8 chgconfig) in show_chgconfig()
[all …]
/linux/mm/
H A Dhugetlb.c1 // SPDX-License-Identifier: GPL-2.0-only
56 #include <linux/page-isolation.h>
58 int hugetlb_max_hstate __read_mostly;
59 unsigned int default_hstate_idx;
81 int (*setup)(char *val);
89 static unsigned int default_hugepages_in_node[MAX_NUMNODES] __initdata;
93 static int hstate_cmdline_index __initdata;
95 static int hugetlb_param_index __initdata;
96 static __init int hugetlb_add_param(char *s, int (*setup)(char *val));
100 static __init int func##args(char *s) \
[all …]
/linux/tools/perf/scripts/python/
H A Dparallel-perf.py2 # SPDX-License-Identifier: GPL-2.0
5 # options --cpu and --time so that each job processes a different chunk
20 glb_prog_name = "parallel-perf.py"
88 return [ f"Non-empty error file {self.stderr_name}" ]
139 x = "0" * (10 - len(x)) + x
140 return x[:len(x) - 9] + "." + x[-9:]
150 max_len = len(str(cpus[-1]))
151 cpu_dir_fmt = f"cpu-%.{max_len}u"
157 cpu_option = f"--cpu={cpu}"
162 tr_dir_fmt = "time-range"
[all …]
/linux/include/linux/iio/adc/
H A Dqcom-vadc-common.h1 /* SPDX-License-Identifier: GPL-2.0 */
17 /* Max ADC code represents full-scale range of 1.8V */
35 /* Default decimation - 1024 for rev2, 840 for pmic5 */
48 #define PMI_CHG_SCALE_1 -138890
69 * struct vadc_linear_graph - Represent ADC characteristics.
84 * enum vadc_scale_fn_type - Scaling function to convert ADC code to
91 * SCALE_PMI_CHG_TEMP: Conversion for PMI CHG temp
131 unsigned int *decimation;
132 unsigned int *hw_settle_1;
133 unsigned int *hw_settle_2;
[all …]
/linux/drivers/scsi/sym53c8xx_2/
H A Dsym_hipd.c1 // 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 *-----------------------------------------------------------------------------
48 static int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp);
53 static void sym_printl_hex(u_char *p, int n) in sym_printl_hex()
[all …]
/linux/scripts/
H A Dbloat-o-meter5 # inspired by perl Bloat-O-Meter (c) 1997 by Andi Kleen
17 group.add_argument('-c', help='categorize output based on symbol type', action='store_true')
18 group.add_argument('-d', help='Show delta of Data Section', action='store_true')
19 group.add_argument('-t', help='Show delta of text Section', action='store_true')
20 parser.add_argument('-p', dest='prefix', help='Arch prefix for the tool being used. Useful in cross…
26 re_NUMBER = re.compile(r'\.[0-9]+')
34 with os.popen("{} --size-sort {}".format(nm, file)) as f:
49 sym[name] = sym.get(name, 0) + int(size, 16)
68 delta.append((-old[name], name))
78 d = new.get(name, 0) - old.get(name, 0)
[all …]
/linux/Documentation/translations/zh_CN/mm/
H A Dhugetlbfs_reserv.rst1 .. include:: ../disclaimer-zh_CN.rst
18 Documentation/admin-guide/mm/hugetlbpage.rst
39 这是一个全局的(per-hstate)预留的巨页的计数。预留的巨页只对预留它们的任
40 务可用。因此,一般可用的巨页的数量被计算为(``free_huge_pages - resv_huge_pages``)。
84 - 对于私有映射,预留映射挂在VMA结构体上。具体来说,就是vma->vm_private_data。这个保
86 - 对于共享映射,预留映射挂在inode上。具体来说,就是inode->i_mapping->private_data。
96 int hugetlb_reserve_pages(struct inode *inode,
110 - 对于共享映射,预留映射中的条目表示对应页面的预留存在或曾经存在。当预留被消耗时,预留映射不被
112 - 对于私有映射,预留映射中没有条目表示相应页面存在预留。随着预留被消耗,条目被添加到预留映射中。
118 预留映射被查阅以确定当前映射/段需要多少巨页预留。对于私有映射,这始终是一个值(to - from)。
[all …]
/linux/sound/soc/codecs/
H A Dpcm6240.c1 // 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 -1005
[all...]
/linux/drivers/gpu/drm/xe/
H A Dxe_mocs.c1 // SPDX-License-Identifier: MIT
45 void (*dump)(struct xe_mocs_info *mocs, unsigned int flags,
57 unsigned int table_size;
59 unsigned int num_mocs_regs;
67 /* Defines for the tables (GLOB_MOCS_0 - GLOB_MOCS_16) */
73 #define XELP_NUM_MOCS_ENTRIES 64 /* 63-64 are reserved, but configured. */
125 * LNCFCMOCS0 - LNCFCMOCS32 registers.
146 /* Base - L3 + LLC */
150 /* Base - Uncached */
154 /* Base - L3 */
[all …]
/linux/net/ipv6/
H A Dsit.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * IPv6 over IPv4 tunnel device - Simple Internet Transition (SIT)
60 For comments look at net/ipv4/ip_gre.c --ANK
70 static int ipip6_tunnel_init(struct net_device *dev);
77 static unsigned int sit_net_i
371 ipip6_tunnel_add_prl(struct ip_tunnel * t,struct ip_tunnel_prl * a,int chg) ipip6_tunnel_add_prl() argument
[all...]
/linux/drivers/phy/ti/
H A Dphy-tusb1210.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * tusb1210.c - TUSB1210 USB ULPI PHY driver
68 int chg_det_retries;
75 static int tusb1210_ulpi_write(struct tusb1210 *tusb, u8 reg, u8 val) in tusb1210_ulpi_write()
77 struct device *dev = tusb->dev; in tusb1210_ulpi_write()
78 int ret; in tusb1210_ulpi_write()
87 static int tusb1210_ulpi_read(struct tusb1210 *tusb, u8 reg, u8 *val) in tusb1210_ulpi_read()
89 struct device *dev = tusb->dev; in tusb1210_ulpi_read()
90 int ret; in tusb1210_ulpi_read()
103 static int tusb1210_power_on(struct phy *phy) in tusb1210_power_on()
[all …]

12