Message ID | 20220524113502.1094459-68-viktor.barna@celeno.com |
---|---|
State | New |
Headers | show |
Series | wireless: cl8k driver for Celeno IEEE 802.11ax devices | expand |
On 5/24/2022 4:34 AM, viktor.barna@celeno.com wrote: > From: Viktor Barna <viktor.barna@celeno.com> > > (Part of the split. Please, take a look at the cover letter for more > details). > > Signed-off-by: Viktor Barna <viktor.barna@celeno.com> > --- > drivers/net/wireless/celeno/cl8k/rfic.h | 29 +++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > create mode 100644 drivers/net/wireless/celeno/cl8k/rfic.h > > diff --git a/drivers/net/wireless/celeno/cl8k/rfic.h b/drivers/net/wireless/celeno/cl8k/rfic.h > new file mode 100644 > index 000000000000..686ebd6fcd98 > --- /dev/null > +++ b/drivers/net/wireless/celeno/cl8k/rfic.h > @@ -0,0 +1,29 @@ > +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ > +/* Copyright(c) 2019-2022, Celeno Communications Ltd. */ > + > +#ifndef CL_RFIC_H > +#define CL_RFIC_H > + > +#include "hw.h" > + > +#define ATHOS_A_VER 0xB1 > +#define ATHOS_B_VER 0xB2 > + > +enum cl_rf_overwrite_cmd { > + OVERWRITE_DONE, > + SPI_RD_CMD, > + SPI_WR_CMD, > + GCU_WR_CMD, > + RIU_WR_CMD, > + UDELAY_CMD, > + GEN_WR_CMD, > + RF_OVERWRITE_CMD_MAX = OVERWRITE_DONE consider adding CL_ prefix to the enumerators to avoid namespace collision. why is OVERWRITE_DONE the max command? that doesn't seem to make sense since other enumerators are defined after it. > +}; > + > +int cl_spi_driver_read_byte(struct cl_hw *cl_hw, u8 page, u8 addr, u8 *val); > +int cl_spi_read(struct cl_hw *cl_hw, u8 page, u8 addr, u8 *val); > +int cl_rfic_read_overwrite_file(struct cl_hw *cl_hw, > + struct cl_rf_reg_overwrite_info *info, > + bool init); > +void cl_chip_set_rfic_version(struct cl_hw *cl_hw); > +#endif /* CL_RFIC_H */
On Thu, 2 Jun 2022 13:40:23 -0700, quic_jjohnson@quicinc.com wrote: > consider adding CL_ prefix to the enumerators to avoid namespace collision. Yes, thanks. > why is OVERWRITE_DONE the max command? that doesn't seem to make sense > since other enumerators are defined after it. Agree, that is an odd place. We likely will remove that in the next version of the code. Best regards, Viktor Barna
diff --git a/drivers/net/wireless/celeno/cl8k/rfic.h b/drivers/net/wireless/celeno/cl8k/rfic.h new file mode 100644 index 000000000000..686ebd6fcd98 --- /dev/null +++ b/drivers/net/wireless/celeno/cl8k/rfic.h @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ +/* Copyright(c) 2019-2022, Celeno Communications Ltd. */ + +#ifndef CL_RFIC_H +#define CL_RFIC_H + +#include "hw.h" + +#define ATHOS_A_VER 0xB1 +#define ATHOS_B_VER 0xB2 + +enum cl_rf_overwrite_cmd { + OVERWRITE_DONE, + SPI_RD_CMD, + SPI_WR_CMD, + GCU_WR_CMD, + RIU_WR_CMD, + UDELAY_CMD, + GEN_WR_CMD, + RF_OVERWRITE_CMD_MAX = OVERWRITE_DONE +}; + +int cl_spi_driver_read_byte(struct cl_hw *cl_hw, u8 page, u8 addr, u8 *val); +int cl_spi_read(struct cl_hw *cl_hw, u8 page, u8 addr, u8 *val); +int cl_rfic_read_overwrite_file(struct cl_hw *cl_hw, + struct cl_rf_reg_overwrite_info *info, + bool init); +void cl_chip_set_rfic_version(struct cl_hw *cl_hw); +#endif /* CL_RFIC_H */