Lines Matching refs:devicePath

243 static std::optional<std::filesystem::path> getSysfsRootPath(const char* devicePath) {  in getSysfsRootPath()  argument
248 if (stat(devicePath, &statbuf) == -1) { in getSysfsRootPath()
249 ALOGE("Could not stat device %s due to error: %s.", devicePath, std::strerror(errno)); in getSysfsRootPath()
1598 const std::filesystem::path& devicePath) const { in obtainAssociatedDeviceLocked()
1600 getSysfsRootPath(devicePath.c_str()); in obtainAssociatedDeviceLocked()
1739 EventHub::Device* EventHub::getDeviceByPathLocked(const std::string& devicePath) const { in getDeviceByPathLocked()
1741 if (device->path == devicePath) { in getDeviceByPathLocked()
2245 void EventHub::openDeviceLocked(const std::string& devicePath) { in openDeviceLocked() argument
2251 if (device->path == devicePath) { in openDeviceLocked()
2258 ALOGV("Opening device: %s", devicePath.c_str()); in openDeviceLocked()
2260 int fd = open(devicePath.c_str(), O_RDWR | O_CLOEXEC | O_NONBLOCK); in openDeviceLocked()
2262 ALOGE("could not open %s, %s\n", devicePath.c_str(), strerror(errno)); in openDeviceLocked()
2270 ALOGE("Could not get device name for %s: %s", devicePath.c_str(), strerror(errno)); in openDeviceLocked()
2280 ALOGI("ignoring event id %s driver %s\n", devicePath.c_str(), item.c_str()); in openDeviceLocked()
2289 ALOGE("could not get driver version for %s, %s\n", devicePath.c_str(), strerror(errno)); in openDeviceLocked()
2297 ALOGE("could not get device input id for %s, %s\n", devicePath.c_str(), strerror(errno)); in openDeviceLocked()
2339 std::make_unique<Device>(fd, deviceId, devicePath, identifier, in openDeviceLocked()
2340 obtainAssociatedDeviceLocked(devicePath)); in openDeviceLocked()
2342 ALOGV("add device %d: %s\n", deviceId, devicePath.c_str()); in openDeviceLocked()
2508 ALOGV("Dropping device: id=%d, path='%s', name='%s'", deviceId, devicePath.c_str(), in openDeviceLocked()
2547 deviceId, fd, devicePath.c_str(), device->identifier.name.c_str(), in openDeviceLocked()
2555 void EventHub::openVideoDeviceLocked(const std::string& devicePath) { in openVideoDeviceLocked() argument
2556 std::unique_ptr<TouchVideoDevice> videoDevice = TouchVideoDevice::create(devicePath); in openVideoDeviceLocked()
2558 ALOGE("Could not create touch video device for %s. Ignoring", devicePath.c_str()); in openVideoDeviceLocked()
2707 void EventHub::closeDeviceByPathLocked(const std::string& devicePath) { in closeDeviceByPathLocked() argument
2708 Device* device = getDeviceByPathLocked(devicePath); in closeDeviceByPathLocked()
2713 ALOGV("Remove device: %s not found, device may already have been removed.", devicePath.c_str()); in closeDeviceByPathLocked()
2721 void EventHub::closeVideoDeviceByPathLocked(const std::string& devicePath) { in closeVideoDeviceByPathLocked() argument
2725 if (device->videoDevice && device->videoDevice->getPath() == devicePath) { in closeVideoDeviceByPathLocked()
2732 [&devicePath](const std::unique_ptr<TouchVideoDevice>& videoDevice) { in closeVideoDeviceByPathLocked()
2733 return videoDevice->getPath() == devicePath; in closeVideoDeviceByPathLocked()