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 2F509C61DA3 for ; Fri, 24 Feb 2023 10:48:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229686AbjBXKs1 (ORCPT ); Fri, 24 Feb 2023 05:48:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229622AbjBXKsX (ORCPT ); Fri, 24 Feb 2023 05:48:23 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4576B13D49 for ; Fri, 24 Feb 2023 02:48:22 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id r7so13299037wrz.6 for ; Fri, 24 Feb 2023 02:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HR0UWQKqPA3ewcsqzjhlOUtNlnfP6392kIgsSTEs7d8=; b=mFDonIVCSZ0rdWjYufm4eMvD1LnS53ToUl9EKyG7g8JO+Rw3SGGn2yjcH2XfVaI4jd XzYd933WnqWkKbOdDS9KEv4CdiagfLwwrTWFvUemRchLFrPChk2lmOAUY2VhL1HdsCrG iyBVb2K6+rbHWzjs0OjUtW2I84AZoHuiLNFxCVtCTJT77XWJPqsuv1GQeZpyPpp6Iy15 l4MxJO+qfAmeD2MrXBiFD0dE0PejaR2H1f2M1GvTZ3+FqENUgZji00S4Se19dBrE4lYI DTkPhWeqLQAaaHHt0l1em42bfTMhEHBDeoAFM6vzL2aupPc8clHQmmJjWYSJ9asXu3ZY FMqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HR0UWQKqPA3ewcsqzjhlOUtNlnfP6392kIgsSTEs7d8=; b=WHuvuLvDAScnsCO9JAshl+I1SrHc1I+bC+oBbp8OXxq/4P+fQVzSmQqX1L2mMnVvJT IL2xGBuTYfRwxc+cEk+trlPXpu1N3JwQd/S05KqOVLK+XibozMrF9gtCVxsQScpkIwCR JPlpTBUt1fN0DghkanX5/Gyr7y2/NUQCtIMdf1GmmgR7fIc4jT+BWRy/vbf5J1VZj4YT d+WcaPv7+rDeituGVa0UjgLRWcOkY/iXnv7Ac1mW1ZHTJRo5QitpjR3eJ+C6/Bjb2VKP fpwOo51VLEWNwI5iXvPg6HlbJVoW2Vul4KjtH4kJan6cBjBJjJqE8I5Hzsx2HTLOQqGc s9Rw== X-Gm-Message-State: AO0yUKWlHPdN4/ax6BO44q8WFk4mZL8ArQGSyONdkPYS11W9iR999k+a oSIPB5qm0c2MaePCW7Ai7uCNYy34/Vi8VmYIdajv/VOu5gwk2u2c X-Google-Smtp-Source: AK7set+t2ZMXxJdkymq/f433ab9d1M38NcOpbgsjxwuHP9yBszDXCzcxLzuD8X8eMuxSDUIbKIbUnFuGPUkJsIOSTvs= X-Received: by 2002:a5d:59a9:0:b0:2c7:e48:8ca4 with SMTP id p9-20020a5d59a9000000b002c70e488ca4mr1099157wrr.2.1677235700730; Fri, 24 Feb 2023 02:48:20 -0800 (PST) MIME-Version: 1.0 References: <20230219183059.1029525-1-xiang.ye@intel.com> <20230219183059.1029525-3-xiang.ye@intel.com> In-Reply-To: <20230219183059.1029525-3-xiang.ye@intel.com> From: Linus Walleij Date: Fri, 24 Feb 2023 11:48:08 +0100 Message-ID: Subject: Re: [PATCH 2/5] gpio: Add support for Intel LJCA USB GPIO driver To: Ye Xiang Cc: Lee Jones , Wolfram Sang , Tyrone Ting , Mark Brown , Bartosz Golaszewski , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ye, thanks for your patch! I think your colleague Andy Shevchenko will provide the most detailed and deep feedback, but here are some things I spotted immediately: On Sun, Feb 19, 2023 at 7:31 PM Ye Xiang wrote: > This patch implements the GPIO function of Intel USB-I2C/GPIO/SPI adapter > device named "La Jolla Cove Adapter" (LJCA). It communicate with LJCA > GPIO module with specific protocol through interfaces exported by LJCA USB > driver. > > Signed-off-by: Ye Xiang (...) > +config GPIO_LJCA > + tristate "INTEL La Jolla Cove Adapter GPIO support" > + depends on MFD_LJCA I would add default MFD_LJCA so if you activate the MFD you get this subdriver by default as module or built-in depending on what the MFD is built as. (Same goes for the other subdrivers I guess) In addition you need: select GPIOLIB_IRQCHIP since you use this facility. > +static struct irq_chip ljca_gpio_irqchip = { static const ... > + .name = "ljca-irq", > + .irq_mask = ljca_irq_mask, > + .irq_unmask = ljca_irq_unmask, > + .irq_set_type = ljca_irq_set_type, > + .irq_bus_lock = ljca_irq_bus_lock, > + .irq_bus_sync_unlock = ljca_irq_bus_unlock, > + .flags = IRQCHIP_IMMUTABLE, > + GPIOCHIP_IRQ_RESOURCE_HELPERS, > +}; Yours, Linus Walleij