From: Marcel Holtmann <marcel@holtmann.org>
To: Hilda Wu <hildawu@realtek.com>
Cc: Johan Hedberg <johan.hedberg@gmail.com>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
apusaka@chromium.org, tientzu@chromium.org, max.chou@realtek.com,
alex_lu@realsil.com.cn, kidman@realtek.com
Subject: Re: [PATCH v3 1/2] Bluetooth: btrtl: Adjust the position of strcut definition
Date: Fri, 23 Apr 2021 08:56:21 +0200 [thread overview]
Message-ID: <8AA44691-FFB2-4755-B7F2-6ABFCAAAEAA7@holtmann.org> (raw)
In-Reply-To: <20210423035229.27513-2-hildawu@realtek.com>
Hi Hilda,
> Adjust the position of strcut definition for btrtl and hci_h5.
> The purpose is to avoid re-defining some chip features and let UART devices
> get relevant information too.
>
> Signed-off-by: hildawu <hildawu@realtek.com>
> ---
> drivers/bluetooth/btrtl.c | 36 ------------------------------------
> drivers/bluetooth/btrtl.h | 36 +++++++++++++++++++++++++++++++++++-
> 2 files changed, 35 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
> index e7fe5fb22753..94d1e7885aee 100644
> --- a/drivers/bluetooth/btrtl.c
> +++ b/drivers/bluetooth/btrtl.c
> @@ -38,42 +38,6 @@
> .hci_ver = (hciv), \
> .hci_bus = (bus)
>
> -enum btrtl_chip_id {
> - CHIP_ID_8723A,
> - CHIP_ID_8723B,
> - CHIP_ID_8821A,
> - CHIP_ID_8761A,
> - CHIP_ID_8822B = 8,
> - CHIP_ID_8723D,
> - CHIP_ID_8821C,
> - CHIP_ID_8822C = 13,
> - CHIP_ID_8761B,
> - CHIP_ID_8852A = 18,
> -};
> -
> -struct id_table {
> - __u16 match_flags;
> - __u16 lmp_subver;
> - __u16 hci_rev;
> - __u8 hci_ver;
> - __u8 hci_bus;
> - bool config_needed;
> - bool has_rom_version;
> - char *fw_name;
> - char *cfg_name;
> -};
> -
> -struct btrtl_device_info {
> - const struct id_table *ic_info;
> - u8 rom_version;
> - u8 *fw_data;
> - int fw_len;
> - u8 *cfg_data;
> - int cfg_len;
> - bool drop_fw;
> - int project_id;
> -};
> -
> static const struct id_table ic_id_table[] = {
> /* 8723A */
> { IC_INFO(RTL_ROM_LMP_8723A, 0xb, 0x6, HCI_USB),
> diff --git a/drivers/bluetooth/btrtl.h b/drivers/bluetooth/btrtl.h
> index 2a582682136d..08bda0597c0c 100644
> --- a/drivers/bluetooth/btrtl.h
> +++ b/drivers/bluetooth/btrtl.h
> @@ -12,7 +12,41 @@
> #define rtl_dev_info(dev, fmt, ...) bt_dev_info(dev, "RTL: " fmt, ##__VA_ARGS__)
> #define rtl_dev_dbg(dev, fmt, ...) bt_dev_dbg(dev, "RTL: " fmt, ##__VA_ARGS__)
>
> -struct btrtl_device_info;
> +enum btrtl_chip_id {
> + CHIP_ID_8723A,
> + CHIP_ID_8723B,
> + CHIP_ID_8821A,
> + CHIP_ID_8761A,
> + CHIP_ID_8822B = 8,
> + CHIP_ID_8723D,
> + CHIP_ID_8821C,
> + CHIP_ID_8822C = 13,
> + CHIP_ID_8761B,
> + CHIP_ID_8852A = 18,
> +};
> +
> +struct id_table {
> + __u16 match_flags;
> + __u16 lmp_subver;
> + __u16 hci_rev;
> + __u8 hci_ver;
> + __u8 hci_bus;
> + bool config_needed;
> + bool has_rom_version;
> + char *fw_name;
> + char *cfg_name;
> +};
> +
> +struct btrtl_device_info {
> + const struct id_table *ic_info;
> + u8 rom_version;
> + u8 *fw_data;
> + int fw_len;
> + u8 *cfg_data;
> + int cfg_len;
> + bool drop_fw;
> + int project_id;
> +};
I really doubt that you need to expose all of these. Provide access function if needed.
Regards
Marcel
next prev parent reply other threads:[~2021-04-23 6:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 3:52 [PATCH v3 0/2] Bluetooth hci_h5 btrtl Add flag for keep power in suspend/resume hildawu
2021-04-23 3:52 ` [PATCH v3 1/2] Bluetooth: btrtl: Adjust the position of strcut definition hildawu
2021-04-23 6:56 ` Marcel Holtmann [this message]
2021-04-23 3:52 ` [PATCH v3 2/2] Bluetooth: hci_h5: Add flag for keep power during suspend/resume hildawu
2021-04-23 6:54 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8AA44691-FFB2-4755-B7F2-6ABFCAAAEAA7@holtmann.org \
--to=marcel@holtmann.org \
--cc=alex_lu@realsil.com.cn \
--cc=apusaka@chromium.org \
--cc=hildawu@realtek.com \
--cc=johan.hedberg@gmail.com \
--cc=kidman@realtek.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=max.chou@realtek.com \
--cc=tientzu@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®