Files
RedBear-OS/local/recipes/gpu/amdgpu-source/include/linux/gnss.h
T
vasilito dc68054305 restore lost packages from 0.2.3 + fix overwritten 0.2.4 files
- Restore 29 recipe symlinks (libdrm, qtbase, dbus, sddm, pipewire, etc.)
- Restore 33 patches (KDE, libdrm, mesa, pipewire, sddm, wireplumber)
- Restore 20+ local/scripts (audit, lint, test, build helpers)
- Restore src/cook/scheduler.rs, status.rs, gnu-config/
- Restore scripts/patch-inclusion-gate.sh, run_mini1.sh, validate-collision-log.sh
- Recover TLC source from HEAD (was overwritten by 0.2.3 checkout)
- Recover 11 local/docs plans from HEAD (were overwritten)
- Recover qt6-wayland-smoke symlink from HEAD
- Fix MOTD: remove garbled ASCII art, use clean text
- Update version: 0.2.0 -> 0.2.4 in os-release, motd, config
- Reduce filesystem_size: 1536 -> 512 MiB
- Add ABSOLUTE RULE to AGENTS.md: never delete/ignore packages
- Reduce pcid scheme log verbosity: info -> debug
2026-06-19 12:39:14 +03:00

77 lines
1.6 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* GNSS receiver support
*
* Copyright (C) 2018 Johan Hovold <johan@kernel.org>
*/
#ifndef _LINUX_GNSS_H
#define _LINUX_GNSS_H
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/kfifo.h>
#include <linux/mutex.h>
#include <linux/rwsem.h>
#include <linux/types.h>
#include <linux/wait.h>
struct gnss_device;
enum gnss_type {
GNSS_TYPE_NMEA = 0,
GNSS_TYPE_SIRF,
GNSS_TYPE_UBX,
GNSS_TYPE_MTK,
GNSS_TYPE_COUNT
};
struct gnss_operations {
int (*open)(struct gnss_device *gdev);
void (*close)(struct gnss_device *gdev);
int (*write_raw)(struct gnss_device *gdev, const unsigned char *buf,
size_t count);
};
struct gnss_device {
struct device dev;
struct cdev cdev;
int id;
enum gnss_type type;
unsigned long flags;
struct rw_semaphore rwsem;
const struct gnss_operations *ops;
unsigned int count;
unsigned int disconnected:1;
struct mutex read_mutex;
struct kfifo read_fifo;
wait_queue_head_t read_queue;
struct mutex write_mutex;
char *write_buf;
};
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,
size_t count);
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 */