From patchwork Wed Aug 16 22:31:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Wentong" X-Patchwork-Id: 13355747 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67246C27C6D for ; Wed, 16 Aug 2023 22:32:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346935AbjHPWcZ (ORCPT ); Wed, 16 Aug 2023 18:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346949AbjHPWcP (ORCPT ); Wed, 16 Aug 2023 18:32:15 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E67231B2; Wed, 16 Aug 2023 15:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692225135; x=1723761135; h=from:to:cc:subject:date:message-id; bh=nwijjDmkxjrbyX2r4Q6jg8zM3nb6NY2HBgKNMEuFmwA=; b=IwTdfusO3j4rlHQJm+B08oTst581qmzJwKIXHB+LcJ8bcibmEmQNGJij L2sxuwZfV94NrZ9R4vABvfNFq3zPaTGTNxF7wroLdfcv1cNatXH+Bsmpp +ZaxXL5NagI3da9ig3SkptpkyciBXbY4yCNJ1y5jRFj3RWfE3FV3x/cMc yq5xY6b4XHdQK7cz94Fm5J2FBihuX+wVDLKyh6iSgM6KVZ5taUUh/XrLs vqTB9t9vhR0Al5VPj14BgaA5GS9PTD7VGgboC33rL7f3fUMqBFgIAMrnf ONmd9u1HfVKd5098DtSw46EkcHEec6+VylCaHCDWAvJh+IFzsh+YyssN/ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="376391925" X-IronPort-AV: E=Sophos;i="6.01,178,1684825200"; d="scan'208";a="376391925" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 15:32:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="877974818" Received: from shsensorbuild2.sh.intel.com ([10.239.134.197]) by fmsmga001.fm.intel.com with ESMTP; 16 Aug 2023 15:32:13 -0700 From: Wentong Wu To: gregkh@linuxfoundation.org, arnd@arndb.de, mka@chromium.org, oneukum@suse.com, lee@kernel.org, wsa@kernel.org, kfting@nuvoton.com, broonie@kernel.org, linus.walleij@linaro.org, maz@kernel.org, brgl@bgdev.pl, linux-usb@vger.kernel.org, linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, linux-gpio@vger.kernel.org, andriy.shevchenko@linux.intel.com, heikki.krogerus@linux.intel.com, andi.shyti@linux.intel.com, sakari.ailus@linux.intel.com, srinivas.pandruvada@intel.com, linux-drivers-review@eclists.intel.com Cc: zhifeng.wang@intel.com, Wentong Wu Subject: [PATCH v9 0/4] Add Intel LJCA device driver Date: Thu, 17 Aug 2023 06:31:47 +0800 Message-Id: <1692225111-19216-1-git-send-email-wentong.wu@intel.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add driver for Intel La Jolla Cove Adapter (LJCA) device. This is a USB-GPIO, USB-I2C and USB-SPI device. We add 4 drivers to support this device: a USB driver, a GPIO chip driver, a I2C controller driver and a SPI controller driver. --- v9: - overhaul usb-ljca driver to make it more structured and easy understanding - fix memory leak issue for usb-ljca driver - add spinlock to protect tx_buf and ex_buf - change exported APIs for usb-ljca driver - unify prefix for structures and functions for i2c-ljca driver - unify prefix for structures and functions for spi-ljca driver - unify prefix for structures and functions for gpio-ljca driver - update gpio-ljca, i2c-ljca and spi-ljca drivers according to usb-ljca's changes Wentong Wu (4): usb: Add support for Intel LJCA device i2c: Add support for Intel LJCA USB I2C driver spi: Add support for Intel LJCA USB SPI driver gpio: update Intel LJCA USB GPIO driver drivers/gpio/Kconfig | 4 +- drivers/gpio/gpio-ljca.c | 242 +++++++------ drivers/i2c/busses/Kconfig | 11 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-ljca.c | 353 ++++++++++++++++++ drivers/spi/Kconfig | 11 + drivers/spi/Makefile | 1 + drivers/spi/spi-ljca.c | 299 ++++++++++++++++ drivers/usb/misc/Kconfig | 14 + drivers/usb/misc/Makefile | 1 + drivers/usb/misc/usb-ljca.c | 817 ++++++++++++++++++++++++++++++++++++++++++ include/linux/usb/ljca.h | 113 ++++++ 12 files changed, 1764 insertions(+), 103 deletions(-) create mode 100644 drivers/i2c/busses/i2c-ljca.c create mode 100644 drivers/spi/spi-ljca.c create mode 100644 drivers/usb/misc/usb-ljca.c create mode 100644 include/linux/usb/ljca.h