/openbmc/linux/drivers/tty/serdev/ |
H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2016-2017 Linaro Ltd., Rob Herring <robh@kernel.org> 6 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. 26 static ssize_t modalias_show(struct device *dev, in modalias_show() argument 31 len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1); in modalias_show() 32 if (len != -ENODEV) in modalias_show() 35 return of_device_modalias(dev, buf, PAGE_SIZE); in modalias_show() 45 static int serdev_device_uevent(const struct device *dev, struct kobj_uevent_env *env) in serdev_device_uevent() argument 51 rc = acpi_device_uevent_modalias(dev, env); in serdev_device_uevent() 52 if (rc != -ENODEV) in serdev_device_uevent() [all …]
|
/openbmc/linux/drivers/slimbus/ |
H A D | qcom-ngd-ctrl.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. 11 #include <linux/dma-mapping.h> 26 /* NGD (Non-ported Generic Device) registers */ 104 #define to_ngd(d) container_of(d, struct qcom_slim_ngd, dev) 136 struct qcom_slim_ngd_ctrl *ctrl; member 151 struct slim_controller ctrl; member 154 struct device *dev; member 348 static int qcom_slim_qmi_send_select_inst_req(struct qcom_slim_ngd_ctrl *ctrl, in qcom_slim_qmi_send_select_inst_req() argument 355 rc = qmi_txn_init(ctrl->qmi.handle, &txn, in qcom_slim_qmi_send_select_inst_req() [all …]
|
H A D | qcom-ctrl.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2011-2017, The Linux Foundation 88 /* Resource group info for manager, and non-ported generic device-components */ 103 struct slim_controller ctrl; member 105 struct device *dev; member 120 static void qcom_slim_queue_tx(struct qcom_slim_ctrl *ctrl, void *buf, in qcom_slim_queue_tx() argument 125 __iowrite32_copy(ctrl->base + tx_reg, buf, count); in qcom_slim_queue_tx() 131 static void *slim_alloc_rxbuf(struct qcom_slim_ctrl *ctrl) in slim_alloc_rxbuf() argument 136 spin_lock_irqsave(&ctrl->rx.lock, flags); in slim_alloc_rxbuf() 137 if ((ctrl->rx.tail + 1) % ctrl->rx.n == ctrl->rx.head) { in slim_alloc_rxbuf() [all …]
|
H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2011-2017, The Linux Foundation 22 while (id->manf_id != 0 || id->prod_code != 0) { in slim_match() 23 if (id->manf_id == sbdev->e_addr.manf_id && in slim_match() 24 id->prod_code == sbdev->e_addr.prod_code && in slim_match() 25 id->dev_index == sbdev->e_addr.dev_index && in slim_match() 26 id->instance == sbdev->e_addr.instance) in slim_match() 33 static int slim_device_match(struct device *dev, struct device_driver *drv) in slim_device_match() argument 35 struct slim_device *sbdev = to_slim_device(dev); in slim_device_match() 39 if (of_driver_match_device(dev, drv)) in slim_device_match() [all …]
|
/openbmc/linux/drivers/spi/ |
H A D | spi-qcom-qspi.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2017-2018, The Linux foundation. All rights reserved. 6 #include <linux/dma-mapping.h> 17 #include <linux/spi/spi-mem.h> 160 * Number of entries in sgt returned from spi framework that- 169 struct device *dev; member 182 static u32 qspi_buswidth_to_iomode(struct qcom_qspi *ctrl, in qspi_buswidth_to_iomode() argument 193 dev_warn_once(ctrl->dev, in qspi_buswidth_to_iomode() 199 static void qcom_qspi_pio_xfer_cfg(struct qcom_qspi *ctrl) in qcom_qspi_pio_xfer_cfg() argument 205 xfer = &ctrl->xfer; in qcom_qspi_pio_xfer_cfg() [all …]
|
/openbmc/linux/drivers/soundwire/ |
H A D | qcom.c | 1 // SPDX-License-Identifier: GPL-2.0 101 #define SWRM_DP_PORT_CTRL_BANK(n, m) (0x1124 + 0x100 * (n - 1) + 0x40 * m) 102 #define SWRM_DP_PORT_CTRL_2_BANK(n, m) (0x1128 + 0x100 * (n - 1) + 0x40 * m) 103 #define SWRM_DP_BLOCK_CTRL_1(n) (0x112C + 0x100 * (n - 1)) 104 #define SWRM_DP_BLOCK_CTRL2_BANK(n, m) (0x1130 + 0x100 * (n - 1) + 0x40 * m) 105 #define SWRM_DP_PORT_HCTRL_BANK(n, m) (0x1134 + 0x100 * (n - 1) + 0x40 * m) 106 #define SWRM_DP_BLOCK_CTRL3_BANK(n, m) (0x1138 + 0x100 * (n - 1) + 0x40 * m) 107 #define SWRM_DP_SAMPLECTRL2_BANK(n, m) (0x113C + 0x100 * (n - 1) + 0x40 * m) 108 #define SWRM_DIN_DPn_PCM_PORT_CTRL(n) (0x1054 + 0x100 * (n - 1)) 124 #define SWRM_REG_VAL_PACK(data, dev, id, reg) \ argument [all …]
|
/openbmc/linux/drivers/pci/hotplug/ |
H A D | pciehp_core.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com) 8 * Copyright (C) 2003-2004 Intel Corporation 16 * Greg Kroah-Hartman <greg@kroah.com> 42 MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); 50 static int init_slot(struct controller *ctrl) in init_slot() argument 59 return -ENOMEM; in init_slot() 61 ops->enable_slot = pciehp_sysfs_enable_slot; in init_slot() 62 ops->disable_slot = pciehp_sysfs_disable_slot; in init_slot() 63 ops->get_power_status = get_power_status; in init_slot() [all …]
|
/openbmc/linux/drivers/nvme/host/ |
H A D | sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (c) 2011-2014, Intel Corporation. 8 #include <linux/nvme-auth.h> 13 static ssize_t nvme_sysfs_reset(struct device *dev, in nvme_sysfs_reset() argument 17 struct nvme_ctrl *ctrl = dev_get_drvdata(dev); in nvme_sysfs_reset() local 20 ret = nvme_reset_ctrl_sync(ctrl); in nvme_sysfs_reset() 27 static ssize_t nvme_sysfs_rescan(struct device *dev, in nvme_sysfs_rescan() argument 31 struct nvme_ctrl *ctrl = dev_get_drvdata(dev); in nvme_sysfs_rescan() local 33 nvme_queue_scan(ctrl); in nvme_sysfs_rescan() 38 static inline struct nvme_ns_head *dev_to_ns_head(struct device *dev) in dev_to_ns_head() argument [all …]
|
H A D | pci.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2011-2014, Intel Corporation. 10 #include <linux/blk-mq.h> 11 #include <linux/blk-mq-pci.h> 12 #include <linux/blk-integrity.h> 25 #include <linux/t10-pi.h> 27 #include <linux/io-64-nonatomic-lo-hi.h> 28 #include <linux/io-64-nonatomic-hi-lo.h> 29 #include <linux/sed-opal.h> 30 #include <linux/pci-p2pdma.h> [all …]
|
H A D | rdma.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2015-2016 HGST, a Western Digital Company. 14 #include <linux/blk-mq.h> 15 #include <linux/blk-integrity.h> 25 #include <linux/nvme-rdma.h> 43 struct ib_device *dev; member 89 struct nvme_rdma_ctrl *ctrl; member 125 struct nvme_ctrl ctrl; member 130 static inline struct nvme_rdma_ctrl *to_rdma_ctrl(struct nvme_ctrl *ctrl) in to_rdma_ctrl() argument 132 return container_of(ctrl, struct nvme_rdma_ctrl, ctrl); in to_rdma_ctrl() [all …]
|
/openbmc/linux/drivers/spmi/ |
H A D | spmi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. 16 #include <dt-bindings/spmi/spmi.h> 23 static void spmi_dev_release(struct device *dev) in spmi_dev_release() argument 25 struct spmi_device *sdev = to_spmi_device(dev); in spmi_dev_release() 34 static void spmi_ctrl_release(struct device *dev) in spmi_ctrl_release() argument 36 struct spmi_controller *ctrl = to_spmi_controller(dev); in spmi_ctrl_release() local 38 ida_free(&ctrl_ida, ctrl->nr); in spmi_ctrl_release() 39 kfree(ctrl); in spmi_ctrl_release() 46 static int spmi_device_match(struct device *dev, struct device_driver *drv) in spmi_device_match() argument [all …]
|
H A D | hisi-spmi-controller.c | 1 // SPDX-License-Identifier: GPL-2.0 76 struct device *dev; member 82 static int spmi_controller_wait_for_done(struct device *dev, in spmi_controller_wait_for_done() argument 90 offset += SPMI_CHANNEL_OFFSET * ctrl_dev->channel + SPMI_SLAVE_OFFSET * sid; in spmi_controller_wait_for_done() 97 dev_err(dev, "%s: transaction failed (0x%x)\n", in spmi_controller_wait_for_done() 99 return -EIO; in spmi_controller_wait_for_done() 101 dev_dbg(dev, "%s: status 0x%x\n", __func__, status); in spmi_controller_wait_for_done() 105 } while (timeout--); in spmi_controller_wait_for_done() 107 dev_err(dev, "%s: timeout, status 0x%x\n", __func__, status); in spmi_controller_wait_for_done() 108 return -ETIMEDOUT; in spmi_controller_wait_for_done() [all …]
|
/openbmc/linux/drivers/staging/vc04_services/bcm2835-camera/ |
H A D | controls.c | 1 // SPDX-License-Identifier: GPL-2.0 18 #include <media/videobuf2-vmalloc.h> 19 #include <media/v4l2-device.h> 20 #include <media/v4l2-ioctl.h> 21 #include <media/v4l2-ctrls.h> 22 #include <media/v4l2-fh.h> 23 #include <media/v4l2-event.h> 24 #include <media/v4l2-common.h> 26 #include "../vchiq-mmal/mmal-common.h" 27 #include "../vchiq-mmal/mmal-vchiq.h" [all …]
|
/openbmc/linux/drivers/watchdog/ |
H A D | realtek_otto_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * - Base prescale of (2 << 25), providing tick duration T_0: 168ms @ 200MHz 11 * - PRESCALE: logarithmic prescaler adding a factor of {1, 2, 4, 8} 12 * - Phase 1: Times out after (PHASE1 + 1) × PRESCALE × T_0 14 * - Phase 2: starts after phase 1, times out after (PHASE2 + 1) × PRESCALE × T_0 68 struct device *dev; member 76 struct otto_wdt_ctrl *ctrl = watchdog_get_drvdata(wdev); in otto_wdt_start() local 79 v = ioread32(ctrl->base + OTTO_WDT_REG_CTRL); in otto_wdt_start() 81 iowrite32(v, ctrl->base + OTTO_WDT_REG_CTRL); in otto_wdt_start() 88 struct otto_wdt_ctrl *ctrl = watchdog_get_drvdata(wdev); in otto_wdt_stop() local [all …]
|
/openbmc/linux/drivers/mtd/nand/raw/ |
H A D | tegra_nand.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (C) 2014-2015 Lucas Stach <dev@lynxeye.de> 10 #include <linux/dma-mapping.h> 34 #define COMMAND_TRANS_SIZE(size) ((((size) - 1) & 0xf) << 20) 40 #define COMMAND_CLE_SIZE(size) ((((size) - 1) & 0x3) << 4) 41 #define COMMAND_ALE_SIZE(size) ((((size) - 1) & 0xf) << 0) 156 #define OFFSET(val, off) ((val) < (off) ? 0 : (val) - (off)) 171 struct device *dev; member 207 int bytes_per_step = DIV_ROUND_UP(BITS_PER_STEP_RS * chip->ecc.strength, in tegra_nand_ooblayout_rs_ecc() 211 return -ERANGE; in tegra_nand_ooblayout_rs_ecc() [all …]
|
/openbmc/linux/sound/soc/atmel/ |
H A D | mchp-spdiftx.c | 1 // SPDX-License-Identifier: GPL-2.0 22 * ---- S/PDIF Transmitter Controller Register map ---- 39 * ---- Control Register (Write-only) ---- 45 * ---- Mode Register (Read/Write) ---- 92 * ---- Interrupt Enable/Disable/Mask/Status Register (Write/Read-only) ---- 107 static bool mchp_spdiftx_readable_reg(struct device *dev, unsigned int reg) in mchp_spdiftx_readable_reg() argument 131 static bool mchp_spdiftx_writeable_reg(struct device *dev, unsigned int reg) in mchp_spdiftx_writeable_reg() argument 157 static bool mchp_spdiftx_precious_reg(struct device *dev, unsigned int reg) in mchp_spdiftx_precious_reg() argument 193 struct device *dev; member 201 static inline int mchp_spdiftx_is_running(struct mchp_spdiftx_dev *dev) in mchp_spdiftx_is_running() argument [all …]
|
/openbmc/linux/drivers/mtd/nand/raw/brcmnand/ |
H A D | brcmnand.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright © 2010-2015 Broadcom Corporation 17 #include <linux/dma-mapping.h> 215 struct device *dev; member 237 /* List of NAND hosts (one for each chip-select) */ 240 /* EDU info, per-transaction */ 261 /* in-memory cache of the FLASH_CACHE, used only for some commands */ 267 const u8 *cs_offsets; /* within each chip-select */ 278 /* for low-power standby/resume only */ 298 /* use for low-power standby/resume only */ [all …]
|
/openbmc/linux/drivers/media/test-drivers/vivid/ |
H A D | vivid-ctrls.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * vivid-ctrls.c - control support functions. 11 #include <media/v4l2-event.h> 12 #include <media/v4l2-common.h> 14 #include "vivid-core.h" 15 #include "vivid-vid-cap.h" 16 #include "vivid-vid-out.h" 17 #include "vivid-vid-common.h" 18 #include "vivid-radio-common.h" 19 #include "vivid-osd.h" [all …]
|
/openbmc/linux/drivers/gpio/ |
H A D | gpio-ath79.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com> 7 * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> 13 #include <linux/platform_data/gpio-ath79.h> 44 static u32 ath79_gpio_read(struct ath79_gpio_ctrl *ctrl, unsigned reg) in ath79_gpio_read() argument 46 return readl(ctrl->base + reg); in ath79_gpio_read() 49 static void ath79_gpio_write(struct ath79_gpio_ctrl *ctrl, in ath79_gpio_write() argument 52 writel(val, ctrl->base + reg); in ath79_gpio_write() 56 struct ath79_gpio_ctrl *ctrl, unsigned reg, u32 mask, u32 bits) in ath79_gpio_update_bits() argument 60 old_val = ath79_gpio_read(ctrl, reg); in ath79_gpio_update_bits() [all …]
|
H A D | gpio-idt3243x.c | 1 // SPDX-License-Identifier: GPL-2.0 30 struct idt_gpio_ctrl *ctrl = gpiochip_get_data(gc); in idt_gpio_dispatch() local 37 pending = readl(ctrl->pic + IDT_PIC_IRQ_PEND); in idt_gpio_dispatch() 38 pending &= ~ctrl->mask_cache; in idt_gpio_dispatch() 39 for_each_set_bit(bit, &pending, gc->ngpio) { in idt_gpio_dispatch() 40 virq = irq_linear_revmap(gc->irq.domain, bit); in idt_gpio_dispatch() 51 struct idt_gpio_ctrl *ctrl = gpiochip_get_data(gc); in idt_gpio_irq_set_type() local 58 return -EINVAL; in idt_gpio_irq_set_type() 60 raw_spin_lock_irqsave(&gc->bgpio_lock, flags); in idt_gpio_irq_set_type() 62 ilevel = readl(ctrl->gpio + IDT_GPIO_ILEVEL); in idt_gpio_irq_set_type() [all …]
|
/openbmc/u-boot/drivers/usb/host/ |
H A D | ehci-hcd.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /*- 3 * Copyright (c) 2007-2008, Juniper Networks, Inc. 50 2, /* bNrPorts -- runtime modified */ 115 return dev_get_priv(usb_get_bus(udev->dev)); in ehci_get_ctrl() 117 return udev->controller; in ehci_get_ctrl() 121 static int ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg) in ehci_get_port_speed() argument 126 static void ehci_set_usbmode(struct ehci_ctrl *ctrl) in ehci_set_usbmode() argument 131 reg_ptr = (uint32_t *)((u8 *)&ctrl->hcor->or_usbcmd + USBMODE); in ehci_set_usbmode() 142 static void ehci_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg, in ehci_powerup_fixup() argument [all …]
|
/openbmc/linux/drivers/media/usb/uvc/ |
H A D | uvc_ctrl.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * uvc_ctrl.c -- USB Video Class driver - Controls 5 * Copyright (C) 2005-2010 23 #include <media/v4l2-ctrls.h> 35 /* ------------------------------------------------------------------------ 380 * The function returns -EINVAL if the V4L2 menu index @idx isn't valid for the 387 if (!test_bit(idx, &mapping->menu_mask)) in uvc_mapping_get_menu_value() 388 return -EINVAL; in uvc_mapping_get_menu_value() 390 if (mapping->menu_mapping) in uvc_mapping_get_menu_value() 391 return mapping->menu_mapping[idx]; in uvc_mapping_get_menu_value() [all …]
|
/openbmc/linux/drivers/memory/ |
H A D | fsl_ifc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 29 * convert_ifc_address - convert the base address 39 * fsl_ifc_find - find IFC bank 51 if (!fsl_ifc_ctrl_dev || !fsl_ifc_ctrl_dev->gregs) in fsl_ifc_find() 52 return -ENODEV; in fsl_ifc_find() 54 for (i = 0; i < fsl_ifc_ctrl_dev->banks; i++) { in fsl_ifc_find() 55 u32 cspr = ifc_in32(&fsl_ifc_ctrl_dev->gregs->cspr_cs[i].cspr); in fsl_ifc_find() 62 return -ENOENT; in fsl_ifc_find() 66 static int fsl_ifc_ctrl_init(struct fsl_ifc_ctrl *ctrl) in fsl_ifc_ctrl_init() argument 68 struct fsl_ifc_global __iomem *ifc = ctrl->gregs; in fsl_ifc_ctrl_init() [all …]
|
/openbmc/linux/arch/powerpc/sysdev/ |
H A D | fsl_lbc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright © 2007-2008 MontaVista Software, Inc. 10 * Author: Roy Zang <tie-fei.zang@freescale.com> 36 * fsl_lbc_addr - convert the base address 46 struct device_node *np = fsl_lbc_ctrl_dev->dev->of_node; in fsl_lbc_addr() 57 * fsl_lbc_find - find Localbus bank 70 if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs) in fsl_lbc_find() 71 return -ENODEV; in fsl_lbc_find() 73 lbc = fsl_lbc_ctrl_dev->regs; in fsl_lbc_find() 74 for (i = 0; i < ARRAY_SIZE(lbc->bank); i++) { in fsl_lbc_find() [all …]
|
/openbmc/linux/drivers/rtc/ |
H A D | rtc-mpfs.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (c) 2021-2022 Microchip Corporation. All rights reserved. 63 u32 ctrl; in mpfs_rtc_start() local 65 ctrl = readl(rtcdev->base + CONTROL_REG); in mpfs_rtc_start() 66 ctrl &= ~CONTROL_STOP_BIT; in mpfs_rtc_start() 67 ctrl |= CONTROL_START_BIT; in mpfs_rtc_start() 68 writel(ctrl, rtcdev->base + CONTROL_REG); in mpfs_rtc_start() 73 u32 val = readl(rtcdev->base + CONTROL_REG); in mpfs_rtc_clear_irq() 77 writel(val, rtcdev->base + CONTROL_REG); in mpfs_rtc_clear_irq() 83 (void)readl(rtcdev->base + CONTROL_REG); in mpfs_rtc_clear_irq() [all …]
|