| /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 */ 103 #define to_ngd(d) container_of(d, struct qcom_slim_ngd, dev) 135 struct qcom_slim_ngd_ctrl *ctrl; member 150 struct slim_controller ctrl; member 153 struct device *dev; member 347 static int qcom_slim_qmi_send_select_inst_req(struct qcom_slim_ngd_ctrl *ctrl, in qcom_slim_qmi_send_select_inst_req() argument 354 rc = qmi_txn_init(ctrl->qmi.handle, &txn, in qcom_slim_qmi_send_select_inst_req() [all …]
|
| /linux/drivers/soundwire/ |
| H A D | qcom.c | 1 // SPDX-License-Identifier: GPL-2.0 102 #define SWRM_DP_PORT_CTRL_BANK(n, m) (0x1124 + 0x100 * (n - 1) + 0x40 * m) 103 #define SWRM_DP_PORT_CTRL_2_BANK(n, m) (0x1128 + 0x100 * (n - 1) + 0x40 * m) 104 #define SWRM_DP_BLOCK_CTRL_1(n) (0x112C + 0x100 * (n - 1)) 105 #define SWRM_DP_BLOCK_CTRL2_BANK(n, m) (0x1130 + 0x100 * (n - 1) + 0x40 * m) 106 #define SWRM_DP_PORT_HCTRL_BANK(n, m) (0x1134 + 0x100 * (n - 1) + 0x40 * m) 107 #define SWRM_DP_BLOCK_CTRL3_BANK(n, m) (0x1138 + 0x100 * (n - 1) + 0x40 * m) 108 #define SWRM_DP_SAMPLECTRL2_BANK(n, m) (0x113C + 0x100 * (n - 1) + 0x40 * m) 109 #define SWRM_DIN_DPn_PCM_PORT_CTRL(n) (0x1054 + 0x100 * (n - 1)) 125 #define SWRM_REG_VAL_PACK(data, dev, id, reg) \ argument [all …]
|
| /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 ssize_t nvme_adm_passthru_err_log_enabled_show(struct device *dev, in nvme_adm_passthru_err_log_enabled_show() 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-dma.h> 11 #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> 34 #define SQ_SIZE(q) ((q)->q_depth << (q)->sqes) 35 #define CQ_SIZE(q) ((q)->q_depth * sizeof(struct nvme_completion)) [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 …]
|
| H A D | hwmon.c | 1 // SPDX-License-Identifier: GPL-2.0 14 struct nvme_ctrl *ctrl; member 19 static int nvme_get_temp_thresh(struct nvme_ctrl *ctrl, int sensor, bool under, in nvme_get_temp_thresh() argument 29 ret = nvme_get_features(ctrl, NVME_FEAT_TEMP_THRESH, threshold, NULL, 0, in nvme_get_temp_thresh() 32 return -EIO; in nvme_get_temp_thresh() 40 static int nvme_set_temp_thresh(struct nvme_ctrl *ctrl, int sensor, bool under, in nvme_set_temp_thresh() argument 52 ret = nvme_set_features(ctrl, NVME_FEAT_TEMP_THRESH, threshold, NULL, 0, in nvme_set_temp_thresh() 55 return -EIO; in nvme_set_temp_thresh() 62 return nvme_get_log(data->ctrl, NVME_NSID_ALL, NVME_LOG_SMART, 0, in nvme_hwmon_get_smart_log() 63 NVME_CSI_NVM, data->log, sizeof(*data->log), 0); in nvme_hwmon_get_smart_log() [all …]
|
| /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> 43 MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); 51 static int init_slot(struct controller *ctrl) in init_slot() argument 60 return -ENOMEM; in init_slot() 62 ops->enable_slot = pciehp_sysfs_enable_slot; in init_slot() 63 ops->disable_slot = pciehp_sysfs_disable_slot; in init_slot() 64 ops->get_power_status = get_power_status; in init_slot() [all …]
|
| H A D | pciehp_pci.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 25 * pciehp_configure_device() - enumerate PCI devices below a hotplug bridge 26 * @ctrl: PCIe hotplug controller 29 * Return 0 on success, %-EEXIST if the devices are already enumerated or 30 * %-ENODEV if enumeration failed. 32 int pciehp_configure_device(struct controller *ctrl) in pciehp_configure_device() argument 34 struct pci_dev *dev; in pciehp_configure_device() local 35 struct pci_dev *bridge = ctrl->pcie->port; in pciehp_configure_device() [all …]
|
| /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 …]
|
| /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 …]
|
| /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 …]
|
| /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 …]
|
| /linux/drivers/nvme/target/ |
| H A D | pci-epf.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * REDS Institute, HEIG-VD, HES-SO, Switzerland 19 #include <linux/pci-epc.h> 20 #include <linux/pci-epf.h> 31 * allow up to 128 page-sized segments. For the maximum allowed, 36 (NVMET_PCI_EPF_MAX_SEGS << (PAGE_SHIFT - 10)) 84 struct nvmet_pci_epf_ctrl *ctrl; member 129 struct nvmet_pci_epf_ctrl *ctrl; member 162 struct device *dev; member 209 struct nvmet_pci_epf_ctrl ctrl; member [all …]
|
| /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 …]
|
| /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 …]
|
| /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 …]
|
| H A D | rtc-ds1305.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rtc-ds1305.c -- driver for DS1305 and DS1306 SPI RTC chips 21 * otherwise you're reading it. All non-bitmask values are BCD. 27 * - Need fancy "hours" encoding in 12hour mode 28 * - Don't rely on the "day-of-week" field (or tm_wday) 29 * - Are a 21st-century clock (2000 <= year < 2100) 50 * NOTE ALSO that while we could generate once-a-second IRQs (UIE), we 94 u8 ctrl[DS1305_CONTROL_LEN]; member 98 /*----------------------------------------------------------------------*/ 101 * Utilities ... tolerate 12-hour AM/PM notation in case of non-Linux [all …]
|
| H A D | rtc-rv8803.c | 1 // SPDX-License-Identifier: GPL-2.0 72 u8 ctrl; member 89 while ((ret == -ENXIO || ret == -EIO) && --try); in rv8803_read_reg() 91 dev_err(&client->dev, "Unable to read register 0x%02x\n", reg); in rv8803_read_reg() 104 while ((ret == -ENXIO || ret == -EIO) && --try); in rv8803_read_regs() 106 dev_err(&client->dev, in rv8803_read_regs() 108 reg, reg + count - 1); in rv8803_read_regs() 109 return ret < 0 ? ret : -EIO; in rv8803_read_regs() 122 while ((ret == -ENXIO || ret == -EIO) && --try); in rv8803_write_reg() 124 dev_err(&client->dev, "Unable to write register 0x%02x\n", reg); in rv8803_write_reg() [all …]
|
| /linux/drivers/gpio/ |
| H A D | gpio-en7523.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 * struct airoha_gpio_ctrl - Airoha GPIO driver data 33 struct airoha_gpio_ctrl *ctrl = gpiochip_get_data(gc); in airoha_dir_set() local 34 u32 dir = ioread32(ctrl->dir[gpio / 16]); in airoha_dir_set() 35 u32 output = ioread32(ctrl->output); in airoha_dir_set() 46 iowrite32(dir, ctrl->dir[gpio / 16]); in airoha_dir_set() 49 gpio_generic_chip_set(&ctrl->gen_gc, gpio, val); in airoha_dir_set() 51 iowrite32(output, ctrl->output); in airoha_dir_set() 69 struct airoha_gpio_ctrl *ctrl = gpiochip_get_data(gc); in airoha_get_dir() local 70 u32 dir = ioread32(ctrl->dir[gpio / 16]); in airoha_get_dir() [all …]
|
| /linux/drivers/comedi/drivers/ |
| H A D | comedi_parport.c | 1 // SPDX-License-Identifier: GPL-2.0+ 9 * COMEDI - Linux Control and Measurement Device Interface 19 * Updated: Tue, 30 Apr 2002 21:11:45 -0700 32 * ----- ------ ---- ---- -------------- 50 * 18-25 ground 71 static int parport_data_reg_insn_bits(struct comedi_device *dev, in parport_data_reg_insn_bits() argument 77 outb(s->state, dev->iobase + PARPORT_DATA_REG); in parport_data_reg_insn_bits() 79 data[1] = inb(dev->iobase + PARPORT_DATA_REG); in parport_data_reg_insn_bits() 81 return insn->n; in parport_data_reg_insn_bits() 84 static int parport_data_reg_insn_config(struct comedi_device *dev, in parport_data_reg_insn_config() argument [all …]
|
| /linux/drivers/pci/msi/ |
| H A D | pcidev_msi.c | 1 // SPDX-License-Identifier: GPL-2.0 12 void pci_msi_init(struct pci_dev *dev) in pci_msi_init() argument 14 u16 ctrl; in pci_msi_init() local 16 dev->msi_cap = pci_find_capability(dev, PCI_CAP_ID_MSI); in pci_msi_init() 17 if (!dev->msi_cap) in pci_msi_init() 20 pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &ctrl); in pci_msi_init() 21 if (ctrl & PCI_MSI_FLAGS_ENABLE) { in pci_msi_init() 22 pci_write_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, in pci_msi_init() 23 ctrl & ~PCI_MSI_FLAGS_ENABLE); in pci_msi_init() 26 if (!(ctrl & PCI_MSI_FLAGS_64BIT)) in pci_msi_init() [all …]
|
| /linux/drivers/video/fbdev/mmp/hw/ |
| H A D | mmp_ctrl.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 20 #include <linux/dma-mapping.h> 32 struct mmphw_ctrl *ctrl = (struct mmphw_ctrl *)dev_id; in ctrl_handle_irq() local 35 isr = readl_relaxed(ctrl->reg_base + SPU_IRQ_ISR); in ctrl_handle_irq() 36 imask = readl_relaxed(ctrl->reg_base + SPU_IRQ_ENA); in ctrl_handle_irq() 40 tmp = readl_relaxed(ctrl->reg_base + SPU_IRQ_ISR); in ctrl_handle_irq() 42 writel_relaxed(~isr, ctrl->reg_base + SPU_IRQ_ISR); in ctrl_handle_irq() 43 } while ((isr = readl_relaxed(ctrl->reg_base + SPU_IRQ_ISR)) & imask); in ctrl_handle_irq() 122 struct mmp_path *path = overlay->path; in dmafetch_set_fmt() 123 tmp = readl_relaxed(ctrl_regs(path) + dma_ctrl(0, path->id)); in dmafetch_set_fmt() [all …]
|
| /linux/drivers/platform/surface/aggregator/ |
| H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Provides access to a SAM-over-SSH connected EC via a controller device. 10 * Copyright (C) 2019-2022 Maximilian Luz <luzmaximilian@gmail.com> 37 /* -- Static controller reference. ------------------------------------------ */ 47 * ssam_get_controller() - Get reference to SSAM controller. 57 struct ssam_controller *ctrl; in ssam_get_controller() local 61 ctrl = __ssam_controller; in ssam_get_controller() 62 if (!ctrl) in ssam_get_controller() 65 if (WARN_ON(!kref_get_unless_zero(&ctrl->kref))) in ssam_get_controller() 66 ctrl = NULL; in ssam_get_controller() [all …]
|
| /linux/drivers/regulator/ |
| H A D | vctrl-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0-only 27 struct vctrl_voltage_range ctrl; member 32 int ctrl; member 50 struct vctrl_voltage_range *ctrl = &vctrl->vrange.ctrl; in vctrl_calc_ctrl_voltage() local 51 struct vctrl_voltage_range *out = &vctrl->vrange.out; in vctrl_calc_ctrl_voltage() 53 return ctrl->min_uV + in vctrl_calc_ctrl_voltage() 54 DIV_ROUND_CLOSEST_ULL((s64)(out_uV - out->min_uV) * in vctrl_calc_ctrl_voltage() 55 (ctrl->max_uV - ctrl->min_uV), in vctrl_calc_ctrl_voltage() 56 out->max_uV - out->min_uV); in vctrl_calc_ctrl_voltage() 61 struct vctrl_voltage_range *ctrl = &vctrl->vrange.ctrl; in vctrl_calc_output_voltage() local [all …]
|
| /linux/include/linux/ |
| H A D | spmi.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 34 * struct spmi_device - Basic representation of an SPMI device 35 * @dev: Driver model representation of the device. 36 * @ctrl: SPMI controller managing the bus hosting this device. 40 struct device dev; member 41 struct spmi_controller *ctrl; member 47 return container_of(d, struct spmi_device, dev); in to_spmi_device() 52 return dev_get_drvdata(&sdev->dev); in spmi_device_get_drvdata() 57 dev_set_drvdata(&sdev->dev, data); in spmi_device_set_drvdata() [all …]
|