Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1751624rwl; Sun, 26 Mar 2023 08:27:07 -0700 (PDT) X-Google-Smtp-Source: AKy350Y/eB0zKdnPZxbd/rcA4NSCcMcSOIOqArO9yPE7rSbfELoREyUx1+7U/dyhrcPIjHoZWuRz X-Received: by 2002:a17:906:4356:b0:93d:1bfd:8fa with SMTP id z22-20020a170906435600b0093d1bfd08famr8965897ejm.36.1679844427407; Sun, 26 Mar 2023 08:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679844427; cv=none; d=google.com; s=arc-20160816; b=ExhHoVuaZgJmehoeyqk2XDj+Vu4TcTrC4WQzw2sSWjQw/J8FTuAHTrMO48eNpzNy3y GDlJ9vW8uSEx2Why9MNL9+vkayTvOs2HnWJhljQflTgXg+BnrArUmR1CwcKrfo9xMedM UW9mRearXppwVlZRXrfYWNShINNq1UyON7ZiMPnn9vELi0/Z7cS5mFNZqkUgbGvsbYEj zmR+BiHRJm2IlxELpDatY2Jr8owS/JweOC1rtbns9jXnbx0Xpji2IoMDVMvNT6N20Bdy zMYvd3Z1SokcUj/HHI6R4L/bQPe7tvLg5Fs0DbMnh+WQqhtUcpErblvURK/I9diJnM76 pYMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GVTTXOoQU7l9rfYcvNd55BzoWmqOmNSFVkck/8xGbHk=; b=CY/0eEHobHUH3tCIdVdlzDvuvnV/3d6qo8z1SwO5LZiL8ISuc4mWtVeOl1CUZvVvfF VieGXU6VIOdvcMYP+mdfWKM0J4cA+y/ntmjYe6D3FkI+hBMCZi50oTMzaZbnL9+K9VNY HwDsFnj0Bp7cnOS12u8XC698eHY/CZNV+knN6oM7cSvXhwKMAvsHeMuh4rpIqV6fVx5U 8euhZm2hDsojk2tFl/Et1SlTjV+L4prbWKAL64rKVNcGEPjjreJSwbmrfJxuJzSn7/GO AU46EUtl6ZtC+sNb/9HLtPwFpHl+h3NImQ94MAURgpBpMyzh3NuwNlKoaeETZNvHbxiI S9pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ov+xIDwS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a1709064c4500b009310d4decd9si24862242ejw.313.2023.03.26.08.26.43; Sun, 26 Mar 2023 08:27:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ov+xIDwS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232509AbjCZPSb (ORCPT + 99 others); Sun, 26 Mar 2023 11:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbjCZPSa (ORCPT ); Sun, 26 Mar 2023 11:18:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 587A43A9A; Sun, 26 Mar 2023 08:18:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CE8B860EF4; Sun, 26 Mar 2023 15:18:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A22AC433D2; Sun, 26 Mar 2023 15:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679843908; bh=dRkbT8k8JB54wN8VkwpYOPGFzgXukJhwGApsL5yVy9o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ov+xIDwSXwTRXWLvbjMQFoPbc9q+DEtq1iNSymFSye3vh46PJ8xXeNz4/afDbfUNU C6Uwkc6tcmuuYzk++JcQkfrNNrcv0xGPG4wyUyBlpkHVCkseKzIPIFnZnhAw9ARIJC bYBl6UO26nQY4KjYnVYrqiT3/jnpBjnmBf+3DLCwNA5NZCvRRn6nEgYYSVYCUfgwH9 Ny+X8Y3fwJGtIYPUafe3UmLYgbyupH1BBy8o90WImg/qsWfYQNnnmJ56khaNYSl5FO /CXLzqvyj/u/g2A8yugn2M9cavNlrazLb8Bbs763MBtEyo2S38Q2/2wygBaM0b2tyG G7YFAIiDu8akA== Date: Sun, 26 Mar 2023 17:18:23 +0200 From: Andi Shyti To: Ye Xiang Cc: Greg Kroah-Hartman , Arnd Bergmann , Matthias Kaehlcke , Lee Jones , Wolfram Sang , Tyrone Ting , Mark Brown , Linus Walleij , Bartosz Golaszewski , linux-usb@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-gpio@vger.kernel.org, srinivas.pandruvada@intel.com, heikki.krogerus@linux.intel.com, andriy.shevchenko@linux.intel.com, sakari.ailus@linux.intel.com, zhifeng.wang@intel.com, wentong.wu@intel.com, lixu.zhang@intel.com Subject: Re: [PATCH v6 2/6] usb: ljca: Add transport interfaces for sub-module drivers Message-ID: <20230326151823.vrmboykkzwhfbmpz@intel.intel> References: <20230323172113.1231050-1-xiang.ye@intel.com> <20230323172113.1231050-3-xiang.ye@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230323172113.1231050-3-xiang.ye@intel.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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