Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 721) sorted by relevance

12345678910>>...29

/hardware/libhardware_legacy/qemu_tracing/
Dqemu_tracing.c42 int fd = open(SYS_QEMU_TRACE_STATE, O_WRONLY); in qemu_start_tracing() local
43 if (fd < 0) in qemu_start_tracing()
44 return fd; in qemu_start_tracing()
45 write(fd, "1\n", 2); in qemu_start_tracing()
46 close(fd); in qemu_start_tracing()
52 int fd = open(SYS_QEMU_TRACE_STATE, O_WRONLY); in qemu_stop_tracing() local
53 if (fd < 0) in qemu_stop_tracing()
54 return fd; in qemu_stop_tracing()
55 write(fd, "0\n", 2); in qemu_stop_tracing()
56 close(fd); in qemu_stop_tracing()
[all …]
/hardware/libhardware_legacy/qemu/
Dqemu.c55 qemu_fd_write( int fd, const char* cmd, int len ) in qemu_fd_write() argument
59 len2 = write(fd, cmd, len); in qemu_fd_write()
65 qemu_fd_read( int fd, char* buff, int len ) in qemu_fd_read() argument
69 len2 = read(fd, buff, len); in qemu_fd_read()
78 int fd; in qemu_channel_open_qemud_pipe() local
82 fd = qemu_pipe_open(pipe_name); in qemu_channel_open_qemud_pipe()
83 if (fd < 0) { in qemu_channel_open_qemud_pipe()
89 channel->fd = fd; in qemu_channel_open_qemud_pipe()
97 int fd, ret, namelen = strlen(name); in qemu_channel_open_qemud() local
100 fd = socket_local_client( "qemud", in qemu_channel_open_qemud()
[all …]
/hardware/ti/omap4-aah/ion/
Dion.c35 int fd = open("/dev/ion", O_RDWR); in ion_open() local
36 if (fd < 0) in ion_open()
38 return fd; in ion_open()
41 int ion_close(int fd) in ion_close() argument
43 return close(fd); in ion_close()
46 static int ion_ioctl(int fd, int req, void *arg) in ion_ioctl() argument
48 int ret = ioctl(fd, req, arg); in ion_ioctl()
57 int ion_alloc(int fd, size_t len, size_t align, in ion_alloc() argument
67 ret = ion_ioctl(fd, ION_IOC_ALLOC, &data); in ion_alloc()
74 int ion_alloc_tiler(int fd, size_t w, size_t h, int fmt, unsigned int flags, in ion_alloc_tiler() argument
[all …]
/hardware/libhardware/include/hardware/
Dqemud.h44 qemud_fd_write(int fd, const void* buff, int len) in qemud_fd_write() argument
48 len2 = write(fd, buff, len); in qemud_fd_write()
54 qemud_fd_read(int fd, void* buff, int len) in qemud_fd_read() argument
58 len2 = read(fd, buff, len); in qemud_fd_read()
66 int fd; in qemud_channel_open() local
73 fd = qemu_pipe_open(pipe_name); in qemud_channel_open()
74 if (fd < 0) { in qemud_channel_open()
77 fd = socket_local_client( "qemud", in qemud_channel_open()
80 if (fd < 0) { in qemud_channel_open()
86 if (qemud_fd_write(fd, name, namelen) != namelen) { in qemud_channel_open()
[all …]
/hardware/qcom/bt/msm8992/libbt-vendor/src/
Dhci_smd.c58 int fd = -1; in bt_hci_init_transport_id() local
66 fd = open(s_pszDevSmd[chId], (O_RDWR | O_NOCTTY)); in bt_hci_init_transport_id()
68 while ((-1 == fd) && (retry < 7)) { in bt_hci_init_transport_id()
72 fd = open(s_pszDevSmd[chId], (O_RDWR | O_NOCTTY)); in bt_hci_init_transport_id()
76 if (-1 == fd) in bt_hci_init_transport_id()
109 if (tcflush(fd, TCIOFLUSH) < 0) in bt_hci_init_transport_id()
112 close(fd); in bt_hci_init_transport_id()
116 if (tcgetattr(fd, &term) < 0) in bt_hci_init_transport_id()
119 close(fd); in bt_hci_init_transport_id()
130 if (tcsetattr(fd, TCSANOW, &term) < 0) in bt_hci_init_transport_id()
[all …]
Dhci_uart.c186 void userial_ioctl_init_bt_wake(int fd) in userial_ioctl_init_bt_wake() argument
191 ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL); in userial_ioctl_init_bt_wake()
192 ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, &bt_wake_state); in userial_ioctl_init_bt_wake()
214 vnd_userial.fd = -1; in userial_vendor_init()
234 vnd_userial.fd = -1; in userial_vendor_open()
279 if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR|O_NOCTTY)) == -1) in userial_vendor_open()
285 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
287 tcgetattr(vnd_userial.fd, &vnd_userial.termios); in userial_vendor_open()
294 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
299 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
[all …]
/hardware/qcom/bt/msm8909/libbt-vendor/src/
Dhci_smd.c59 int fd = -1; in bt_hci_init_transport_id() local
67 fd = open(s_pszDevSmd[chId], (O_RDWR | O_NOCTTY)); in bt_hci_init_transport_id()
69 while ((-1 == fd) && (retry < 7)) { in bt_hci_init_transport_id()
73 fd = open(s_pszDevSmd[chId], (O_RDWR | O_NOCTTY)); in bt_hci_init_transport_id()
77 if (-1 == fd) in bt_hci_init_transport_id()
110 if (tcflush(fd, TCIOFLUSH) < 0) in bt_hci_init_transport_id()
113 close(fd); in bt_hci_init_transport_id()
117 if (tcgetattr(fd, &term) < 0) in bt_hci_init_transport_id()
120 close(fd); in bt_hci_init_transport_id()
131 if (tcsetattr(fd, TCSANOW, &term) < 0) in bt_hci_init_transport_id()
[all …]
Dhci_uart.c185 void userial_ioctl_init_bt_wake(int fd) in userial_ioctl_init_bt_wake() argument
190 ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL); in userial_ioctl_init_bt_wake()
191 ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, &bt_wake_state); in userial_ioctl_init_bt_wake()
213 vnd_userial.fd = -1; in userial_vendor_init()
233 vnd_userial.fd = -1; in userial_vendor_open()
278 if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR|O_NOCTTY)) == -1) in userial_vendor_open()
284 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
286 tcgetattr(vnd_userial.fd, &vnd_userial.termios); in userial_vendor_open()
293 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
298 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
[all …]
/hardware/qcom/bt/msm8996/libbt-vendor/src/
Dhci_smd.c58 int fd = -1; in bt_hci_init_transport_id() local
66 fd = open(s_pszDevSmd[chId], (O_RDWR | O_NOCTTY)); in bt_hci_init_transport_id()
68 while ((-1 == fd) && (retry < 7)) { in bt_hci_init_transport_id()
72 fd = open(s_pszDevSmd[chId], (O_RDWR | O_NOCTTY)); in bt_hci_init_transport_id()
76 if (-1 == fd) in bt_hci_init_transport_id()
109 if (tcflush(fd, TCIOFLUSH) < 0) in bt_hci_init_transport_id()
112 close(fd); in bt_hci_init_transport_id()
116 if (tcgetattr(fd, &term) < 0) in bt_hci_init_transport_id()
119 close(fd); in bt_hci_init_transport_id()
130 if (tcsetattr(fd, TCSANOW, &term) < 0) in bt_hci_init_transport_id()
[all …]
Dhci_uart.c186 void userial_ioctl_init_bt_wake(int fd) in userial_ioctl_init_bt_wake() argument
191 ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL); in userial_ioctl_init_bt_wake()
192 ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, &bt_wake_state); in userial_ioctl_init_bt_wake()
214 vnd_userial.fd = -1; in userial_vendor_init()
234 vnd_userial.fd = -1; in userial_vendor_open()
279 if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR|O_NOCTTY)) == -1) in userial_vendor_open()
285 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
287 tcgetattr(vnd_userial.fd, &vnd_userial.termios); in userial_vendor_open()
294 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
299 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
[all …]
/hardware/ti/omap4xxx/ion/
Dion.c36 int fd = open("/dev/ion", O_RDWR); in ion_open() local
37 if (fd < 0) in ion_open()
39 return fd; in ion_open()
42 int ion_close(int fd) in ion_close() argument
44 return close(fd); in ion_close()
47 static int ion_ioctl(int fd, int req, void *arg) in ion_ioctl() argument
49 int ret = ioctl(fd, req, arg); in ion_ioctl()
58 int ion_alloc(int fd, size_t len, size_t align, unsigned int flags, in ion_alloc() argument
68 ret = ion_ioctl(fd, ION_IOC_ALLOC, &data); in ion_alloc()
75 int ion_alloc_tiler(int fd, size_t w, size_t h, int fmt, unsigned int flags, in ion_alloc_tiler() argument
[all …]
/hardware/broadcom/libbt/src/
Duserial_vendor.c62 int fd; /* fd to Bluetooth device */ member
137 void userial_ioctl_init_bt_wake(int fd) in userial_ioctl_init_bt_wake() argument
145 if (ioctl(vnd_userial.fd, TIOCSETD, &ldisc) < 0) in userial_ioctl_init_bt_wake()
148 fd, errno, ldisc); in userial_ioctl_init_bt_wake()
155 ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL); in userial_ioctl_init_bt_wake()
156 ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, &bt_wake_state); in userial_ioctl_init_bt_wake()
178 vnd_userial.fd = -1; in userial_vendor_init()
199 vnd_userial.fd = -1; in userial_vendor_open()
244 if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR)) == -1) in userial_vendor_open()
250 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
[all …]
/hardware/qcom/display/msm8960/liboverlay/
DmdpWrapper.h49 bool getFScreenInfo(int fd, fb_fix_screeninfo& finfo);
52 bool getVScreenInfo(int fd, fb_var_screeninfo& vinfo);
55 bool setVScreenInfo(int fd, fb_var_screeninfo& vinfo);
58 bool startRotator(int fd, msm_rotator_img_info& rot);
61 bool rotate(int fd, msm_rotator_data_info& rot);
64 bool setOverlay(int fd, mdp_overlay& ov);
67 bool endRotator(int fd, int sessionId);
70 bool unsetOverlay(int fd, int ovId);
73 bool getOverlay(int fd, mdp_overlay& ov);
76 bool play(int fd, msmfb_overlay_data& od);
[all …]
/hardware/qcom/display/msm8084/liboverlay/
DmdpWrapper.h51 bool getFScreenInfo(int fd, fb_fix_screeninfo& finfo);
54 bool getVScreenInfo(int fd, fb_var_screeninfo& vinfo);
57 bool setVScreenInfo(int fd, fb_var_screeninfo& vinfo);
60 bool startRotator(int fd, msm_rotator_img_info& rot);
63 bool rotate(int fd, msm_rotator_data_info& rot);
66 bool setOverlay(int fd, mdp_overlay& ov);
69 bool validateAndSet(const int& fd, mdp_overlay_list& list);
72 bool endRotator(int fd, int sessionId);
75 bool unsetOverlay(int fd, int ovId);
78 bool getOverlay(int fd, mdp_overlay& ov);
[all …]
/hardware/qcom/bt/msm8960/libbt-vendor/src/
Duserial_vendor.c71 int fd; in bt_hci_init_transport() local
73 fd = bt_hci_init_transport_id(i); in bt_hci_init_transport()
74 if(fd < 0 ){ in bt_hci_init_transport()
77 pFd[i] = fd; in bt_hci_init_transport()
85 int fd = -1; in bt_hci_init_transport_id() local
91 fd = open(s_pszDevSmd[chId], (O_RDWR | O_NOCTTY)); in bt_hci_init_transport_id()
93 while ((-1 == fd) && (retry < 7)) { in bt_hci_init_transport_id()
97 fd = open(bt_hci_transport_device.name, (O_RDWR | O_NOCTTY)); in bt_hci_init_transport_id()
101 if (-1 == fd) in bt_hci_init_transport_id()
116 if (tcflush(fd, TCIOFLUSH) < 0) in bt_hci_init_transport_id()
[all …]
/hardware/qcom/gps/msm8994/loc_api/libloc_api_50001/
Dloc_eng_dmn_conn_glue_pipe.c63 int fd; in loc_eng_dmn_conn_glue_pipeget() local
82 fd = open(pipe_name, mode); in loc_eng_dmn_conn_glue_pipeget()
83 if (fd <= 0) in loc_eng_dmn_conn_glue_pipeget()
87 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_pipeget()
88 return fd; in loc_eng_dmn_conn_glue_pipeget()
110 int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd) in loc_eng_dmn_conn_glue_piperemove() argument
112 close(fd); in loc_eng_dmn_conn_glue_piperemove()
114 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_piperemove()
138 int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz) in loc_eng_dmn_conn_glue_pipewrite() argument
142 result = write(fd, buf, sz); in loc_eng_dmn_conn_glue_pipewrite()
[all …]
/hardware/qcom/gps/msm8960/loc_api/libloc_api_50001/
Dloc_eng_dmn_conn_glue_pipe.c63 int fd; in loc_eng_dmn_conn_glue_pipeget() local
82 fd = open(pipe_name, mode); in loc_eng_dmn_conn_glue_pipeget()
83 if (fd <= 0) in loc_eng_dmn_conn_glue_pipeget()
87 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_pipeget()
88 return fd; in loc_eng_dmn_conn_glue_pipeget()
110 int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd) in loc_eng_dmn_conn_glue_piperemove() argument
112 close(fd); in loc_eng_dmn_conn_glue_piperemove()
114 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_piperemove()
138 int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz) in loc_eng_dmn_conn_glue_pipewrite() argument
142 result = write(fd, buf, sz); in loc_eng_dmn_conn_glue_pipewrite()
[all …]
/hardware/qcom/gps/loc_api/libloc_api_50001/
Dloc_eng_dmn_conn_glue_pipe.c63 int fd; in loc_eng_dmn_conn_glue_pipeget() local
82 fd = open(pipe_name, mode); in loc_eng_dmn_conn_glue_pipeget()
83 if (fd <= 0) in loc_eng_dmn_conn_glue_pipeget()
87 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_pipeget()
88 return fd; in loc_eng_dmn_conn_glue_pipeget()
110 int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd) in loc_eng_dmn_conn_glue_piperemove() argument
112 close(fd); in loc_eng_dmn_conn_glue_piperemove()
114 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_piperemove()
138 int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz) in loc_eng_dmn_conn_glue_pipewrite() argument
142 result = write(fd, buf, sz); in loc_eng_dmn_conn_glue_pipewrite()
[all …]
/hardware/qcom/gps/msm8084/loc_api/libloc_api_50001/
Dloc_eng_dmn_conn_glue_pipe.c63 int fd; in loc_eng_dmn_conn_glue_pipeget() local
82 fd = open(pipe_name, mode); in loc_eng_dmn_conn_glue_pipeget()
83 if (fd <= 0) in loc_eng_dmn_conn_glue_pipeget()
87 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_pipeget()
88 return fd; in loc_eng_dmn_conn_glue_pipeget()
110 int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd) in loc_eng_dmn_conn_glue_piperemove() argument
112 close(fd); in loc_eng_dmn_conn_glue_piperemove()
114 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_piperemove()
138 int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz) in loc_eng_dmn_conn_glue_pipewrite() argument
142 result = write(fd, buf, sz); in loc_eng_dmn_conn_glue_pipewrite()
[all …]
/hardware/qcom/gps/msm8996/loc_api/libloc_api_50001/
Dloc_eng_dmn_conn_glue_pipe.c63 int fd; in loc_eng_dmn_conn_glue_pipeget() local
82 fd = open(pipe_name, mode); in loc_eng_dmn_conn_glue_pipeget()
83 if (fd <= 0) in loc_eng_dmn_conn_glue_pipeget()
87 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_pipeget()
88 return fd; in loc_eng_dmn_conn_glue_pipeget()
110 int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd) in loc_eng_dmn_conn_glue_piperemove() argument
112 close(fd); in loc_eng_dmn_conn_glue_piperemove()
114 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_piperemove()
138 int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz) in loc_eng_dmn_conn_glue_pipewrite() argument
142 result = write(fd, buf, sz); in loc_eng_dmn_conn_glue_pipewrite()
[all …]
/hardware/qcom/gps/msm8909/loc_api/libloc_api_50001/
Dloc_eng_dmn_conn_glue_pipe.c63 int fd; in loc_eng_dmn_conn_glue_pipeget() local
82 fd = open(pipe_name, mode); in loc_eng_dmn_conn_glue_pipeget()
83 if (fd <= 0) in loc_eng_dmn_conn_glue_pipeget()
87 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_pipeget()
88 return fd; in loc_eng_dmn_conn_glue_pipeget()
110 int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd) in loc_eng_dmn_conn_glue_piperemove() argument
112 close(fd); in loc_eng_dmn_conn_glue_piperemove()
114 LOC_LOGD("fd = %d, %s\n", fd, pipe_name); in loc_eng_dmn_conn_glue_piperemove()
138 int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz) in loc_eng_dmn_conn_glue_pipewrite() argument
142 result = write(fd, buf, sz); in loc_eng_dmn_conn_glue_pipewrite()
[all …]
/hardware/qcom/display/msm8226/liboverlay/
DmdpWrapper.h54 bool getFScreenInfo(int fd, fb_fix_screeninfo& finfo);
57 bool getVScreenInfo(int fd, fb_var_screeninfo& vinfo);
60 bool setVScreenInfo(int fd, fb_var_screeninfo& vinfo);
63 bool startRotator(int fd, msm_rotator_img_info& rot);
66 bool rotate(int fd, msm_rotator_data_info& rot);
69 bool setOverlay(int fd, mdp_overlay& ov);
72 bool validateAndSet(const int& fd, mdp_overlay_list& list);
75 bool endRotator(int fd, int sessionId);
78 bool unsetOverlay(int fd, int ovId);
81 bool getOverlay(int fd, mdp_overlay& ov);
[all …]
/hardware/qcom/display/msm8909/liboverlay/
DmdpWrapper.h57 bool getFScreenInfo(int fd, fb_fix_screeninfo& finfo);
60 bool getVScreenInfo(int fd, fb_var_screeninfo& vinfo);
63 bool setVScreenInfo(int fd, fb_var_screeninfo& vinfo);
66 bool startRotator(int fd, msm_rotator_img_info& rot);
69 bool rotate(int fd, msm_rotator_data_info& rot);
72 bool setOverlay(int fd, mdp_overlay& ov);
75 int validateAndSet(const int& fd, mdp_overlay_list& list);
78 bool endRotator(int fd, int sessionId);
81 bool unsetOverlay(int fd, int ovId);
84 bool getOverlay(int fd, mdp_overlay& ov);
[all …]
/hardware/qcom/display/msm8994/liboverlay/
DmdpWrapper.h57 bool getFScreenInfo(int fd, fb_fix_screeninfo& finfo);
60 bool getVScreenInfo(int fd, fb_var_screeninfo& vinfo);
63 bool setVScreenInfo(int fd, fb_var_screeninfo& vinfo);
66 bool startRotator(int fd, msm_rotator_img_info& rot);
69 bool rotate(int fd, msm_rotator_data_info& rot);
72 bool setOverlay(int fd, mdp_overlay& ov);
75 int validateAndSet(const int& fd, mdp_overlay_list& list);
78 bool endRotator(int fd, int sessionId);
81 bool unsetOverlay(int fd, int ovId);
84 bool getOverlay(int fd, mdp_overlay& ov);
[all …]
/hardware/invensense/65xx/libsensors_iio/
DMPLSupport.cpp33 int count, fd; in inv_read_data() local
35 fd = open(fname, O_RDONLY); in inv_read_data()
36 if(fd < 0) { in inv_read_data()
41 count = read_attribute_sensor(fd, buf, sizeof(buf)); in inv_read_data()
43 close(fd); in inv_read_data()
50 close(fd); in inv_read_data()
56 int read_attribute_sensor(int fd, char* data, unsigned int size) in read_attribute_sensor() argument
61 if (fd > 0) { in read_attribute_sensor()
62 count = pread(fd, data, size, 0); in read_attribute_sensor()
80 int enable_sysfs_sensor(int fd, int en) in enable_sysfs_sensor() argument
[all …]

12345678910>>...29