linux/drivers/net/ethernet/intel/ice/ice_gnss.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2021-2022, Intel Corporation. */

#include "ice.h"
#include "ice_lib.h"

/**
 * ice_gnss_do_write - Write data to internal GNSS receiver
 * @pf: board private structure
 * @buf: command buffer
 * @size: command buffer size
 *
 * Write UBX command data to the GNSS receiver
 *
 * Return:
 * * number of bytes written - success
 * * negative - error code
 */
static int
ice_gnss_do_write(struct ice_pf *pf, const unsigned char *buf, unsigned int size)
{}

/**
 * ice_gnss_read - Read data from internal GNSS module
 * @work: GNSS read work structure
 *
 * Read the data from internal GNSS receiver, write it to gnss_dev.
 */
static void ice_gnss_read(struct kthread_work *work)
{}

/**
 * ice_gnss_struct_init - Initialize GNSS receiver
 * @pf: Board private structure
 *
 * Initialize GNSS structures and workers.
 *
 * Return:
 * * pointer to initialized gnss_serial struct - success
 * * NULL - error
 */
static struct gnss_serial *ice_gnss_struct_init(struct ice_pf *pf)
{}

/**
 * ice_gnss_open - Open GNSS device
 * @gdev: pointer to the gnss device struct
 *
 * Open GNSS device and start filling the read buffer for consumer.
 *
 * Return:
 * * 0 - success
 * * negative - error code
 */
static int ice_gnss_open(struct gnss_device *gdev)
{}

/**
 * ice_gnss_close - Close GNSS device
 * @gdev: pointer to the gnss device struct
 *
 * Close GNSS device, cancel worker, stop filling the read buffer.
 */
static void ice_gnss_close(struct gnss_device *gdev)
{}

/**
 * ice_gnss_write - Write to GNSS device
 * @gdev: pointer to the gnss device struct
 * @buf: pointer to the user data
 * @count: size of the buffer to be sent to the GNSS device
 *
 * Return:
 * * number of written bytes - success
 * * negative - error code
 */
static int
ice_gnss_write(struct gnss_device *gdev, const unsigned char *buf,
	       size_t count)
{}

static const struct gnss_operations ice_gnss_ops =;

/**
 * ice_gnss_register - Register GNSS receiver
 * @pf: Board private structure
 *
 * Allocate and register GNSS receiver in the Linux GNSS subsystem.
 *
 * Return:
 * * 0 - success
 * * negative - error code
 */
static int ice_gnss_register(struct ice_pf *pf)
{}

/**
 * ice_gnss_deregister - Deregister GNSS receiver
 * @pf: Board private structure
 *
 * Deregister GNSS receiver from the Linux GNSS subsystem,
 * release its resources.
 */
static void ice_gnss_deregister(struct ice_pf *pf)
{}

/**
 * ice_gnss_init - Initialize GNSS support
 * @pf: Board private structure
 */
void ice_gnss_init(struct ice_pf *pf)
{}

/**
 * ice_gnss_exit - Disable GNSS TTY support
 * @pf: Board private structure
 */
void ice_gnss_exit(struct ice_pf *pf)
{}

/**
 * ice_gnss_is_gps_present - Check if GPS HW is present
 * @hw: pointer to HW struct
 */
bool ice_gnss_is_gps_present(struct ice_hw *hw)
{}