Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 1647) sorted by relevance

12345678910>>...66

/linux-4.19.296/drivers/thunderbolt/
Dcap.c35 u32 offset; in tb_port_find_cap() local
43 offset = 0x39; in tb_port_find_cap()
45 offset = 0x1; in tb_port_find_cap()
51 ret = tb_port_read(port, &header, TB_CFG_PORT, offset, 1); in tb_port_find_cap()
56 return offset; in tb_port_find_cap()
58 offset = header.basic.next; in tb_port_find_cap()
59 } while (offset); in tb_port_find_cap()
66 int offset = sw->config.first_cap_offset; in tb_switch_find_cap() local
68 while (offset > 0 && offset < CAP_OFFSET_MAX) { in tb_switch_find_cap()
72 ret = tb_sw_read(sw, &header, TB_CFG_SWITCH, offset, 1); in tb_switch_find_cap()
[all …]
/linux-4.19.296/drivers/gpio/
Dgpio-cs5535.c86 static void __cs5535_gpio_set(struct cs5535_gpio_chip *chip, unsigned offset, in __cs5535_gpio_set() argument
89 if (offset < 16) in __cs5535_gpio_set()
91 outl(1 << offset, chip->base + reg); in __cs5535_gpio_set()
94 errata_outl(chip, 1 << (offset - 16), reg); in __cs5535_gpio_set()
97 void cs5535_gpio_set(unsigned offset, unsigned int reg) in cs5535_gpio_set() argument
103 __cs5535_gpio_set(chip, offset, reg); in cs5535_gpio_set()
108 static void __cs5535_gpio_clear(struct cs5535_gpio_chip *chip, unsigned offset, in __cs5535_gpio_clear() argument
111 if (offset < 16) in __cs5535_gpio_clear()
113 outl(1 << (offset + 16), chip->base + reg); in __cs5535_gpio_clear()
116 errata_outl(chip, 1 << offset, reg); in __cs5535_gpio_clear()
[all …]
Dgpio-eic-sprd.c140 static void sprd_eic_update(struct gpio_chip *chip, unsigned int offset, in sprd_eic_update() argument
145 sprd_eic_offset_base(sprd_eic, offset / SPRD_EIC_PER_BANK_NR); in sprd_eic_update()
153 tmp |= BIT(SPRD_EIC_BIT(offset)); in sprd_eic_update()
155 tmp &= ~BIT(SPRD_EIC_BIT(offset)); in sprd_eic_update()
161 static int sprd_eic_read(struct gpio_chip *chip, unsigned int offset, u16 reg) in sprd_eic_read() argument
165 sprd_eic_offset_base(sprd_eic, offset / SPRD_EIC_PER_BANK_NR); in sprd_eic_read()
167 return !!(readl_relaxed(base + reg) & BIT(SPRD_EIC_BIT(offset))); in sprd_eic_read()
170 static int sprd_eic_request(struct gpio_chip *chip, unsigned int offset) in sprd_eic_request() argument
172 sprd_eic_update(chip, offset, SPRD_EIC_DBNC_DMSK, 1); in sprd_eic_request()
176 static void sprd_eic_free(struct gpio_chip *chip, unsigned int offset) in sprd_eic_free() argument
[all …]
Dgpio-aspeed.c254 static const struct aspeed_gpio_bank *to_bank(unsigned int offset) in to_bank() argument
256 unsigned int bank = GPIO_BANK(offset); in to_bank()
268 struct aspeed_gpio *gpio, unsigned int offset) in find_bank_props() argument
273 if (props->bank == GPIO_BANK(offset)) in find_bank_props()
281 static inline bool have_gpio(struct aspeed_gpio *gpio, unsigned int offset) in have_gpio() argument
283 const struct aspeed_bank_props *props = find_bank_props(gpio, offset); in have_gpio()
284 const struct aspeed_gpio_bank *bank = to_bank(offset); in have_gpio()
285 unsigned int group = GPIO_OFFSET(offset) / 8; in have_gpio()
288 (!props || ((props->input | props->output) & GPIO_BIT(offset))); in have_gpio()
291 static inline bool have_input(struct aspeed_gpio *gpio, unsigned int offset) in have_input() argument
[all …]
Dgpio-sprd.c48 static void sprd_gpio_update(struct gpio_chip *chip, unsigned int offset, in sprd_gpio_update() argument
53 offset / SPRD_GPIO_BANK_NR); in sprd_gpio_update()
61 tmp |= BIT(SPRD_GPIO_BIT(offset)); in sprd_gpio_update()
63 tmp &= ~BIT(SPRD_GPIO_BIT(offset)); in sprd_gpio_update()
69 static int sprd_gpio_read(struct gpio_chip *chip, unsigned int offset, u16 reg) in sprd_gpio_read() argument
73 offset / SPRD_GPIO_BANK_NR); in sprd_gpio_read()
75 return !!(readl_relaxed(base + reg) & BIT(SPRD_GPIO_BIT(offset))); in sprd_gpio_read()
78 static int sprd_gpio_request(struct gpio_chip *chip, unsigned int offset) in sprd_gpio_request() argument
80 sprd_gpio_update(chip, offset, SPRD_GPIO_DMSK, 1); in sprd_gpio_request()
84 static void sprd_gpio_free(struct gpio_chip *chip, unsigned int offset) in sprd_gpio_free() argument
[all …]
Dgpio-lp3943.c48 static int lp3943_gpio_request(struct gpio_chip *chip, unsigned offset) in lp3943_gpio_request() argument
54 if (test_and_set_bit(offset, &lp3943->pin_used)) in lp3943_gpio_request()
60 static void lp3943_gpio_free(struct gpio_chip *chip, unsigned offset) in lp3943_gpio_free() argument
65 clear_bit(offset, &lp3943->pin_used); in lp3943_gpio_free()
68 static int lp3943_gpio_set_mode(struct lp3943_gpio *lp3943_gpio, u8 offset, in lp3943_gpio_set_mode() argument
74 return lp3943_update_bits(lp3943, mux[offset].reg, mux[offset].mask, in lp3943_gpio_set_mode()
75 val << mux[offset].shift); in lp3943_gpio_set_mode()
78 static int lp3943_gpio_direction_input(struct gpio_chip *chip, unsigned offset) in lp3943_gpio_direction_input() argument
82 lp3943_gpio->input_mask |= BIT(offset); in lp3943_gpio_direction_input()
84 return lp3943_gpio_set_mode(lp3943_gpio, offset, LP3943_GPIO_IN); in lp3943_gpio_direction_input()
[all …]
Dgpio-max730x.c51 static int max7301_direction_input(struct gpio_chip *chip, unsigned offset) in max7301_direction_input() argument
59 offset += 4; in max7301_direction_input()
60 offset_bits = (offset & 3) << 1; in max7301_direction_input()
62 config = &ts->port_config[offset >> 2]; in max7301_direction_input()
64 if (ts->input_pullup_active & BIT(offset)) in max7301_direction_input()
74 ret = ts->write(ts->dev, 0x08 + (offset >> 2), *config); in max7301_direction_input()
81 static int __max7301_set(struct max7301 *ts, unsigned offset, int value) in __max7301_set() argument
84 ts->out_level |= 1 << offset; in __max7301_set()
85 return ts->write(ts->dev, 0x20 + offset, 0x01); in __max7301_set()
87 ts->out_level &= ~(1 << offset); in __max7301_set()
[all …]
Dgpio-lp87565.c29 static int lp87565_gpio_get(struct gpio_chip *chip, unsigned int offset) in lp87565_gpio_get() argument
38 return !!(val & BIT(offset)); in lp87565_gpio_get()
41 static void lp87565_gpio_set(struct gpio_chip *chip, unsigned int offset, in lp87565_gpio_set() argument
47 BIT(offset), value ? BIT(offset) : 0); in lp87565_gpio_set()
51 unsigned int offset) in lp87565_gpio_get_direction() argument
60 return !(val & BIT(offset)); in lp87565_gpio_get_direction()
64 unsigned int offset) in lp87565_gpio_direction_input() argument
70 BIT(offset), 0); in lp87565_gpio_direction_input()
74 unsigned int offset, int value) in lp87565_gpio_direction_output() argument
78 lp87565_gpio_set(chip, offset, value); in lp87565_gpio_direction_output()
[all …]
Dgpio-da9055.c27 #define DA9055_PORT_SHIFT(offset) (4 * (offset % 2)) argument
38 static int da9055_gpio_get(struct gpio_chip *gc, unsigned offset) in da9055_gpio_get() argument
45 ret = da9055_reg_read(gpio->da9055, (offset >> 1) + DA9055_REG_GPIO0_1); in da9055_gpio_get()
49 gpio_direction = ret & (DA9055_PORT_MASK) << DA9055_PORT_SHIFT(offset); in da9055_gpio_get()
50 gpio_direction >>= DA9055_PORT_SHIFT(offset); in da9055_gpio_get()
63 return ret & (1 << offset); in da9055_gpio_get()
67 static void da9055_gpio_set(struct gpio_chip *gc, unsigned offset, int value) in da9055_gpio_set() argument
73 1 << offset, in da9055_gpio_set()
74 value << offset); in da9055_gpio_set()
77 static int da9055_gpio_direction_input(struct gpio_chip *gc, unsigned offset) in da9055_gpio_direction_input() argument
[all …]
Dgpio-msic.c74 static int msic_gpio_to_ireg(unsigned offset) in msic_gpio_to_ireg() argument
76 if (offset >= MSIC_NUM_GPIO) in msic_gpio_to_ireg()
79 if (offset < 8) in msic_gpio_to_ireg()
80 return INTEL_MSIC_GPIO0LV0CTLI - offset; in msic_gpio_to_ireg()
81 if (offset < 16) in msic_gpio_to_ireg()
82 return INTEL_MSIC_GPIO1LV0CTLI - offset + 8; in msic_gpio_to_ireg()
83 if (offset < 20) in msic_gpio_to_ireg()
84 return INTEL_MSIC_GPIO0HV0CTLI - offset + 16; in msic_gpio_to_ireg()
86 return INTEL_MSIC_GPIO1HV0CTLI - offset + 20; in msic_gpio_to_ireg()
89 static int msic_gpio_to_oreg(unsigned offset) in msic_gpio_to_oreg() argument
[all …]
Dgpio-da9052.c54 static unsigned char da9052_gpio_port_odd(unsigned offset) in da9052_gpio_port_odd() argument
56 return offset % 2; in da9052_gpio_port_odd()
59 static int da9052_gpio_get(struct gpio_chip *gc, unsigned offset) in da9052_gpio_get() argument
66 DA9052_GPIO_0_1_REG + (offset >> 1)); in da9052_gpio_get()
70 if (da9052_gpio_port_odd(offset)) { in da9052_gpio_get()
79 if (offset < DA9052_GPIO_MAX_PORTS_PER_REGISTER) in da9052_gpio_get()
87 return !!(ret & (1 << DA9052_GPIO_SHIFT_COUNT(offset))); in da9052_gpio_get()
89 if (da9052_gpio_port_odd(offset)) in da9052_gpio_get()
98 static void da9052_gpio_set(struct gpio_chip *gc, unsigned offset, int value) in da9052_gpio_set() argument
103 if (da9052_gpio_port_odd(offset)) { in da9052_gpio_set()
[all …]
Dgpio-pmic-eic-sprd.c61 u32 offset; member
67 static void sprd_pmic_eic_update(struct gpio_chip *chip, unsigned int offset, in sprd_pmic_eic_update() argument
71 u32 shift = SPRD_PMIC_EIC_BIT(offset); in sprd_pmic_eic_update()
73 regmap_update_bits(pmic_eic->map, pmic_eic->offset + reg, in sprd_pmic_eic_update()
77 static int sprd_pmic_eic_read(struct gpio_chip *chip, unsigned int offset, in sprd_pmic_eic_read() argument
84 ret = regmap_read(pmic_eic->map, pmic_eic->offset + reg, &value); in sprd_pmic_eic_read()
88 return !!(value & BIT(SPRD_PMIC_EIC_BIT(offset))); in sprd_pmic_eic_read()
91 static int sprd_pmic_eic_request(struct gpio_chip *chip, unsigned int offset) in sprd_pmic_eic_request() argument
93 sprd_pmic_eic_update(chip, offset, SPRD_PMIC_EIC_DMSK, 1); in sprd_pmic_eic_request()
97 static void sprd_pmic_eic_free(struct gpio_chip *chip, unsigned int offset) in sprd_pmic_eic_free() argument
[all …]
Dgpio-tps68470.c29 static int tps68470_gpio_get(struct gpio_chip *gc, unsigned int offset) in tps68470_gpio_get() argument
36 if (offset >= TPS68470_N_REGULAR_GPIO) { in tps68470_gpio_get()
37 offset -= TPS68470_N_REGULAR_GPIO; in tps68470_gpio_get()
47 return !!(val & BIT(offset)); in tps68470_gpio_get()
52 unsigned int offset) in tps68470_gpio_get_direction() argument
59 if (offset >= TPS68470_N_REGULAR_GPIO) in tps68470_gpio_get_direction()
62 ret = regmap_read(regmap, TPS68470_GPIO_CTL_REG_A(offset), &val); in tps68470_gpio_get_direction()
65 TPS68470_GPIO_CTL_REG_A(offset)); in tps68470_gpio_get_direction()
73 static void tps68470_gpio_set(struct gpio_chip *gc, unsigned int offset, in tps68470_gpio_set() argument
80 if (offset >= TPS68470_N_REGULAR_GPIO) { in tps68470_gpio_set()
[all …]
Dgpio-pl061.c65 static int pl061_get_direction(struct gpio_chip *gc, unsigned offset) in pl061_get_direction() argument
69 return !(readb(pl061->base + GPIODIR) & BIT(offset)); in pl061_get_direction()
72 static int pl061_direction_input(struct gpio_chip *gc, unsigned offset) in pl061_direction_input() argument
80 gpiodir &= ~(BIT(offset)); in pl061_direction_input()
87 static int pl061_direction_output(struct gpio_chip *gc, unsigned offset, in pl061_direction_output() argument
95 writeb(!!value << offset, pl061->base + (BIT(offset + 2))); in pl061_direction_output()
97 gpiodir |= BIT(offset); in pl061_direction_output()
104 writeb(!!value << offset, pl061->base + (BIT(offset + 2))); in pl061_direction_output()
110 static int pl061_get_value(struct gpio_chip *gc, unsigned offset) in pl061_get_value() argument
114 return !!readb(pl061->base + (BIT(offset + 2))); in pl061_get_value()
[all …]
Dgpio-viperboard.c51 u8 offset; member
88 unsigned offset) in vprbrd_gpioa_get() argument
96 if (gpio->gpioa_out & (1 << offset)) in vprbrd_gpioa_get()
97 return !!(gpio->gpioa_val & (1 << offset)); in vprbrd_gpioa_get()
103 gamsg->offset = offset; in vprbrd_gpioa_get()
138 unsigned offset, int value) in vprbrd_gpioa_set() argument
145 if (gpio->gpioa_out & (1 << offset)) { in vprbrd_gpioa_set()
147 gpio->gpioa_val |= (1 << offset); in vprbrd_gpioa_set()
149 gpio->gpioa_val &= ~(1 << offset); in vprbrd_gpioa_set()
155 gamsg->offset = offset; in vprbrd_gpioa_set()
[all …]
/linux-4.19.296/fs/udf/
Ddirectory.c26 sector_t *offset) in udf_fileident_read() argument
55 uint32_t lextoffset = epos->offset; in udf_fileident_read()
62 block = udf_get_lb_pblock(dir->i_sb, eloc, *offset); in udf_fileident_read()
64 (*offset)++; in udf_fileident_read()
66 if ((*offset << blocksize_bits) >= *elen) in udf_fileident_read()
67 *offset = 0; in udf_fileident_read()
69 epos->offset = lextoffset; in udf_fileident_read()
77 if (!(*offset & ((16 >> (blocksize_bits - 9)) - 1))) { in udf_fileident_read()
79 if (i + *offset > (*elen >> blocksize_bits)) in udf_fileident_read()
80 i = (*elen >> blocksize_bits)-*offset; in udf_fileident_read()
[all …]
/linux-4.19.296/include/drm/
Ddrm_os_linux.h16 #define DRM_READ8(map, offset) readb(((void __iomem *)(map)->handle) + (offset)) argument
18 #define DRM_READ16(map, offset) readw(((void __iomem *)(map)->handle) + (offset)) argument
20 #define DRM_READ32(map, offset) readl(((void __iomem *)(map)->handle) + (offset)) argument
22 #define DRM_WRITE8(map, offset, val) writeb(val, ((void __iomem *)(map)->handle) + (offset)) argument
24 #define DRM_WRITE16(map, offset, val) writew(val, ((void __iomem *)(map)->handle) + (offset)) argument
26 #define DRM_WRITE32(map, offset, val) writel(val, ((void __iomem *)(map)->handle) + (offset)) argument
29 #define DRM_READ64(map, offset) readq(((void __iomem *)(map)->handle) + (offset)) argument
31 #define DRM_WRITE64(map, offset, val) writeq(val, ((void __iomem *)(map)->handle) + (offset)) argument
/linux-4.19.296/include/linux/bcma/
Dbcma.h44 u8 (*read8)(struct bcma_device *core, u16 offset);
45 u16 (*read16)(struct bcma_device *core, u16 offset);
46 u32 (*read32)(struct bcma_device *core, u16 offset);
47 void (*write8)(struct bcma_device *core, u16 offset, u8 value);
48 void (*write16)(struct bcma_device *core, u16 offset, u16 value);
49 void (*write32)(struct bcma_device *core, u16 offset, u32 value);
52 size_t count, u16 offset, u8 reg_width);
54 size_t count, u16 offset, u8 reg_width);
57 u32 (*aread32)(struct bcma_device *core, u16 offset);
58 void (*awrite32)(struct bcma_device *core, u16 offset, u32 value);
[all …]
/linux-4.19.296/drivers/xen/xen-pciback/
Dconf_space.h15 typedef void *(*conf_field_init) (struct pci_dev *dev, int offset);
16 typedef void (*conf_field_reset) (struct pci_dev *dev, int offset, void *data);
17 typedef void (*conf_field_free) (struct pci_dev *dev, int offset, void *data);
19 typedef int (*conf_dword_write) (struct pci_dev *dev, int offset, u32 value,
21 typedef int (*conf_word_write) (struct pci_dev *dev, int offset, u16 value,
23 typedef int (*conf_byte_write) (struct pci_dev *dev, int offset, u8 value,
25 typedef int (*conf_dword_read) (struct pci_dev *dev, int offset, u32 *value,
27 typedef int (*conf_word_read) (struct pci_dev *dev, int offset, u16 *value,
29 typedef int (*conf_byte_read) (struct pci_dev *dev, int offset, u8 *value,
37 unsigned int offset; member
[all …]
Dconf_space.c27 (struct pci_dev *dev, int offset, type value, void *data) \
29 return pci_##op##_config_##size(dev, offset, value); \
42 int offset, u32 *value) in DEFINE_PCI_CONFIG()
52 ret = field->u.b.read(dev, offset, (u8 *) value, in DEFINE_PCI_CONFIG()
57 ret = field->u.w.read(dev, offset, (u16 *) value, in DEFINE_PCI_CONFIG()
62 ret = field->u.dw.read(dev, offset, value, entry->data); in DEFINE_PCI_CONFIG()
70 int offset, u32 value) in conf_space_write() argument
78 ret = field->u.b.write(dev, offset, (u8) value, in conf_space_write()
83 ret = field->u.w.write(dev, offset, (u16) value, in conf_space_write()
88 ret = field->u.dw.write(dev, offset, value, in conf_space_write()
[all …]
Dconf_space_header.c33 static void *command_init(struct pci_dev *dev, int offset) in command_init() argument
50 static int command_read(struct pci_dev *dev, int offset, u16 *value, void *data) in command_read() argument
52 int ret = pci_read_config_word(dev, offset, value); in command_read()
61 static int command_write(struct pci_dev *dev, int offset, u16 value, void *data) in command_write() argument
126 err = pci_read_config_word(dev, offset, &val); in command_write()
133 return pci_write_config_word(dev, offset, value); in command_write()
136 static int rom_write(struct pci_dev *dev, int offset, u32 value, void *data) in rom_write() argument
153 pci_read_config_dword(dev, offset, &tmpval); in rom_write()
156 pci_write_config_dword(dev, offset, bar->val); in rom_write()
170 static int bar_write(struct pci_dev *dev, int offset, u32 value, void *data) in bar_write() argument
[all …]
/linux-4.19.296/fs/btrfs/tests/
Dinode-tests.c16 u64 ram_bytes, u64 offset, u64 disk_bytenr, in insert_extent() argument
34 key.offset = start; in insert_extent()
43 btrfs_set_file_extent_offset(leaf, fi, offset); in insert_extent()
65 key.offset = 0; in insert_inode_item_key()
93 u64 offset = 0; in setup_file_extents() local
96 insert_extent(root, offset, 5, 5, 0, 0, 0, BTRFS_FILE_EXTENT_REG, 0, in setup_file_extents()
99 offset += 5; in setup_file_extents()
107 insert_extent(root, offset, 1, 1, 0, 0, 0, BTRFS_FILE_EXTENT_INLINE, 0, in setup_file_extents()
110 offset = sectorsize; in setup_file_extents()
113 insert_extent(root, offset, 4, 4, 0, 0, 0, BTRFS_FILE_EXTENT_REG, 0, in setup_file_extents()
[all …]
/linux-4.19.296/include/linux/
Drio_drv.h23 extern int __rio_local_read_config_32(struct rio_mport *port, u32 offset,
25 extern int __rio_local_write_config_32(struct rio_mport *port, u32 offset,
27 extern int __rio_local_read_config_16(struct rio_mport *port, u32 offset,
29 extern int __rio_local_write_config_16(struct rio_mport *port, u32 offset,
31 extern int __rio_local_read_config_8(struct rio_mport *port, u32 offset,
33 extern int __rio_local_write_config_8(struct rio_mport *port, u32 offset,
37 u8 hopcount, u32 offset, u32 * data);
39 u8 hopcount, u32 offset, u32 data);
41 u8 hopcount, u32 offset, u16 * data);
43 u8 hopcount, u32 offset, u16 data);
[all …]
/linux-4.19.296/lib/
Dradix-tree.c129 unsigned int offset = (index >> parent->shift) & RADIX_TREE_MAP_MASK; in radix_tree_descend() local
130 void __rcu **entry = rcu_dereference_raw(parent->slots[offset]); in radix_tree_descend()
137 offset = get_slot_offset(parent, sibentry); in radix_tree_descend()
144 return offset; in radix_tree_descend()
153 int offset) in tag_set() argument
155 __set_bit(offset, node->tags[tag]); in tag_set()
159 int offset) in tag_clear() argument
161 __clear_bit(offset, node->tags[tag]); in tag_clear()
165 int offset) in tag_get() argument
167 return test_bit(offset, node->tags[tag]); in tag_get()
[all …]
/linux-4.19.296/fs/squashfs/
Dfile.c60 static struct meta_index *locate_meta_index(struct inode *inode, int offset, in locate_meta_index() argument
69 TRACE("locate_meta_index: index %d, offset %d\n", index, offset); in locate_meta_index()
76 msblk->meta_index[i].offset >= offset && in locate_meta_index()
77 msblk->meta_index[i].offset <= index && in locate_meta_index()
80 msblk->meta_index[i].offset); in locate_meta_index()
82 offset = meta->offset; in locate_meta_index()
99 static struct meta_index *empty_meta_index(struct inode *inode, int offset, in empty_meta_index() argument
108 TRACE("empty_meta_index: offset %d, skip %d\n", offset, skip); in empty_meta_index()
149 meta->offset = offset; in empty_meta_index()
174 u64 *start_block, int *offset) in read_indexes() argument
[all …]

12345678910>>...66