Re: [PATCH v7 09/24] wfx: add hwio.c/hwio.h

Kalle Valo
2021-10-01T12:39:52Z

Kalle Valo <kvalo@codeaurora.org> writes:

>> --- /dev/null
>> +++ b/drivers/net/wireless/silabs/wfx/hwio.h
>> @@ -0,0 +1,79 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> +/*
>> + * Low-level I/O functions.
>> + *
>> + * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
>> + * Copyright (c) 2010, ST-Ericsson
>> + */
>> +#ifndef WFX_HWIO_H
>> +#define WFX_HWIO_H
>> +
>> +#include <linux/types.h>
>> +
>> +struct wfx_dev;
>> +
>> +/* Caution: in the functions below, 'buf' will used with a DMA. So, it must be
>> + * kmalloc'd (do not use stack allocated buffers). In doubt, enable
>> + * CONFIG_DEBUG_SG to detect badly located buffer.
>> + */
>> +int wfx_data_read(struct wfx_dev *wdev, void *buf, size_t buf_len);
>> +int wfx_data_write(struct wfx_dev *wdev, const void *buf, size_t buf_len);
>> +
>> +int sram_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len);
>> +int sram_buf_write(struct wfx_dev *wdev, u32 addr, const void *buf, size_t len);
>> +
>> +int ahb_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len);
>> +int ahb_buf_write(struct wfx_dev *wdev, u32 addr, const void *buf, size_t len);
>> +
>> +int sram_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val);
>> +int sram_reg_write(struct wfx_dev *wdev, u32 addr, u32 val);
>> +
>> +int ahb_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val);
>> +int ahb_reg_write(struct wfx_dev *wdev, u32 addr, u32 val);
>
> "wfx_" prefix missing from these functions.

I actually saw quite a few functions without wfx_ prefix. My preference
is that all function names would have that prefix.

--