linux/drivers/net/ieee802154/at86rf230.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * AT86RF230/RF231 driver
 *
 * Copyright (C) 2009-2012 Siemens AG
 *
 * Written by:
 * Dmitry Eremin-Solenikov <[email protected]>
 * Alexander Smirnov <[email protected]>
 * Alexander Aring <[email protected]>
 */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/gpio/consumer.h>
#include <linux/hrtimer.h>
#include <linux/jiffies.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/delay.h>
#include <linux/property.h>
#include <linux/spi/spi.h>
#include <linux/regmap.h>
#include <linux/skbuff.h>
#include <linux/ieee802154.h>

#include <net/mac802154.h>
#include <net/cfg802154.h>

#include "at86rf230.h"

struct at86rf230_local;
/* at86rf2xx chip depend data.
 * All timings are in us.
 */
struct at86rf2xx_chip_data {};

#define AT86RF2XX_MAX_BUF
/* tx retries to access the TX_ON state
 * if it's above then force change will be started.
 *
 * We assume the max_frame_retries (7) value of 802.15.4 here.
 */
#define AT86RF2XX_MAX_TX_RETRIES
/* We use the recommended 5 minutes timeout to recalibrate */
#define AT86RF2XX_CAL_LOOP_TIMEOUT

struct at86rf230_state_change {};

struct at86rf230_local {};

#define AT86RF2XX_NUMREGS

static void
at86rf230_async_state_change(struct at86rf230_local *lp,
			     struct at86rf230_state_change *ctx,
			     const u8 state, void (*complete)(void *context));

static inline void
at86rf230_sleep(struct at86rf230_local *lp)
{}

static inline void
at86rf230_awake(struct at86rf230_local *lp)
{}

static inline int
__at86rf230_write(struct at86rf230_local *lp,
		  unsigned int addr, unsigned int data)
{}

static inline int
__at86rf230_read(struct at86rf230_local *lp,
		 unsigned int addr, unsigned int *data)
{}

static inline int
at86rf230_read_subreg(struct at86rf230_local *lp,
		      unsigned int addr, unsigned int mask,
		      unsigned int shift, unsigned int *data)
{}

static inline int
at86rf230_write_subreg(struct at86rf230_local *lp,
		       unsigned int addr, unsigned int mask,
		       unsigned int shift, unsigned int data)
{}

static inline void
at86rf230_slp_tr_rising_edge(struct at86rf230_local *lp)
{}

static bool
at86rf230_reg_writeable(struct device *dev, unsigned int reg)
{}

static bool
at86rf230_reg_readable(struct device *dev, unsigned int reg)
{}

static bool
at86rf230_reg_volatile(struct device *dev, unsigned int reg)
{}

static bool
at86rf230_reg_precious(struct device *dev, unsigned int reg)
{}

static const struct regmap_config at86rf230_regmap_spi_config =;

static void
at86rf230_async_error_recover_complete(void *context)
{}

static void
at86rf230_async_error_recover(void *context)
{}

static inline void
at86rf230_async_error(struct at86rf230_local *lp,
		      struct at86rf230_state_change *ctx, int rc)
{}

/* Generic function to get some register value in async mode */
static void
at86rf230_async_read_reg(struct at86rf230_local *lp, u8 reg,
			 struct at86rf230_state_change *ctx,
			 void (*complete)(void *context))
{}

static void
at86rf230_async_write_reg(struct at86rf230_local *lp, u8 reg, u8 val,
			  struct at86rf230_state_change *ctx,
			  void (*complete)(void *context))
{}

static void
at86rf230_async_state_assert(void *context)
{}

static enum hrtimer_restart at86rf230_async_state_timer(struct hrtimer *timer)
{}

/* Do state change timing delay. */
static void
at86rf230_async_state_delay(void *context)
{}

static void
at86rf230_async_state_change_start(void *context)
{}

static void
at86rf230_async_state_change(struct at86rf230_local *lp,
			     struct at86rf230_state_change *ctx,
			     const u8 state, void (*complete)(void *context))
{}

static void
at86rf230_sync_state_change_complete(void *context)
{}

/* This function do a sync framework above the async state change.
 * Some callbacks of the IEEE 802.15.4 driver interface need to be
 * handled synchronously.
 */
static int
at86rf230_sync_state_change(struct at86rf230_local *lp, unsigned int state)
{}

static void
at86rf230_tx_complete(void *context)
{}

static void
at86rf230_tx_on(void *context)
{}

static void
at86rf230_tx_trac_check(void *context)
{}

static void
at86rf230_rx_read_frame_complete(void *context)
{}

static void
at86rf230_rx_trac_check(void *context)
{}

static void
at86rf230_irq_trx_end(void *context)
{}

static void
at86rf230_irq_status(void *context)
{}

static void
at86rf230_setup_spi_messages(struct at86rf230_local *lp,
			     struct at86rf230_state_change *state)
{}

static irqreturn_t at86rf230_isr(int irq, void *data)
{}

static void
at86rf230_write_frame_complete(void *context)
{}

static void
at86rf230_write_frame(void *context)
{}

static void
at86rf230_xmit_tx_on(void *context)
{}

static void
at86rf230_xmit_start(void *context)
{}

static int
at86rf230_xmit(struct ieee802154_hw *hw, struct sk_buff *skb)
{}

static int
at86rf230_ed(struct ieee802154_hw *hw, u8 *level)
{}

static int
at86rf230_start(struct ieee802154_hw *hw)
{}

static void
at86rf230_stop(struct ieee802154_hw *hw)
{}

static int
at86rf23x_set_channel(struct at86rf230_local *lp, u8 page, u8 channel)
{}

#define AT86RF2XX_MAX_ED_LEVELS
static const s32 at86rf233_ed_levels[AT86RF2XX_MAX_ED_LEVELS + 1] =;

static const s32 at86rf231_ed_levels[AT86RF2XX_MAX_ED_LEVELS + 1] =;

static const s32 at86rf212_ed_levels_100[AT86RF2XX_MAX_ED_LEVELS + 1] =;

static const s32 at86rf212_ed_levels_98[AT86RF2XX_MAX_ED_LEVELS + 1] =;

static inline int
at86rf212_update_cca_ed_level(struct at86rf230_local *lp, int rssi_base_val)
{}

static int
at86rf212_set_channel(struct at86rf230_local *lp, u8 page, u8 channel)
{}

static int
at86rf230_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
{}

static int
at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
			   struct ieee802154_hw_addr_filt *filt,
			   unsigned long changed)
{}

#define AT86RF23X_MAX_TX_POWERS
static const s32 at86rf233_powers[AT86RF23X_MAX_TX_POWERS + 1] =;

static const s32 at86rf231_powers[AT86RF23X_MAX_TX_POWERS + 1] =;

#define AT86RF212_MAX_TX_POWERS
static const s32 at86rf212_powers[AT86RF212_MAX_TX_POWERS + 1] =;

static int
at86rf23x_set_txpower(struct at86rf230_local *lp, s32 mbm)
{}

static int
at86rf212_set_txpower(struct at86rf230_local *lp, s32 mbm)
{}

static int
at86rf230_set_txpower(struct ieee802154_hw *hw, s32 mbm)
{}

static int
at86rf230_set_lbt(struct ieee802154_hw *hw, bool on)
{}

static int
at86rf230_set_cca_mode(struct ieee802154_hw *hw,
		       const struct wpan_phy_cca *cca)
{}

static int
at86rf230_set_cca_ed_level(struct ieee802154_hw *hw, s32 mbm)
{}

static int
at86rf230_set_csma_params(struct ieee802154_hw *hw, u8 min_be, u8 max_be,
			  u8 retries)
{}

static int
at86rf230_set_frame_retries(struct ieee802154_hw *hw, s8 retries)
{}

static int
at86rf230_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
{}

static const struct ieee802154_ops at86rf230_ops =;

static struct at86rf2xx_chip_data at86rf233_data =;

static struct at86rf2xx_chip_data at86rf231_data =;

static struct at86rf2xx_chip_data at86rf212_data =;

static int at86rf230_hw_init(struct at86rf230_local *lp, u8 xtal_trim)
{}

static int
at86rf230_detect_device(struct at86rf230_local *lp)
{}

static int at86rf230_probe(struct spi_device *spi)
{}

static void at86rf230_remove(struct spi_device *spi)
{}

static const struct of_device_id at86rf230_of_match[] =;
MODULE_DEVICE_TABLE(of, at86rf230_of_match);

static const struct spi_device_id at86rf230_device_id[] =;
MODULE_DEVICE_TABLE(spi, at86rf230_device_id);

static struct spi_driver at86rf230_driver =;

module_spi_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();