Revision a1e9185d20b56af04022d2e656802254f4ea47eb authored by Linus Torvalds on 02 December 2022, 23:40:35 UTC, committed by Linus Torvalds on 02 December 2022, 23:40:35 UTC
Pull sound fixes from Takashi Iwai: "Likely the last piece for 6.1; the only significant fixes are ASoC core ops fixes, while others are device-specific (rather minor) fixes in ASoC and FireWire drivers. All appear safe enough to take as a late stage material" * tag 'sound-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: dice: fix regression for Lexicon I-ONIX FW810S ASoC: cs42l51: Correct PGA Volume minimum value ASoC: ops: Correct bounds check for second channel on SX controls ASoC: tlv320adc3xxx: Fix build error for implicit function declaration ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx() ASoC: ops: Fix bounds check for _sx controls ASoC: fsl_micfil: explicitly clear CHnF flags ASoC: fsl_micfil: explicitly clear software reset bit
gnss.h
/* 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 */
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...