/device/generic/goldfish/qemud/ |
D | qemud.c | 209 fd_read(int fd, void* to, int len) in fd_read() argument 214 ret = read(fd, to, len); in fd_read() 221 fd_write(int fd, const void* from, int len) in fd_write() argument 226 ret = write(fd, from, len); in fd_write() 233 fd_setnonblock(int fd) in fd_setnonblock() argument 238 flags = fcntl(fd, F_GETFD); in fd_setnonblock() 243 __FUNCTION__, fd, strerror(errno) ); in fd_setnonblock() 247 ret = fcntl(fd, F_SETFD, flags | O_NONBLOCK); in fd_setnonblock() 252 __FUNCTION__, fd, strerror(errno) ); in fd_setnonblock() 258 fd_accept(int fd) in fd_accept() argument [all …]
|
/device/google/dragon/recovery/updater/ |
D | flash_mtd.c | 38 int fd; member 49 dev->fd = open(path, O_RDWR); in mtd_open() 50 if (dev->fd == -1) { in mtd_open() 55 if (ioctl(dev->fd, MEMGETINFO, &dev->info)) { in mtd_open() 71 close(dev->fd); in mtd_open() 72 dev->fd = -1; in mtd_open() 83 close(dev->fd); in mtd_close() 93 if (lseek(dev->fd, offset, SEEK_SET) != offset) { in mtd_read() 100 res = read(dev->fd, ptr, count); in mtd_read() 117 if (lseek(dev->fd, offset, SEEK_SET) != offset) { in mtd_write() [all …]
|
D | flash_file.cpp | 35 int fd; member 42 dev->fd = -1; /* No backing file */ in file_blob_open() 63 dev->fd = open(value->data, O_RDWR); in file_open() 64 if (dev->fd == -1) { in file_open() 69 if (fstat(dev->fd, &dev->info)) { in file_open() 75 MAP_SHARED, dev->fd, 0)); in file_open() 87 close(dev->fd); in file_open() 98 if (dev->fd > 0) { in file_close() 100 close(dev->fd); in file_close() 161 return dev && dev->fd > 0 ? dev->info.st_blksize : 0; in file_get_write_size() [all …]
|
D | flash_ec.c | 52 int fd; member 65 if (ec->fd < 0) in ec_command() 76 r = ioctl(ec->fd, CROS_EC_DEV_IOCXCMD, &s_cmd); in ec_command() 97 dev->fd = open(path, O_RDWR); in ec_open() 98 if (dev->fd == -1) { in ec_open() 133 close(dev->fd); in ec_open() 134 dev->fd = -1; in ec_open() 145 close(dev->fd); in ec_close() 228 return dev && dev->fd > 0 ? dev->info.flash_size : 0; in ec_get_size() 235 return dev && dev->fd > 0 ? dev->info.write_ideal_size : 0; in ec_get_write_size() [all …]
|
/device/linaro/hikey/wpan/uim/ |
D | uim.c | 74 int read_hci_event(int fd, unsigned char *buf, int size) in read_hci_event() argument 91 rd = read(fd, buf, 1); in read_hci_event() 107 rd = read(fd, buf + count, 3 - count); in read_hci_event() 120 rd = read(fd, buf + count, remain - (count - 3)); in read_hci_event() 135 static int read_command_complete(int fd, unsigned short opcode) in read_command_complete() argument 142 if (read_hci_event(fd, (unsigned char *)&resp, sizeof(resp)) < 0) { in read_command_complete() 274 int ldisc, len, fd, flow_ctrl; in st_uart_config() local 286 fd = open(DEV_NAME_SYSFS, O_RDONLY); in st_uart_config() 287 if (fd < 0) { in st_uart_config() 291 len = read(fd, buf, UART_DEV_NAME_LEN); in st_uart_config() [all …]
|
/device/moto/shamu/camera/QCamera2/stack/mm-camera-test/inc/ |
D | mm_qcamera_socket.h | 53 #define __FD_SET(fd, fdsetp) \ argument 54 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31))) 57 #define __FD_CLR(fd, fdsetp) \ argument 58 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31))) 61 #define __FD_ISSET(fd, fdsetp) \ argument 62 ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
|
/device/lge/bullhead/camera/QCamera2/stack/mm-camera-test/inc/ |
D | mm_qcamera_socket.h | 53 #define __FD_SET(fd, fdsetp) \ argument 54 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1LU<<((fd) & 31))) 57 #define __FD_CLR(fd, fdsetp) \ argument 58 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1LU<<((fd) & 31))) 61 #define __FD_ISSET(fd, fdsetp) \ argument 62 ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1LU<<((fd) & 31))) != 0)
|
/device/huawei/angler/camera/QCamera2/stack/mm-camera-test/inc/ |
D | mm_qcamera_socket.h | 53 #define __FD_SET(fd, fdsetp) \ argument 54 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1LU<<((fd) & 31))) 57 #define __FD_CLR(fd, fdsetp) \ argument 58 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1LU<<((fd) & 31))) 61 #define __FD_ISSET(fd, fdsetp) \ argument 62 ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1LU<<((fd) & 31))) != 0)
|
/device/linaro/hikey/gralloc/ |
D | framebuffer_device.cpp | 97 if (ioctl(m->framebuffer->fd, FBIOPAN_DISPLAY, &m->info) == -1) in fb_post() 99 AERR("FBIOPAN_DISPLAY failed for fd: %d", m->framebuffer->fd); in fb_post() 109 if (ioctl(m->framebuffer->fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0) in fb_post() 121 if (ioctl(m->framebuffer->fd, FBIO_WAITFORVSYNC, &crtc) < 0) in fb_post() 123 AERR("FBIO_WAITFORVSYNC failed for fd: %d", m->framebuffer->fd); in fb_post() 136 if (ioctl(m->framebuffer->fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0) in fb_post() 138 AERR("S3CFB_SET_VSYNC_INT disable failed for fd: %d", m->framebuffer->fd); in fb_post() 149 if (ioctl(m->framebuffer->fd, FBIOPUT_VSCREENINFO, &m->info) == -1) in fb_post() 151 AERR("FBIOPUT_VSCREENINFO failed for fd: %d", m->framebuffer->fd); in fb_post() 200 int fd = -1; in init_frame_buffer_locked() local [all …]
|
/device/google/dragon/audio/hal/dsp/tests/ |
D | raw.c | 18 int fd; in read_raw() local 27 fd = open(filename, O_RDONLY); in read_raw() 28 if (fd < 0) { in read_raw() 36 if (read(fd, buf, n) != n) { in read_raw() 41 close(fd); in read_raw() 79 int fd = open(filename, O_WRONLY | O_CREAT, 0644); in write_raw() local 80 if (fd < 0) { in write_raw() 84 if (write(fd, buf, n) != n) { in write_raw() 90 close(fd); in write_raw()
|
/device/huawei/angler/liblight/ |
D | lights.c | 98 int fd; in write_int() local 101 fd = open(path, O_WRONLY); in write_int() 102 if (fd >= 0) { in write_int() 105 ssize_t amt = write(fd, buffer, (size_t)bytes); in write_int() 106 close(fd); in write_int() 120 int fd; in write_on_off() local 123 fd = open(path, O_WRONLY); in write_on_off() 124 if (fd >= 0) { in write_on_off() 127 int amt = write(fd, buffer, bytes); in write_on_off() 128 close(fd); in write_on_off() [all …]
|
/device/generic/goldfish/sensors/ |
D | sensors_qemu.c | 143 int fd; member 176 if (dev->fd < 0) { in sensor_device_get_fd_locked() 177 dev->fd = qemud_channel_open(SENSORS_SERVICE_NAME); in sensor_device_get_fd_locked() 178 if (dev->fd < 0) { in sensor_device_get_fd_locked() 185 return dev->fd; in sensor_device_get_fd_locked() 193 int fd = sensor_device_get_fd_locked(dev); in sensor_device_send_command_locked() local 194 if (fd < 0) { in sensor_device_send_command_locked() 195 return fd; in sensor_device_send_command_locked() 199 if (qemud_channel_send(fd, cmd, strlen(cmd)) < 0) { in sensor_device_send_command_locked() 201 E("%s(fd=%d): ERROR: %s", __FUNCTION__, fd, strerror(errno)); in sensor_device_send_command_locked() [all …]
|
/device/moto/shamu/camera/QCamera/stack/mm-camera-test/inc/ |
D | mm_qcamera_main_menu.h | 377 int8_t (*getPicture)(int fd, struct crop_info *cropInfo ); 382 int8_t (*getMaxZoom)(int fd, void *pZm); 394 int8_t (*sethjr) (int fd, int8_t hjr_status); 395 int8_t (*setLensShading) (int fd, int8_t rolloff_status); 396 int8_t (*setLedMode) (int fd, led_mode_t led_mode); 397 int8_t (*getSharpness_AF) (int fd, int32_t *sharpness); 398 int8_t (*setMotionIso) (int fd, motion_iso_t motion_iso); 399 int8_t (*setHue) (int fd, int32_t hue); 400 int8_t (*cancelAF) (int fd); 401 int8_t (*getAfStep) (int fd, int32_t *afStep); [all …]
|
/device/google/contexthub/util/stm32_flash/ |
D | spi.c | 37 if (ioctl(spi_handle->fd, SPI_IOC_MESSAGE(1), &xfer) >= 0) in spi_write_data() 60 if (ioctl(spi_handle->fd, SPI_IOC_MESSAGE(1), &xfer) >= 0) in spi_write_cmd() 88 if (ioctl(spi_handle->fd, SPI_IOC_MESSAGE(2), xfer) >= 0) in spi_read_data() 111 if (ioctl(spi_handle->fd, SPI_IOC_MESSAGE(1), &xfer) >= 0) { in spi_read_ack() 113 ioctl(spi_handle->fd, SPI_IOC_MESSAGE(1), &xfer); in spi_read_ack() 121 ioctl(spi_handle->fd, SPI_IOC_MESSAGE(1), &xfer); in spi_read_ack() 144 if (ioctl(spi_handle->fd, SPI_IOC_MESSAGE(1), &xfer) >= 0) in spi_sync() 166 if (ioctl(spi_handle->fd, SPI_IOC_WR_MODE, &tmp8) < 0) { in spi_init() 172 if (ioctl(spi_handle->fd, SPI_IOC_WR_MAX_SPEED_HZ, &tmp32) < 0) { in spi_init() 178 if (ioctl(spi_handle->fd, SPI_IOC_WR_BITS_PER_WORD, &tmp8) < 0) { in spi_init()
|
/device/moto/shamu/camera/QCamera/stack/mm-camera-interface/src/ |
D | mm_camera_stream.c | 129 rc = ioctl(my_obj->fd, MSM_CAM_V4L2_IOCTL_PRIVATE_G_CTRL, &v4l2_ioctl); in get_stream_inst_handle() 139 my_obj->ext_image_mode, my_obj->fd, my_obj->state, rc); in get_stream_inst_handle() 151 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_handle_rcvd_buf() 215 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_data_notify() 270 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_buf_notify() 325 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_dispatch_app_data() 377 my_obj->ext_image_mode, my_obj->fd, my_obj->state, evt); in mm_stream_fsm_fn() 422 my_obj->ext_image_mode, my_obj->fd, my_obj->state, evt); in mm_stream_fsm_inited() 434 my_obj->fd = open(dev_name, O_RDWR | O_NONBLOCK); in mm_stream_fsm_inited() 435 if (my_obj->fd <= 0) { in mm_stream_fsm_inited() [all …]
|
D | mm_camera_thread.c | 122 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->pfds[0]; in mm_camera_poll_proc_pipe() 127 if (poll_cb->poll_entries[0].fd > 0) { in mm_camera_poll_proc_pipe() 129 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->poll_entries[0].fd; in mm_camera_poll_proc_pipe() 135 if(poll_cb->poll_entries[i].fd > 0) { in mm_camera_poll_proc_pipe() 137 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->poll_entries[i].fd; in mm_camera_poll_proc_pipe() 148 poll_cb->poll_fds[poll_cb->num_fds].fd = -1; in mm_camera_poll_proc_pipe() 221 poll_cb->poll_fds[poll_cb->num_fds++].fd = poll_cb->pfds[0]; in mm_camera_poll_thread() 239 int32_t fd, in mm_camera_poll_thread_add_poll_fd() argument 255 poll_cb->poll_entries[idx].fd = fd; in mm_camera_poll_thread_add_poll_fd() 285 poll_cb->poll_entries[idx].fd = -1; /* set fd to invalid */ in mm_camera_poll_thread_del_poll_fd()
|
/device/lge/bullhead/liblight/ |
D | lights.c | 61 int fd; in write_int() local 64 fd = open(path, O_RDWR); in write_int() 65 if (fd >= 0) { in write_int() 68 int amt = write(fd, buffer, bytes); in write_int() 69 close(fd); in write_int() 82 int fd; in write_on_off() local 85 fd = open(path, O_RDWR); in write_on_off() 86 if (fd >= 0) { in write_on_off() 89 int amt = write(fd, buffer, bytes); in write_on_off() 90 close(fd); in write_on_off()
|
/device/google/dragon/lights/ |
D | lights.c | 74 int fd, bytes, amt, ret = 0; in write_brightness() local 84 fd = open(path, O_RDWR); in write_brightness() 85 if (fd < 0) { in write_brightness() 99 amt = write(fd, buffer, bytes); in write_brightness() 109 close(fd); in write_brightness() 116 int ret = 0, fd, bytes; in read_max_brightness() local 126 fd = open(path, O_RDONLY); in read_max_brightness() 127 if (fd < 0) { in read_max_brightness() 133 bytes = read(fd, buffer, sizeof(buffer)); in read_max_brightness() 144 close(fd); in read_max_brightness()
|
/device/linaro/hikey/wpan/bluedroid_wilink/ |
D | libbt-vendor-ti.c | 68 int fd; in ti_op() local 75 fd = open("/dev/hci_tty", O_RDWR); in ti_op() 76 if (fd < 0) { in ti_op() 80 fd_array[CH_CMD] = fd; in ti_op() 81 hci_tty_fd = fd; /* for userial_close op */ in ti_op()
|
/device/huawei/angler/vr/ |
D | vr.c | 46 int fd = -1; in write_string() local 56 fd = open(outFile, O_WRONLY); in write_string() 57 if (fd < 0) { in write_string() 64 err = write(fd, input, len); in write_string() 68 close(fd); in write_string() 73 close(fd); in write_string()
|
/device/htc/flounder/sensor_hub/libsensors/ |
D | CwMcuSensor.cpp | 73 int fd; in sysfs_set_input_attr() local 79 fd = open(fname, O_WRONLY); in sysfs_set_input_attr() 80 if (fd < 0) { in sysfs_set_input_attr() 81 ALOGE("%s: fname = %s, fd = %d, failed: %s\n", __func__, fname, fd, strerror(errno)); in sysfs_set_input_attr() 85 rc = write(fd, value, (size_t)len); in sysfs_set_input_attr() 87 … ALOGE("%s: write failed: fd = %d, rc = %d, strerr = %s\n", __func__, fd, rc, strerror(errno)); in sysfs_set_input_attr() 88 close(fd); in sysfs_set_input_attr() 92 close(fd); in sysfs_set_input_attr() 148 int fd = open(filename, O_RDONLY); in find_type_by_name() local 150 if (fd < 0) { in find_type_by_name() [all …]
|
/device/asus/fugu/power/ |
D | power.c | 46 int fd = open(path, O_WRONLY); in sysfs_write() local 48 if (fd < 0) { in sysfs_write() 54 if ((len = write(fd, s, strlen(s))) < 0) { in sysfs_write() 59 close(fd); in sysfs_write() 69 int fd = open(path, O_RDONLY); in sysfs_read() local 71 if (fd < 0) { in sysfs_read() 77 if ((count = read(fd, s, (num_bytes - 1))) < 0) { in sysfs_read() 88 close(fd); in sysfs_read()
|
/device/generic/goldfish/libqemu/ |
D | test_util.c | 47 static int fd; in pipe_openSocket() local 52 fd = socket( AF_INET, SOCK_STREAM, 0 ); in pipe_openSocket() 53 if (fd < 0) { in pipe_openSocket() 63 if ( connect(fd, (struct sockaddr*)&addr, sizeof(addr)) < 0 ) { in pipe_openSocket() 66 close(fd); in pipe_openSocket() 70 pipe->socket = fd; in pipe_openSocket()
|
/device/moto/shamu/camera/QCamera/HAL/usbcamcore/inc/ |
D | QCameraUsbPriv.h | 101 camHal->fd = open(camHal->dev_name, O_RDWR | O_NONBLOCK, 0);\ 102 if(!camHal->fd)\ 113 if(camHal->fd){\ 114 rc = close(camHal->fd);\ 119 camHal->fd = 0;\ 156 int fd; member
|
/device/lge/bullhead/power/ |
D | utils.c | 107 int fd = open(path, O_RDONLY); in sysfs_read() local 109 if (fd < 0) { in sysfs_read() 116 if ((count = read(fd, s, num_bytes - 1)) < 0) { in sysfs_read() 125 close(fd); in sysfs_read() 135 int fd = open(path, O_WRONLY); in sysfs_write() local 137 if (fd < 0) { in sysfs_write() 143 len = write(fd, s, strlen(s)); in sysfs_write() 151 close(fd); in sysfs_write()
|