| /Linux-v5.15/drivers/soc/bcm/ |
| D | bcm2835-power.c | 1 // SPDX-License-Identifier: GPL-2.0+ 8 #include <dt-bindings/soc/bcm2835-pm.h> 12 #include <linux/mfd/bcm2835-pm.h> 16 #include <linux/reset-controller.h> 109 #define PM_READ(reg) readl(power->base + (reg)) 110 #define PM_WRITE(reg, val) writel(PM_PASSWORD | (val), power->base + (reg)) 129 #define ASB_READ(reg) readl(power->asb + (reg)) 130 #define ASB_WRITE(reg, val) writel(PM_PASSWORD | (val), power->asb + (reg)) 164 if (ktime_get_ns() - start >= 1000) in bcm2835_asb_enable() 165 return -ETIMEDOUT; in bcm2835_asb_enable() [all …]
|
| /Linux-v5.15/drivers/regulator/ |
| D | max8952.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * max8952.c - Voltage and current regulation for the Maxim 8952 46 int ret = i2c_smbus_read_byte_data(max8952->client, reg); in max8952_read_reg() 57 return i2c_smbus_write_byte_data(max8952->client, reg, value); in max8952_write_reg() 66 return -EINVAL; in max8952_list_voltage() 68 return (max8952->pdata->dvs_mode[selector] * 10 + 770) * 1000; in max8952_list_voltage() 76 if (max8952->vid0) in max8952_get_voltage_sel() 78 if (max8952->vid1) in max8952_get_voltage_sel() 89 if (!max8952->vid0_gpiod || !max8952->vid1_gpiod) { in max8952_set_voltage_sel() 91 return -EPERM; in max8952_set_voltage_sel() [all …]
|
| /Linux-v5.15/drivers/clk/sifive/ |
| D | sifive-prci.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include "sifive-prci.h" 12 #include "fu540-prci.h" 13 #include "fu740-prci.h" 25 * __prci_readl() - read from a PRCI register 26 * @pd: PRCI context 30 * address of the PRCI register target described by @pd, and return 35 * Return: the contents of the register described by @pd and @offs. 37 static u32 __prci_readl(struct __prci_data *pd, u32 offs) in __prci_readl() argument 39 return readl_relaxed(pd->va + offs); in __prci_readl() [all …]
|
| /Linux-v5.15/drivers/soc/samsung/ |
| D | pm_domains.c | 1 // SPDX-License-Identifier: GPL-2.0 9 // conjunction with runtime-pm. Support for both device-tree and non-device-tree 32 struct generic_pm_domain pd; member 38 struct exynos_pm_domain *pd; in exynos_pd_power() local 43 pd = container_of(domain, struct exynos_pm_domain, pd); in exynos_pd_power() 44 base = pd->base; in exynos_pd_power() 46 pwr = power_on ? pd->local_pwr_cfg : 0; in exynos_pd_power() 52 while ((readl_relaxed(base + 0x4) & pd->local_pwr_cfg) != pwr) { in exynos_pd_power() 54 op = (power_on) ? "enable" : "disable"; in exynos_pd_power() 55 pr_err("Power domain %s %s failed\n", domain->name, op); in exynos_pd_power() [all …]
|
| /Linux-v5.15/drivers/net/ethernet/smsc/ |
| D | smsc9420.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 17 #include <linux/dma-mapping.h> 25 #define DRV_MDIONAME "smsc9420-mdio" 82 static uint debug = -1; 86 static inline u32 smsc9420_reg_read(struct smsc9420_pdata *pd, u32 offset) in smsc9420_reg_read() argument 88 return ioread32(pd->ioaddr + offset); in smsc9420_reg_read() 92 smsc9420_reg_write(struct smsc9420_pdata *pd, u32 offset, u32 value) in smsc9420_reg_write() argument 94 iowrite32(value, pd->ioaddr + offset); in smsc9420_reg_write() 97 static inline void smsc9420_pci_flush_write(struct smsc9420_pdata *pd) in smsc9420_pci_flush_write() argument 100 smsc9420_reg_read(pd, ID_REV); in smsc9420_pci_flush_write() [all …]
|
| /Linux-v5.15/drivers/i2c/busses/ |
| D | i2c-sh_mobile.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2014-19 Wolfram Sang <wsa@sang-engineering.com> 8 * Portions of the code based on out-of-tree driver i2c-sh7343.c 15 #include <linux/dma-mapping.h> 40 /* ICIC: -DTE */ 47 /* ICIC: -DTE */ 51 /* 3 bytes or more, +---------+ gets repeated */ 56 /* 0 byte receive - not supported since slave may hold SDA low */ 61 /* ICIC: -DTE | +DTE */ 68 /* ICIC: -DTE | +DTE */ [all …]
|
| /Linux-v5.15/drivers/clk/qcom/ |
| D | gdsc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2015, 2017-2018, The Linux Foundation. All rights reserved. 16 #include <linux/reset-controller.h> 46 #define domain_to_gdsc(domain) container_of(domain, struct gdsc, pd) 60 if (sc->flags & POLL_CFG_GDSCR) in gdsc_check_status() 61 reg = sc->gdscr + CFG_GDSCR_OFFSET; in gdsc_check_status() 62 else if (sc->gds_hw_ctrl) in gdsc_check_status() 63 reg = sc->gds_hw_ctrl; in gdsc_check_status() 65 reg = sc->gdscr; in gdsc_check_status() 67 ret = regmap_read(sc->regmap, reg, &val); in gdsc_check_status() [all …]
|
| /Linux-v5.15/drivers/media/pci/dt3155/ |
| D | dt3155.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2006-2010 by Marin Mitov * 14 #include <media/v4l2-dev.h> 15 #include <media/v4l2-ioctl.h> 16 #include <media/v4l2-common.h> 17 #include <media/videobuf2-dma-contig.h> 24 * read_i2c_reg - reads an internal i2c register 43 return -EIO; /* error: NEW_CYCLE not cleared */ in read_i2c_reg() 48 return -EIO; /* error: DIRECT_ABORT set */ in read_i2c_reg() 55 * write_i2c_reg - writes to an internal i2c register [all …]
|
| /Linux-v5.15/include/linux/usb/ |
| D | tcpm.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Copyright 2015-2017 Google, Inc 11 #include "pd.h" 59 * struct tcpc_dev - Port configuration and callback functions 64 * and cc=Rp-def. This allows the tcpm to provide a fallback 65 * current-limit detection method for the cc=Rp-def case. 74 * @set_vconn: Called to enable or disable VCONN 75 * @set_vbus: Called to enable or disable VBUS 79 * @set_pd_rx: Called to enable or disable reception of PD messages 82 * Optional; if supported by hardware, called to start dual-role [all …]
|
| /Linux-v5.15/drivers/soc/imx/ |
| D | gpc.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright 2015-2017 Pengutronix, Lucas Stach <kernel@pengutronix.de> 4 * Copyright 2011-2013 Freescale Semiconductor, Inc. 61 struct imx_pm_domain *pd = to_imx_pm_domain(genpd); in imx6_pm_domain_power_off() local 66 regmap_read(pd->regmap, pd->reg_offs + GPC_PGC_PDNSCR_OFFS, &val); in imx6_pm_domain_power_off() 71 regmap_update_bits(pd->regmap, pd->reg_offs + GPC_PGC_CTRL_OFFS, in imx6_pm_domain_power_off() 75 val = BIT(pd->cntr_pdn_bit); in imx6_pm_domain_power_off() 76 regmap_update_bits(pd->regmap, GPC_CNTR, val, val); in imx6_pm_domain_power_off() 79 udelay(DIV_ROUND_UP(iso + iso2sw, pd->ipg_rate_mhz)); in imx6_pm_domain_power_off() 81 if (pd->supply) in imx6_pm_domain_power_off() [all …]
|
| /Linux-v5.15/arch/m68k/68000/ |
| D | dragen2.c | 1 // SPDX-License-Identifier: GPL-2.0 25 PBDATA |= 0x20; /* disable CCFL light */ in dragen2_reset() 26 PKDATA |= 0x4; /* disable LCD controller */ in dragen2_reset() 68 PDPOL &= ~PD(1); /* active high signal */ in init_dragen2() 69 PDIQEG &= ~PD(1); in init_dragen2() 70 PDIRQEN |= PD(1); /* IRQ enabled */ in init_dragen2()
|
| /Linux-v5.15/drivers/block/paride/ |
| D | pd.c | 2 pd.c (c) 1997-8 Grant R. Guenther <grant@torque.net> 5 This is the high-level driver for parallel port IDE hard 12 The behaviour of the pd driver can be altered by setting 17 drive1 1-8 integers as follows: 37 <mod> this can be -1 to choose the best mode, or one 39 (-1 if not given) 48 <sby> set this to zero to disable the power saving 52 go more slowly. -1 sets a default value that 56 this to zero will speed up the device. (default -1) 60 choose the slave, -1 (the default) to choose the [all …]
|
| /Linux-v5.15/drivers/video/fbdev/ |
| D | sh7760fb.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * (c) 2006-2008 MSC Vertriebsges.m.b.H., 11 * Thanks to Siegfried Schaefer <s.schaefer at schaefer-edv.de> 19 #include <linux/dma-mapping.h> 34 struct sh7760fb_platdata *pd; /* display information */ member 56 /* wait_for_lps - wait until power supply has reached a certain state. */ 60 while (--i && ((ioread16(par->base + LDPMMR) & 3) != val)) in wait_for_lps() 64 return -ETIMEDOUT; in wait_for_lps() 69 /* en/disable the LCDC */ 72 struct sh7760fb_par *par = info->par; in sh7760fb_blank() [all …]
|
| /Linux-v5.15/drivers/memory/ |
| D | emif.c | 1 // SPDX-License-Identifier: GPL-2.0-only 32 * struct emif_data - Per device static data for driver's use 37 * to this EMIF - read from MR4 register. If there 42 * @base: base address of memory-mapped IO registers. 46 * frequencies, to avoid re-calculating them on 79 u32 type = emif->plat_data->device_info->type; in do_emif_regdump_show() 80 u32 ip_rev = emif->plat_data->ip_rev; in do_emif_regdump_show() 83 regs->freq/1000000); in do_emif_regdump_show() 85 seq_printf(s, "ref_ctrl_shdw\t: 0x%08x\n", regs->ref_ctrl_shdw); in do_emif_regdump_show() 86 seq_printf(s, "sdram_tim1_shdw\t: 0x%08x\n", regs->sdram_tim1_shdw); in do_emif_regdump_show() [all …]
|
| /Linux-v5.15/arch/arm/mach-omap2/ |
| D | powerdomain.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * Copyright (C) 2007-2008, 2010 Texas Instruments, Inc. 6 * Copyright (C) 2007-2011 Nokia Corporation 10 * XXX This should be moved to the mach-omap2/ directory at the earliest 45 * PWRDM_HAS_HDWR_SAR - powerdomain has hardware save-and-restore support 47 * PWRDM_HAS_MPU_QUIRK - MPU pwr domain has MEM bank 0 bits in MEM 50 * PWRDM_HAS_LOWPOWERSTATECHANGE - can transition from a sleep state 58 * Number of memory banks that are power-controllable. On OMAP4430, the 77 * struct powerdomain - OMAP powerdomain 85 * @banks: Number of software-controllable memory banks in this powerdomain [all …]
|
| /Linux-v5.15/drivers/net/dsa/sja1105/ |
| D | sja1105_clocking.c | 1 // SPDX-License-Identifier: BSD-3-Clause 2 /* Copyright 2016-2018 NXP 3 * Copyright (c) 2018-2019, Vladimir Oltean <olteanv@gmail.com> 47 u64 pd; member 63 u64 pd; member 69 u64 pd; member 99 u64 pd; member 107 sja1105_packing(buf, &idiv->clksrc, 28, 24, size, op); in sja1105_cgu_idiv_packing() 108 sja1105_packing(buf, &idiv->autoblock, 11, 11, size, op); in sja1105_cgu_idiv_packing() 109 sja1105_packing(buf, &idiv->idiv, 5, 2, size, op); in sja1105_cgu_idiv_packing() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/tiny/ |
| D | simpledrm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 26 #define DRIVER_DESC "DRM driver for simple-framebuffer platform devices" 52 return -EINVAL; in simplefb_get_validated_int() 64 return -EINVAL; in simplefb_get_validated_int0() 79 return ERR_PTR(-EINVAL); in simplefb_get_validated_format() 83 if (!strcmp(format_name, fmt->name)) { in simplefb_get_validated_format() 84 info = drm_format_info(fmt->fourcc); in simplefb_get_validated_format() 86 return ERR_PTR(-EINVAL); in simplefb_get_validated_format() 95 return ERR_PTR(-EINVAL); in simplefb_get_validated_format() 100 const struct simplefb_platform_data *pd) in simplefb_get_width_pd() argument [all …]
|
| /Linux-v5.15/drivers/clk/davinci/ |
| D | psc.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 11 #include <linux/clk-provider.h> 15 #define LPSC_ALWAYS_ENABLED BIT(0) /* never disable this clock */ 52 * davinci_lpsc_clk_info - LPSC module-specific clock information 57 * @pd: the power domain id 65 u32 pd; member 75 .pd = (d), \ 89 /* Device-specific data */
|
| /Linux-v5.15/drivers/clk/renesas/ |
| D | clk-mstp.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * R-Car MSTP clocks 12 #include <linux/clk-provider.h> 31 * struct mstp_clock_group - MSTP gating clocks group 37 * @width_8bit: registers are 8-bit, not 32-bit 50 * struct mstp_clock - MSTP gating clock 51 * @hw: handle between common and hardware-specific interfaces 66 return group->width_8bit ? readb(reg) : readl(reg); in cpg_mstp_read() 72 group->width_8bit ? writeb(val, reg) : writel(val, reg); in cpg_mstp_write() 78 struct mstp_clock_group *group = clock->group; in cpg_mstp_clock_endisable() [all …]
|
| /Linux-v5.15/drivers/misc/eeprom/ |
| D | eeprom_93xx46.c | 1 // SPDX-License-Identifier: GPL-2.0-only 20 #include <linux/nvmem-provider.h> 70 return edev->pdata->quirks & EEPROM_93XX46_QUIRK_SINGLE_WORD_READ; in has_quirk_single_word_read() 75 return edev->pdata->quirks & EEPROM_93XX46_QUIRK_INSTRUCTION_LENGTH; in has_quirk_instruction_length() 80 return edev->pdata->quirks & EEPROM_93XX46_QUIRK_EXTRA_READ_CYCLE; in has_quirk_extra_read_cycle() 91 if (unlikely(off >= edev->size)) in eeprom_93xx46_read() 93 if ((off + count) > edev->size) in eeprom_93xx46_read() 94 count = edev->size - off; in eeprom_93xx46_read() 98 mutex_lock(&edev->lock); in eeprom_93xx46_read() 100 if (edev->pdata->prepare) in eeprom_93xx46_read() [all …]
|
| /Linux-v5.15/drivers/ptp/ |
| D | ptp_chardev.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * PTP 1588 clock support - character device implementation. 8 #include <linux/posix-clock.h> 32 err = ops->enable(ops, &rq, 0); in ptp_disable_pinfunc() 37 err = ops->enable(ops, &rq, 0); in ptp_disable_pinfunc() 42 return -EINVAL; in ptp_disable_pinfunc() 51 struct ptp_clock_info *info = ptp->info; in ptp_set_pinfunc() 52 struct ptp_pin_desc *pin1 = NULL, *pin2 = &info->pin_config[pin]; in ptp_set_pinfunc() 56 for (i = 0; i < info->n_pins; i++) { in ptp_set_pinfunc() 57 if (info->pin_config[i].func == func && in ptp_set_pinfunc() [all …]
|
| /Linux-v5.15/drivers/firmware/arm_scmi/ |
| D | notify.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2020-2021 ARM Ltd. 36 * All users provided callbacks and allocated notification-chains are stored in 44 * hash-keys. 54 * pushes the event-data itself on a protocol-dedicated kfifo queue for further 59 * queued items into the proper notification-chain: notifications processing can 65 * conveyed, converted into a custom per-event report struct, as the void *data 73 #define dev_fmt(fmt) "SCMI Notifications - " fmt 74 #define pr_fmt(fmt) "SCMI Notifications - " fmt 115 * Assumes that the stored obj includes its own hash-key in a field named 'key': [all …]
|
| /Linux-v5.15/include/linux/firmware/ |
| D | trusted_foundations.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 10 * Tegra-based devices sold on the market are concerned). Such devices can only 27 #include <asm/hardware/cache-l2x0.h> 44 void register_trusted_foundations(struct trusted_foundations_platform_data *pd); 54 struct trusted_foundations_platform_data *pd) in register_trusted_foundations() argument 58 * but disable features that cannot be provided. in register_trusted_foundations() 78 if (of_find_compatible_node(NULL, NULL, "tlm,trusted-foundations")) in of_register_trusted_foundations()
|
| /Linux-v5.15/include/linux/ |
| D | blk-cgroup.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 22 #include <linux/radix-tree.h> 28 /* percpu_counter batch for blkg_[rw]stats, per-cpu drift doesn't matter */ 82 * information per blkcg - q pair. 91 /* the blkg and policy id this per-policy data belongs to */ 97 * Policies that need to keep per-blkcg data which is independent from any 101 * cpd_init() is invoked to let each policy handle per-blkcg data. 104 /* the blkcg and policy id this per-policy data belongs to */ 117 /* all non-root blkcg_gq's are guaranteed to have access to parent */ 129 struct blkg_policy_data *pd[BLKCG_MAX_POLS]; member [all …]
|
| /Linux-v5.15/drivers/video/fbdev/omap2/omapfb/displays/ |
| D | encoder-tfp410.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * TFP410 DPI-to-DVI encoder driver 33 struct omap_dss_device *in = ddata->in; in tfp410_connect() 37 return -EBUSY; in tfp410_connect() 39 r = in->ops.dpi->connect(in, dssdev); in tfp410_connect() 43 dst->src = dssdev; in tfp410_connect() 44 dssdev->dst = dst; in tfp410_connect() 53 struct omap_dss_device *in = ddata->in; in tfp410_disconnect() 59 WARN_ON(dst != dssdev->dst); in tfp410_disconnect() 60 if (dst != dssdev->dst) in tfp410_disconnect() [all …]
|