/linux/net/netfilter/ |
H A D | nf_conntrack_h323_types.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 static const struct field_t _TransportAddress_ipAddress[] = { /* SEQUENCE */ 13 static const struct field_t _TransportAddress_ipSourceRoute_route[] = { /* SEQUENCE OF */ 17 static const struct field_t _TransportAddress_ipSourceRoute_routing[] = { /* CHOICE */ 22 static const struct field_t _TransportAddress_ipSourceRoute[] = { /* SEQUENCE */ 25 {FNAME("route") SEQOF, SEMI, 0, 0, SKIP, 0, 31 static const struct field_t _TransportAddress_ipxAddress[] = { /* SEQUENCE */ 37 static const struct field_t _TransportAddress_ip6Address[] = { /* SEQUENCE */ 43 static const struct field_t _H221NonStandard[] = { /* SEQUENCE */ 49 static const struct field_t _NonStandardIdentifier[] = { /* CHOICE */ [all …]
|
/linux/drivers/power/supply/ |
H A D | act8945a_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Power supply driver for the Active-semi ACT8945A PMIC 18 static const char *act8945a_charger_model = "ACT8945A"; 19 static const char *act8945a_charger_manufacturer = "Active-semi"; 86 static int act8945a_get_charger_state(struct regmap *regmap, int *val) in act8945a_get_charger_state() 125 static int act8945a_get_charge_type(struct regmap *regmap, int *val) in act8945a_get_charge_type() 163 static int act8945a_get_battery_health(struct regmap *regmap, int *val) in act8945a_get_battery_health() 209 static int act8945a_get_capacity_level(struct act8945a_charger *charger, in act8945a_get_capacity_level() 214 int lbo_level = gpiod_get_value(charger->lbo_gpio); in act8945a_get_capacity_level() 268 * Riset(K) = 2336 * (1V/Ichg(mA)) - 0.205 [all …]
|
/linux/drivers/mfd/ |
H A D | act8945a.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * MFD driver for Active-semi ACT8945a PMIC 16 static const struct mfd_cell act8945a_devs[] = { 18 .name = "act8945a-regulator", 21 .name = "act8945a-charger", 22 .of_compatible = "active-semi,act8945a-charger", 26 static const struct regmap_config act8945a_regmap_config = { 31 static int act8945a_i2c_probe(struct i2c_client *i2c) in act8945a_i2c_probe() 39 dev_err(&i2c->dev, "regmap init failed: %d\n", ret); in act8945a_i2c_probe() 45 ret = devm_mfd_add_devices(&i2c->dev, PLATFORM_DEVID_NONE, in act8945a_i2c_probe() [all …]
|
/linux/drivers/i2c/busses/ |
H A D | i2c-pasemi-pci.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2006-2007 PA Semi, Inc 5 * SMBus host driver for PA Semi PWRficient 18 #include "i2c-pasemi-core.h" 23 static struct pci_driver pasemi_smb_pci_driver; 25 static int pasemi_smb_pci_probe(struct pci_dev *dev, in pasemi_smb_pci_probe() 34 return -ENODEV; in pasemi_smb_pci_probe() 36 smbus = devm_kzalloc(&dev->dev, sizeof(*smbus), GFP_KERNEL); in pasemi_smb_pci_probe() 38 return -ENOMEM; in pasemi_smb_pci_probe() 40 smbus->dev = &dev->dev; in pasemi_smb_pci_probe() [all …]
|
H A D | i2c-pasemi-core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2006-2007 PA Semi, Inc 5 * SMBus host driver for PA Semi PWRficient 18 #include "i2c-pasemi-core.h" 45 static inline void reg_write(struct pasemi_smbus *smbus, int reg, int val) in reg_write() 47 dev_dbg(smbus->dev, "smbus write reg %x val %08x\n", reg, val); in reg_write() 48 iowrite32(val, smbus->ioaddr + reg); in reg_write() 51 static inline int reg_read(struct pasemi_smbus *smbus, int reg) in reg_read() 54 ret = ioread32(smbus->ioaddr + reg); in reg_read() 55 dev_dbg(smbus->dev, "smbus read reg %x val %08x\n", reg, ret); in reg_read() [all …]
|
/linux/drivers/char/hw_random/ |
H A D | pasemi-rng.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2006-2007 PA Semi, Inc 33 static int pasemi_rng_data_present(struct hwrng *rng, int wait) in pasemi_rng_data_present() 35 void __iomem *rng_regs = (void __iomem *)rng->priv; in pasemi_rng_data_present() 48 static int pasemi_rng_data_read(struct hwrng *rng, u32 *data) in pasemi_rng_data_read() 50 void __iomem *rng_regs = (void __iomem *)rng->priv; in pasemi_rng_data_read() 55 static int pasemi_rng_init(struct hwrng *rng) in pasemi_rng_init() 57 void __iomem *rng_regs = (void __iomem *)rng->priv; in pasemi_rng_init() 67 static void pasemi_rng_cleanup(struct hwrng *rng) in pasemi_rng_cleanup() 69 void __iomem *rng_regs = (void __iomem *)rng->priv; in pasemi_rng_cleanup() [all …]
|
/linux/arch/arm/mach-actions/ |
H A D | platsmp.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Actions Semi Leopard 7 * Copyright 2012 Actions Semi Inc. 8 * Author: Actions Semi, Inc. 18 #include <linux/soc/actions/owl-sps.h> 35 static void __iomem *scu_base_addr; 36 static void __iomem *sps_base_addr; 37 static void __iomem *timer_base_addr; 38 static int ncores; 40 static int s500_wakeup_secondary(unsigned int cpu) in s500_wakeup_secondary() [all …]
|
/linux/drivers/regulator/ |
H A D | act8865-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * act8865-regulator.c - Voltage regulation for active-semi ACT88xx PMUs 5 * http://www.active-semi.com/products/power-management-units/act88xx/ 22 #include <dt-bindings/regulator/active-semi,8865-regulator.h> 124 #define ACT8865_ENA 0x80 /* ON - [7] */ 125 #define ACT8865_DIS 0x40 /* DIS - [6] */ 127 #define ACT8865_VSEL_MASK 0x3F /* VSET - [5:0] */ 130 #define ACT8600_LDO10_ENA 0x40 /* ON - [6] */ 131 #define ACT8600_SUDCDC_VSEL_MASK 0xFF /* SUDCDC VSET - [7:0] */ 150 static const struct regmap_range act8600_reg_ranges[] = { [all …]
|
H A D | act8945a-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Voltage regulation driver for active-semi ACT8945A PMIC 16 #include <dt-bindings/regulator/active-semi,8945a-regulator.h> 52 #define ACT8945A_ENA 0x80 /* ON - [7] */ 53 #define ACT8945A_VSEL_MASK 0x3F /* VSET - [5:0] */ 76 static const struct linear_range act8945a_voltage_ranges[] = { 82 static int act8945a_set_suspend_state(struct regulator_dev *rdev, bool enable) in act8945a_set_suspend_state() 84 struct regmap *regmap = rdev->regmap; in act8945a_set_suspend_state() 118 return -EINVAL; in act8945a_set_suspend_state() 131 static int act8945a_set_suspend_enable(struct regulator_dev *rdev) in act8945a_set_suspend_enable() [all …]
|
/linux/drivers/clocksource/ |
H A D | timer-owl.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Actions Semi Owl timer 5 * Copyright 2012 Actions Semi Inc. 6 * Author: Actions Semi, Inc. 30 static void __iomem *owl_timer_base; 31 static void __iomem *owl_clksrc_base; 32 static void __iomem *owl_clkevt_base; 34 static inline void owl_timer_reset(void __iomem *base) in owl_timer_reset() 41 static inline void owl_timer_set_enabled(void __iomem *base, bool enabled) in owl_timer_set_enabled() 56 static u64 notrace owl_timer_sched_read(void) in owl_timer_sched_read() [all …]
|
/linux/lib/math/ |
H A D | rational-test.c | 1 // SPDX-License-Identifier: GPL-2.0 15 static const struct rational_test_param test_parameters[] = { 16 { 1230, 10, 100, 20, 100, 1, "Exceeds bounds, semi-convergent term > 1/2 last term" }, 17 { 34567,100, 120, 20, 120, 1, "Exceeds bounds, semi-convergent term < 1/2 last term" }, 19 { 1, 19, 100, 10, 1, 10, "Closest to smallest non-zero" }, 26 static void get_desc(const struct rational_test_param *param, char *desc) in get_desc() 28 strscpy(desc, param->name, KUNIT_PARAM_DESC_SIZE); in get_desc() 34 static void rational_test(struct kunit *test) in rational_test() 36 const struct rational_test_param *param = (const struct rational_test_param *)test->param_value; in rational_test() 39 rational_best_approximation(param->num, param->den, param->max_num, param->max_den, &n, &d); in rational_test() [all …]
|
/linux/drivers/clk/actions/ |
H A D | owl-mux.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 // Copyright (c) 2014 Actions Semi Inc. 6 // Author: David Liu <liuwei@actions-semi.com> 11 #include <linux/clk-provider.h> 14 #include "owl-mux.h" 22 regmap_read(common->regmap, mux_hw->reg, ®); in owl_mux_helper_get_parent() 23 parent = reg >> mux_hw->shift; in owl_mux_helper_get_parent() 24 parent &= BIT(mux_hw->width) - 1; in owl_mux_helper_get_parent() 29 static u8 owl_mux_get_parent(struct clk_hw *hw) in owl_mux_get_parent() 33 return owl_mux_helper_get_parent(&mux->common, &mux->mux_hw); in owl_mux_get_parent() [all …]
|
H A D | owl-gate.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 // Copyright (c) 2014 Actions Semi Inc. 6 // Author: David Liu <liuwei@actions-semi.com> 11 #include <linux/clk-provider.h> 14 #include "owl-gate.h" 19 int set = gate_hw->gate_flags & CLK_GATE_SET_TO_DISABLE ? 1 : 0; in owl_gate_set() 24 regmap_read(common->regmap, gate_hw->reg, ®); in owl_gate_set() 27 reg |= BIT(gate_hw->bit_idx); in owl_gate_set() 29 reg &= ~BIT(gate_hw->bit_idx); in owl_gate_set() 31 regmap_write(common->regmap, gate_hw->reg, reg); in owl_gate_set() [all …]
|
H A D | owl-common.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 // Copyright (c) 2014 Actions Semi Inc. 6 // Author: David Liu <liuwei@actions-semi.com> 14 #include <linux/clk-provider.h> 34 static inline struct owl_clk_common *
|
H A D | owl-mux.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 // Copyright (c) 2014 Actions Semi Inc. 6 // Author: David Liu <liuwei@actions-semi.com> 14 #include "owl-common.h" 47 static inline struct owl_mux *hw_to_owl_mux(const struct clk_hw *hw) in hw_to_owl_mux()
|
H A D | owl-common.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 // Copyright (c) 2014 Actions Semi Inc. 6 // Author: David Liu <liuwei@actions-semi.com> 14 #include "owl-common.h" 16 static const struct regmap_config owl_regmap_config = { 24 static void owl_clk_set_regmap(const struct owl_clk_desc *desc, in owl_clk_set_regmap() 30 for (i = 0; i < desc->num_clks; i++) { in owl_clk_set_regmap() 31 clks = desc->clks[i]; in owl_clk_set_regmap() 35 clks->regmap = regmap; in owl_clk_set_regmap() 49 regmap = devm_regmap_init_mmio(&pdev->dev, base, &owl_regmap_config); in owl_clk_regmap_init() [all …]
|
H A D | owl-divider.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 // Copyright (c) 2014 Actions Semi Inc. 6 // Author: David Liu <liuwei@actions-semi.com> 11 #include <linux/clk-provider.h> 14 #include "owl-divider.h" 21 return divider_round_rate(&common->hw, rate, parent_rate, in owl_divider_helper_round_rate() 22 div_hw->table, div_hw->width, in owl_divider_helper_round_rate() 23 div_hw->div_flags); in owl_divider_helper_round_rate() 26 static long owl_divider_round_rate(struct clk_hw *hw, unsigned long rate, in owl_divider_round_rate() 31 return owl_divider_helper_round_rate(&div->common, &div->div_hw, in owl_divider_round_rate() [all …]
|
H A D | owl-gate.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 // Copyright (c) 2014 Actions Semi Inc. 6 // Author: David Liu <liuwei@actions-semi.com> 14 #include "owl-common.h" 59 static inline struct owl_gate *hw_to_owl_gate(const struct clk_hw *hw) in hw_to_owl_gate()
|
H A D | owl-divider.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 // Copyright (c) 2014 Actions Semi Inc. 6 // Author: David Liu <liuwei@actions-semi.com> 14 #include "owl-common.h" 52 static inline struct owl_divider *hw_to_owl_divider(const struct clk_hw *hw) in hw_to_owl_divider()
|
H A D | owl-factor.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 // Copyright (c) 2014 Actions Semi Inc. 6 // Author: David Liu <liuwei@actions-semi.com> 14 #include "owl-common.h" 58 #define div_mask(d) ((1 << ((d)->width)) - 1) 60 static inline struct owl_factor *hw_to_owl_factor(const struct clk_hw *hw) in hw_to_owl_factor()
|
/linux/drivers/mtd/nand/raw/ |
H A D | pasemi_nand.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2006-2007 PA Semi, Inc 35 static const char driver_name[] = "pasemi-nand"; 37 static void pasemi_read_buf(struct nand_chip *chip, u_char *buf, int len) in pasemi_read_buf() 40 memcpy_fromio(buf, chip->legacy.IO_ADDR_R, 0x800); in pasemi_read_buf() 42 len -= 0x800; in pasemi_read_buf() 44 memcpy_fromio(buf, chip->legacy.IO_ADDR_R, len); in pasemi_read_buf() 47 static void pasemi_write_buf(struct nand_chip *chip, const u_char *buf, in pasemi_write_buf() 51 memcpy_toio(chip->legacy.IO_ADDR_R, buf, 0x800); in pasemi_write_buf() 53 len -= 0x800; in pasemi_write_buf() [all …]
|
/linux/drivers/pmdomain/actions/ |
H A D | owl-sps.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Actions Semi Owl Smart Power System (SPS) 5 * Copyright 2012 Actions Semi Inc. 6 * Author: Actions Semi, Inc. 16 #include <linux/soc/actions/owl-sps.h> 17 #include <dt-bindings/power/owl-s500-powergate.h> 18 #include <dt-bindings/power/owl-s700-powergate.h> 19 #include <dt-bindings/power/owl-s900-powergate.h> 49 static int owl_sps_set_power(struct owl_sps_domain *pd, bool enable) in owl_sps_set_power() 53 ack_mask = BIT(pd->info->ack_bit); in owl_sps_set_power() [all …]
|
/linux/arch/powerpc/platforms/pasemi/ |
H A D | pci.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2006 PA Semi, Inc 5 * Authors: Kip Walker, PA Semi 6 * Olof Johansson, PA Semi 18 #include <asm/pci-bridge.h> 19 #include <asm/isa-bridge.h> 22 #include <asm/ppc-pci.h> 28 static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) in pa_pxp_offset_valid() 31 * well, so allow larger offset. It's really a two-function device but the in pa_pxp_offset_valid() 40 static void volatile __iomem *pa_pxp_cfg_addr(struct pci_controller *hose, in pa_pxp_cfg_addr() [all …]
|
H A D | setup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2006-2007 PA Semi, Inc 5 * Authors: Kip Walker, PA Semi 6 * Olof Johansson, PA Semi 40 /* SDC reset register, must be pre-mapped at reset time */ 41 static void __iomem *reset_reg; 43 /* Various error status registers, must be pre-mapped at MCE time */ 51 static struct mce_regs mce_regs[MAX_MCE_REGS]; 52 static int num_mce_regs; 53 static int nmi_virq = 0; [all …]
|
H A D | gpio_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2006-2007 PA Semi, Inc 5 * Author: Olof Johansson, PA Semi 9 * Based on drivers/net/fs_enet/mii-bitbang.c. 27 static void __iomem *gpio_regs; 34 #define MDC_PIN(bus) (((struct gpio_priv *)bus->priv)->mdc_pin) 35 #define MDIO_PIN(bus) (((struct gpio_priv *)bus->priv)->mdio_pin) 37 static inline void mdio_lo(struct mii_bus *bus) in mdio_lo() 42 static inline void mdio_hi(struct mii_bus *bus) in mdio_hi() 47 static inline void mdc_lo(struct mii_bus *bus) in mdc_lo() [all …]
|