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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 126B0C4320E for ; Thu, 12 Aug 2021 13:37:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E197B61059 for ; Thu, 12 Aug 2021 13:37:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237585AbhHLNh0 (ORCPT ); Thu, 12 Aug 2021 09:37:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233260AbhHLNhZ (ORCPT ); Thu, 12 Aug 2021 09:37:25 -0400 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 342B6C061756; Thu, 12 Aug 2021 06:36:59 -0700 (PDT) Received: by mail-ot1-x331.google.com with SMTP id e13-20020a9d63cd0000b02904fa42f9d275so7772324otl.1; Thu, 12 Aug 2021 06:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:reply-to:references :mime-version:content-disposition:in-reply-to; bh=lxEYcLoSmKcwAqq6lEWUTNh1J0BSQ5RJ+tPc70kIvv8=; b=N+l05ozxyD1NG1dkZUngFULf3v7jhRSbnR3bHLqfiz9dby07s+mONwlfvcPK0q4TpC 7TiWQGQOBdoF1zE3c/2Gu2F+K4pOTl/yJy7prAkKAgeKH9paMe+57QeOsB1Sw8iBuDgf Bg7Lnbtyiqb+chBrZwjK1IQMznYfVvO7//56Eb19UoWrGfVEesfIKpwXICsLwFDGNkOT LBXWVs6EteP/0VimsFRXf7DXL7R4RVLFWiIewc/ERmTBNu76kb7rS5cQ+lxfBSfozlXq mhnZAoTGxU5l0sh9IM0Vh4vNMDkUmbcaFnAZsSxbEemP4+e0WlFJJyZTB9PmygkiPE6E BNLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to; bh=lxEYcLoSmKcwAqq6lEWUTNh1J0BSQ5RJ+tPc70kIvv8=; b=c2GMvXlR+NPe0arf2wBqdbfN0p7Si6KcNaI+n1eDYLTdNvqL1oeDsco3CHgNczU3WJ awkIfBhxsWNbwYnOVG/UBPtCGN8vKweyaekKcfN9zsqRMwtk26GNzTSXdLwkseBDBG6v bgr4tx4ZQPckfoY5hM17+e4jFYgwEDuj8FOGLhhqbqC4bGV1K13dtQzny/Su0kooTaEY 4sODyt8M+M8WEmrxTN2Z95nV+cKFtgq2GyRPGDt26WPnJzNYrLgvZSEKCsY536cq3vK6 PBnEOwqstZ7BOMt4YhbZXr/lLU30RAILK2wYZT+8m39WX0ogIQ230N87ITDqoRaGRjL3 gmXQ== X-Gm-Message-State: AOAM531yKqupX1IKQFco+95/3UgygzzPQNIm69NFNRDceAak+vW5+XGI wYohEarxv35iOs1matKFjA== X-Google-Smtp-Source: ABdhPJwSEJIsmvBs2Ju7id/07iwZC6CGzdrHno0A3fxPpp0tLpTJfwR7oTj/F4lF6MngczX5vwnTPg== X-Received: by 2002:a05:6830:90f:: with SMTP id v15mr3478948ott.202.1628775418413; Thu, 12 Aug 2021 06:36:58 -0700 (PDT) Received: from serve.minyard.net ([47.184.156.158]) by smtp.gmail.com with ESMTPSA id r16sm605716otu.26.2021.08.12.06.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Aug 2021 06:36:57 -0700 (PDT) Sender: Corey Minyard Received: from minyard.net (unknown [IPv6:2001:470:b8f6:1b:39aa:3f67:e568:698d]) by serve.minyard.net (Postfix) with ESMTPSA id 4F1F1180058; Thu, 12 Aug 2021 13:36:56 +0000 (UTC) Date: Thu, 12 Aug 2021 08:36:55 -0500 From: Corey Minyard To: Wolfram Sang , Quan Nguyen , Rob Herring , Joel Stanley , Andrew Jeffery , Brendan Higgins , Benjamin Herrenschmidt , openipmi-developer@lists.sourceforge.net, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Open Source Submission , Phong Vo , "Thang Q . Nguyen" Subject: Re: [Openipmi-developer] [PATCH v5 1/3] i2c: aspeed: Add slave_enable() to toggle slave mode Message-ID: <20210812133655.GT3406@minyard.net> Reply-To: minyard@acm.org References: <20210714033833.11640-1-quan@os.amperecomputing.com> <20210714033833.11640-2-quan@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 12, 2021 at 09:39:43AM +0200, Wolfram Sang wrote: > Hi all, > > On Wed, Jul 14, 2021 at 10:38:31AM +0700, Quan Nguyen wrote: > > Slave needs time to prepare the response data before Master could > > enquiry via read transaction. However, there is no mechanism for > > i2c-aspeed Slave to notify Master that it needs more time to process > > and this make Master side to time out when trying to get the response. > > > > This commit introduces the slave_enable() callback in struct > > i2c_algorithm for Slave to temporary stop the Slave mode while working > > on the response and re-enable the Slave when response data ready. > > Sorry that I couldn't chime in earlier, but NAK! > > > include/linux/i2c.h | 2 ++ > > @Corey: Please do not change this file without my ACK. It is not a > trivial change but an API extenstion and that should really be acked by > the subsystem maintainer, in this case me. I was really surprised to see > this in linux-next already. I am sorry, I'll pull it out. -corey > > @all: Plus, I neither like the API (because it doesn't look generic to > me but mostly handling one issue needed here) nor do I fully understand > the use case. Normally, when a read is requested and the backend needs > time to deliver the data, the hardware should stretch the SCL clock > until some data register is finally written to. If it doesn't do it for > whatever reason, this is a quirky hardware in my book and needs handling > in the driver only. So, what is special with this HW? Can't we solve it > differently? > > All the best, > > Wolfram > > _______________________________________________ > Openipmi-developer mailing list > Openipmi-developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openipmi-developer 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 X-Spam-Level: X-Spam-Status: No, score=-9.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 974FCC4338F for ; Thu, 12 Aug 2021 13:39:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 521D3604AC for ; Thu, 12 Aug 2021 13:39:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 521D3604AC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version: References:Message-ID:Subject:To:From:Date:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=05/jJgJzKlp8Al2jSn0G2gmTCnghO4mTJNl3BXsQkUo=; b=RkeI9TDbKCwTCC uPpi6COgEv0ovr76QZWoCI3xsmf+S0guqoM3+cicRqaVQcKqPklCVDsS5MV8iKHSmYeRDuRJZl+e+ jlQCIVvosCeT+rsyK5KLT77brd6UFQrTmg3E7Fn9AbEVO6ACiclWts8Ctdu8ukPWn+yYuiqponDvZ cnBgS7LrrSQeOX96Vm50C1/RPry46VQHfmcQYj9vMkgAEWHEGHrxGGWeWNw/w6Hjh894ryoy+/MuN +XRxoLILF50kGe8aTW2JQz60NG+y7jO5xoLkINM0EZAQYGe4hPBQgyLt0skTA+BsNI002LOY0JvrB 28RqZJYQ6wQFFiM/JZEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mEAtN-00AGDO-2M; Thu, 12 Aug 2021 13:37:05 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mEAtI-00AGBg-JE for linux-arm-kernel@lists.infradead.org; Thu, 12 Aug 2021 13:37:02 +0000 Received: by mail-ot1-x32e.google.com with SMTP id 61-20020a9d0d430000b02903eabfc221a9so7823164oti.0 for ; Thu, 12 Aug 2021 06:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:reply-to:references :mime-version:content-disposition:in-reply-to; bh=lxEYcLoSmKcwAqq6lEWUTNh1J0BSQ5RJ+tPc70kIvv8=; b=N+l05ozxyD1NG1dkZUngFULf3v7jhRSbnR3bHLqfiz9dby07s+mONwlfvcPK0q4TpC 7TiWQGQOBdoF1zE3c/2Gu2F+K4pOTl/yJy7prAkKAgeKH9paMe+57QeOsB1Sw8iBuDgf Bg7Lnbtyiqb+chBrZwjK1IQMznYfVvO7//56Eb19UoWrGfVEesfIKpwXICsLwFDGNkOT LBXWVs6EteP/0VimsFRXf7DXL7R4RVLFWiIewc/ERmTBNu76kb7rS5cQ+lxfBSfozlXq mhnZAoTGxU5l0sh9IM0Vh4vNMDkUmbcaFnAZsSxbEemP4+e0WlFJJyZTB9PmygkiPE6E BNLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to; bh=lxEYcLoSmKcwAqq6lEWUTNh1J0BSQ5RJ+tPc70kIvv8=; b=tTjM1roMSCVYfcruR2/kTpKRgHMl3hNL2Dt/SvV5QyzD17TAL4KK2atj7coPC3y3il 5NAW8NNoEw7AxCG7edpsOmCGffbBl6YOq80VWYJx25wrvQvU/l7WasQOraZaPhd+ye96 8sGyymaiNKyWJQGfnJk5dEGp7ZZGoYD7eaEPLzeVaNOplvpKWTKWIcrXxkzXQBs579qz IpOdvsQAp5fwZOTbgkKvGjQBwp1q/yOgAL5VQJn+I108UfWKs+ZpxNH2RaRZXLYi58+L qFm0kpZiSkcVJd/TsU/vcb8P0vQNU08Fg29eLoIF9k5n7OoYD1aPQbzhA2oONYEpkLKD T51g== X-Gm-Message-State: AOAM532wL9om+6ybTFiydsnky3tZ/IM+lu7P/Is8goUMMc3JWxgOjJX6 DYhPE2CKLrfgciftVdaL1Q== X-Google-Smtp-Source: ABdhPJwSEJIsmvBs2Ju7id/07iwZC6CGzdrHno0A3fxPpp0tLpTJfwR7oTj/F4lF6MngczX5vwnTPg== X-Received: by 2002:a05:6830:90f:: with SMTP id v15mr3478948ott.202.1628775418413; Thu, 12 Aug 2021 06:36:58 -0700 (PDT) Received: from serve.minyard.net ([47.184.156.158]) by smtp.gmail.com with ESMTPSA id r16sm605716otu.26.2021.08.12.06.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Aug 2021 06:36:57 -0700 (PDT) Received: from minyard.net (unknown [IPv6:2001:470:b8f6:1b:39aa:3f67:e568:698d]) by serve.minyard.net (Postfix) with ESMTPSA id 4F1F1180058; Thu, 12 Aug 2021 13:36:56 +0000 (UTC) Date: Thu, 12 Aug 2021 08:36:55 -0500 From: Corey Minyard To: Wolfram Sang , Quan Nguyen , Rob Herring , Joel Stanley , Andrew Jeffery , Brendan Higgins , Benjamin Herrenschmidt , openipmi-developer@lists.sourceforge.net, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Open Source Submission , Phong Vo , "Thang Q . Nguyen" Subject: Re: [Openipmi-developer] [PATCH v5 1/3] i2c: aspeed: Add slave_enable() to toggle slave mode Message-ID: <20210812133655.GT3406@minyard.net> References: <20210714033833.11640-1-quan@os.amperecomputing.com> <20210714033833.11640-2-quan@os.amperecomputing.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210812_063700_737331_38CE3E7A X-CRM114-Status: GOOD ( 28.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: minyard@acm.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 12, 2021 at 09:39:43AM +0200, Wolfram Sang wrote: > Hi all, > > On Wed, Jul 14, 2021 at 10:38:31AM +0700, Quan Nguyen wrote: > > Slave needs time to prepare the response data before Master could > > enquiry via read transaction. However, there is no mechanism for > > i2c-aspeed Slave to notify Master that it needs more time to process > > and this make Master side to time out when trying to get the response. > > > > This commit introduces the slave_enable() callback in struct > > i2c_algorithm for Slave to temporary stop the Slave mode while working > > on the response and re-enable the Slave when response data ready. > > Sorry that I couldn't chime in earlier, but NAK! > > > include/linux/i2c.h | 2 ++ > > @Corey: Please do not change this file without my ACK. It is not a > trivial change but an API extenstion and that should really be acked by > the subsystem maintainer, in this case me. I was really surprised to see > this in linux-next already. I am sorry, I'll pull it out. -corey > > @all: Plus, I neither like the API (because it doesn't look generic to > me but mostly handling one issue needed here) nor do I fully understand > the use case. Normally, when a read is requested and the backend needs > time to deliver the data, the hardware should stretch the SCL clock > until some data register is finally written to. If it doesn't do it for > whatever reason, this is a quirky hardware in my book and needs handling > in the driver only. So, what is special with this HW? Can't we solve it > differently? > > All the best, > > Wolfram > > _______________________________________________ > Openipmi-developer mailing list > Openipmi-developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openipmi-developer _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel