From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AE051E501 for ; Tue, 23 May 2023 09:58:44 +0000 (UTC) Received: from smtpbguseast1.qq.com (smtpbguseast1.qq.com [54.204.34.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CC1E126 for ; Tue, 23 May 2023 02:58:38 -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> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FROM_EXCESS_BASE64, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net > > 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.