Re: [PATCH v6 2/6] usb: ljca: Add transport interfaces for sub-module drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ye,

On Fri, Mar 24, 2023 at 01:21:09AM +0800, Ye Xiang wrote:
> This patch adds the transport interfaces for various LJCA

please, here and in the other patches, keep using the imperative
form, as in the subject.

> sub-module drivers to communicate with LJCA hardware. The
> sub-module of LJCA can use ljca_transfer() to issue a transfer
> between host and hardware. And ljca_register_event_cb is exported
> to LJCA sub-module drivers for hardware event subscription.
> 
> Signed-off-by: Ye Xiang <xiang.ye@xxxxxxxxx>
> ---
>  drivers/usb/misc/ljca.c  | 47 ++++++++++++++++++++++++++++
>  include/linux/usb/ljca.h | 66 ++++++++++++++++++++++++++++++++++++++++

Why havne't you added this in the previous patch?

>  2 files changed, 113 insertions(+)

[...]

> +/**
> + * typedef ljca_event_cb_t - event callback function signature
> + *
> + * @context: the execution context of who registered this callback
> + * @cmd: the command from device for this event
> + * @evt_data: the event data payload
> + * @len: the event data payload length
> + *
> + * The callback function is called in interrupt context and the data payload is
> + * only valid during the call. If the user needs later access of the data, it
> + * must copy it.
> + */
> +typedef void (*ljca_event_cb_t)(void *context, u8 cmd, const void *evt_data, int len);

I'm not very enthusiastic about this typedef here. Is it
providing a real improvement? As far as I can see it's used only
in one occasion.

I don't have a strong opinion on this, though.

Andi



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux