| /* SPDX-License-Identifier: GPL-2.0 */ |
| * Copyright (C) 2018 Johan Hovold <johan@kernel.org> |
| #include <linux/device.h> |
| int (*open)(struct gnss_device *gdev); |
| void (*close)(struct gnss_device *gdev); |
| int (*write_raw)(struct gnss_device *gdev, const unsigned char *buf, |
| struct rw_semaphore rwsem; |
| const struct gnss_operations *ops; |
| unsigned int disconnected:1; |
| wait_queue_head_t read_queue; |
| struct mutex write_mutex; |
| struct gnss_device *gnss_allocate_device(struct device *parent); |
| void gnss_put_device(struct gnss_device *gdev); |
| int gnss_register_device(struct gnss_device *gdev); |
| void gnss_deregister_device(struct gnss_device *gdev); |
| int gnss_insert_raw(struct gnss_device *gdev, const unsigned char *buf, |
| static inline void gnss_set_drvdata(struct gnss_device *gdev, void *data) |
| dev_set_drvdata(&gdev->dev, data); |
| static inline void *gnss_get_drvdata(struct gnss_device *gdev) |
| return dev_get_drvdata(&gdev->dev); |
| #endif /* _LINUX_GNSS_H */ |