Re: [PATCH 03/10] qmi: Added structure for device options.
Denis Kenzior <[email protected]> Wed, 12 Feb 2025 13:21:26 -0600
| Newsgroups | dev.linux.lists.ofono |
|---|---|
| Message-ID | <[email protected]> |
Hi Grant,
On 2/11/25 11:52 PM, Grant Erickson wrote:
> Defines options that may alter the default behavior of the QMI driver
> for a specific, instantiated device.
> ---
> drivers/qmimodem/qmi.h | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/qmimodem/qmi.h b/drivers/qmimodem/qmi.h
> index 913035897ea4..3f60e90c015a 100644
> --- a/drivers/qmimodem/qmi.h
> +++ b/drivers/qmimodem/qmi.h
> @@ -76,6 +76,25 @@ enum qmi_qmux_device_quirk {
> QMI_QMUX_DEVICE_QUIRK_REQ_RATE_LIMIT = 0x01
> };
>
> +/**
> + * Defines options that may alter the default behavior of the QMI
> + * driver for a specific, instantiated device.
> + */
> +struct qmi_qmux_device_options {
> + /**
> + * Device-specific "quirk".
> + */
> + enum qmi_qmux_device_quirk quirks;
> +
> + /**
> + * If quirks has #QMI_QMUX_DEVICE_QUIRK_REQ_RATE_LIMIT set, this
> + * is the minimum period, in microseconds, in which back-to-back
> + * QMI service requests may be sent to avoid triggering a
> + * firmware lock up and hang.
> + */
> + unsigned int min_req_period_us;
Why do you need both? Isn't setting min_req_period_us non-zero enough? Also,
strictly speaking this may also apply to qrtr devices. Maybe just add
bool qmi_qmux_device_set_request_throttle(device, us_time) ...?
> +};
> +
> typedef void (*qmi_destroy_func_t)(void *user_data);
>
> struct qmi_service;
Regards,
-Denis