From mboxrd@z Thu Jan 1 00:00:00 1970 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 DF89CC7EE23 for ; Tue, 23 May 2023 09:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236156AbjEWJ5T (ORCPT ); Tue, 23 May 2023 05:57:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232871AbjEWJ5T (ORCPT ); Tue, 23 May 2023 05:57:19 -0400 Received: from smtpbguseast1.qq.com (smtpbguseast1.qq.com [54.204.34.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42F4994; Tue, 23 May 2023 02:57:15 -0700 (PDT) X-QQ-mid: Yeas53t1684835737t119t40423 Received: from 3DB253DBDE8942B29385B9DFB0B7E889 (jiawenwu@trustnetic.com [122.235.247.1]) X-QQ-SSF: 00400000000000F0FOF000000000000 From: =?utf-8?b?Smlhd2VuIFd1?= X-BIZMAIL-ID: 9278564770504003863 To: "'Andy Shevchenko'" , "'Michael Walle'" , "'Andrew Lunn'" Cc: , , , , , , , , , , References: <20230515063200.301026-1-jiawenwu@trustnetic.com> <20230515063200.301026-7-jiawenwu@trustnetic.com> <00cd01d9879f$8e444950$aaccdbf0$@trustnetic.com> <016701d9886a$f9b415a0$ed1c40e0$@trustnetic.com> <90ef7fb8-feac-4288-98e9-6e67cd38cdf1@lunn.ch> <025b01d9897e$d8894660$899bd320$@trustnetic.com> In-Reply-To: Subject: RE: [PATCH net-next v8 6/9] net: txgbe: Support GPIO to SFP socket Date: Tue, 23 May 2023 17:55:36 +0800 Message-ID: <013101d98d5c$b8fdd1d0$2af97570$@trustnetic.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHvj8QD3pC+6Aq9H9h6P1+q5LrHRgMH5FTyAkITzAABJU2Y7wJ7xjhgAYjDQqsBr+FHUgDJ87o1AqWHfXWuvsiisA== Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org > > Anyway it is a bit complicated, could I use this version of GPIO implementation if > > it's really tough? > > It's possible but from GPIO subsystem point of view it's discouraged > as long as there is no technical impediment to go the regmap way. After these days of trying, I guess there are still some bugs on gpio - regmap - irq. It looks like an compatibility issue with gpio_irq_chip and regmap_irq_chip (My rough fixes seems to work). Other than that, it seems to be no way to add interrupt trigger in regmap_irq_thread(), to solve the both-edge problem for my hardware. I'd be willing to use gpio-regmap if above issues worked out, I learned IRQ controller, IRQ domain, etc. , after all. But if not, I'd like to implement GPIO in the original way, it was tested to work. May I? Thanks for all your suggestions.