• Home
  • Raw
  • Download

Lines Matching refs:ops

67 	struct c2port_ops *ops = dev->ops;  in c2port_reset()  local
73 ops->c2ck_set(dev, 0); in c2port_reset()
75 ops->c2ck_set(dev, 1); in c2port_reset()
83 struct c2port_ops *ops = dev->ops; in c2port_strobe_ck() local
91 ops->c2ck_set(dev, 0); in c2port_strobe_ck()
93 ops->c2ck_set(dev, 1); in c2port_strobe_ck()
105 struct c2port_ops *ops = dev->ops; in c2port_write_ar() local
112 ops->c2d_dir(dev, 0); in c2port_write_ar()
113 ops->c2d_set(dev, 1); in c2port_write_ar()
115 ops->c2d_set(dev, 1); in c2port_write_ar()
120 ops->c2d_set(dev, addr & 0x01); in c2port_write_ar()
127 ops->c2d_dir(dev, 1); in c2port_write_ar()
133 struct c2port_ops *ops = dev->ops; in c2port_read_ar() local
140 ops->c2d_dir(dev, 0); in c2port_read_ar()
141 ops->c2d_set(dev, 0); in c2port_read_ar()
143 ops->c2d_set(dev, 1); in c2port_read_ar()
147 ops->c2d_dir(dev, 1); in c2port_read_ar()
153 if (ops->c2d_get(dev)) in c2port_read_ar()
165 struct c2port_ops *ops = dev->ops; in c2port_write_dr() local
172 ops->c2d_dir(dev, 0); in c2port_write_dr()
173 ops->c2d_set(dev, 1); in c2port_write_dr()
175 ops->c2d_set(dev, 0); in c2port_write_dr()
179 ops->c2d_set(dev, 0); in c2port_write_dr()
181 ops->c2d_set(dev, 0); in c2port_write_dr()
186 ops->c2d_set(dev, data & 0x01); in c2port_write_dr()
193 ops->c2d_dir(dev, 1); in c2port_write_dr()
197 if (ops->c2d_get(dev)) in c2port_write_dr()
213 struct c2port_ops *ops = dev->ops; in c2port_read_dr() local
220 ops->c2d_dir(dev, 0); in c2port_read_dr()
221 ops->c2d_set(dev, 0); in c2port_read_dr()
223 ops->c2d_set(dev, 0); in c2port_read_dr()
227 ops->c2d_set(dev, 0); in c2port_read_dr()
229 ops->c2d_set(dev, 0); in c2port_read_dr()
233 ops->c2d_dir(dev, 1); in c2port_read_dr()
237 if (ops->c2d_get(dev)) in c2port_read_dr()
251 if (ops->c2d_get(dev)) in c2port_read_dr()
320 struct c2port_ops *ops = c2dev->ops; in c2port_show_flash_blocks_num() local
322 return sprintf(buf, "%d\n", ops->blocks_num); in c2port_show_flash_blocks_num()
330 struct c2port_ops *ops = c2dev->ops; in c2port_show_flash_block_size() local
332 return sprintf(buf, "%d\n", ops->block_size); in c2port_show_flash_block_size()
340 struct c2port_ops *ops = c2dev->ops; in c2port_show_flash_size() local
342 return sprintf(buf, "%d\n", ops->blocks_num * ops->block_size); in c2port_show_flash_size()
358 struct c2port_ops *ops = c2dev->ops; in access_store() local
372 ops->c2ck_set(c2dev, 1); in access_store()
373 ops->access(c2dev, c2dev->access); in access_store()
375 ops->c2d_dir(c2dev, 1); in access_store()
633 struct c2port_ops *ops = dev->ops; in __c2port_read_flash_data() local
638 if (offset >= ops->block_size * ops->blocks_num) in __c2port_read_flash_data()
641 if (ops->block_size * ops->blocks_num - offset < nread) in __c2port_read_flash_data()
642 nread = ops->block_size * ops->blocks_num - offset; in __c2port_read_flash_data()
746 struct c2port_ops *ops = dev->ops; in __c2port_write_flash_data() local
752 if (ops->block_size * ops->blocks_num - offset < nwrite) in __c2port_write_flash_data()
753 nwrite = ops->block_size * ops->blocks_num - offset; in __c2port_write_flash_data()
756 if (offset >= ops->block_size * ops->blocks_num) in __c2port_write_flash_data()
900 struct c2port_ops *ops, void *devdata) in c2port_device_register() argument
905 if (unlikely(!ops) || unlikely(!ops->access) || \ in c2port_device_register()
906 unlikely(!ops->c2d_dir) || unlikely(!ops->c2ck_set) || \ in c2port_device_register()
907 unlikely(!ops->c2d_get) || unlikely(!ops->c2d_set)) in c2port_device_register()
925 bin_attr_flash_data.size = ops->blocks_num * ops->block_size; in c2port_device_register()
936 c2dev->ops = ops; in c2port_device_register()
941 ops->access(c2dev, 0); in c2port_device_register()
946 name, ops->blocks_num, ops->block_size, in c2port_device_register()
947 ops->blocks_num * ops->block_size); in c2port_device_register()