Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp547109pxf; Wed, 17 Mar 2021 10:13:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMnNxn+LuXLeeIZz3Xm87EKeIU7nQrOsSGx/geiHMCV0UeNeAHj9TtGTaKHWmPMm3GN4wv X-Received: by 2002:aa7:c0c7:: with SMTP id j7mr43206083edp.298.1616001180941; Wed, 17 Mar 2021 10:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616001180; cv=none; d=google.com; s=arc-20160816; b=kYf9jCB5A8+gdcvvvglB6DWrhIlnxfZSsjdnFrwgGhGlWyZExWDU3yFdIl0ckUtGTa P7X1AUA8KNLSznTCWC0kH5p2PwWDf5FMJa8MRfpPpcuDHpudpLQf3Ov2yNpQSG97crbc 6qcBreulU9O2Xry9nCkrpgQ2ZWD5mkR0Z92aUdccxCSLbTs2IMzCSLXj5oIqCu7hdE1D r1dvnQEzkTwS2YzKQxBamiQACOc9m1t1Jirx5cy1xbkKJ07Sjw0hn74Y50lQbO9ZkxiQ ejx6Pg/nHGeg6SoOskPuwRSHGDp/Z7RE4WYytRW0cD0l3plc4oDRv6jleWAHa4Mpsep+ jlLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ThARaZxD/3OUnNU9/bYmje+4H9d2E7bxAU0v//8RdlA=; b=k8IKD0SUizWrKjyLC/TOtzzQx20SrAJvb6VrdPusdh8X/8y8Uky5de+GM5zZSREsUb k3Y6UVZo/LP1qidI+SOsy97RMPD/MRiOP522zV0rxqob+kfdFpk/ynUof3DsGYQkwMj7 sVAoz4Ax2OKaRuSZHrJxhjYpoc9YXM3oPBlB/vaMYuQ4wLTPbF23BXaUVFcotw1C41q0 bVGHAq6OwR09NhI/ORh37+G1QQOLiFIfcIZwUyDlkKyFs7U7UPIqhUI0sTRxuJQselKf 96GKfGAx7COcVMDin5mONJuUsqnipdmpEJk6wb5ULafKJpc1Y9l0vZ7kp0NFaLUccvCf bcsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VHo15d9g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x21si17509653ejb.180.2021.03.17.10.12.37; Wed, 17 Mar 2021 10:13:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VHo15d9g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbhCQNnj (ORCPT + 99 others); Wed, 17 Mar 2021 09:43:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231343AbhCQNna (ORCPT ); Wed, 17 Mar 2021 09:43:30 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9D09C06174A for ; Wed, 17 Mar 2021 06:43:29 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id mj10so2691593ejb.5 for ; Wed, 17 Mar 2021 06:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ThARaZxD/3OUnNU9/bYmje+4H9d2E7bxAU0v//8RdlA=; b=VHo15d9gUnmvgPpklPTuqS4GOQ+mxM3D2rkQF784vK8jMzoXBvZut2ktwlPQqOgdaW uYWs5OKunxNbAS3YHQvwe0/8a7ffcs2nmHt6wtQr9QR6Z4LBT4YIE7mOBy6wLm2vfMCH +jD0E9qZiSvHZGRS1nojdtf71WEKJQ3+c2FYdGCX1++PzFujPlHcghtKQdCsBzM2FNbf KMRTOjldsuFOQ8I6loQEUbNHinC1+UOKjZheQS2Ej5VgqezUgcwiVksxB4tn3fh6mOBU lTUoVxrr8BdRCvNOi1DE52exCzDvKGu5Skqd6DGw3ebVZrtZylmL7kywCoirFMzKeNP6 c2+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ThARaZxD/3OUnNU9/bYmje+4H9d2E7bxAU0v//8RdlA=; b=BzT/Vp1dDIIfGKPhvxdcV5kqKKhajd+aeCXtKm+ft7T8qK/F12ktPNkDKK+CMjynCG c6Z9kMsgQZuYXv0ealL4G7f0GEZ+GV+DUe5yZ9angSduu7Ai9VN5ani9xphMc3U613Md 3OG40dXnfi1FTeGoqLNoj4gASZgkG+WhVRAdqUXkg5y8jHGtB7bHxvyA0HWe+iN5AAek n9TZX+4EJJLQlJtASudaRaxTAv6s/O5gRV6llQH4qI1qHh/4LI8rfgeZFX+YSmuJJBcw 8RDmr9Bh0NX43XbMJL6llZfVRVAcDAa8dYqzV0JucpuSekdghYXkyL/et+BYXDNglaZy o5fw== X-Gm-Message-State: AOAM532D9+2KdpljFi6dKRt89tn1UPSISbVRDVyGzum26ZydND1slk+m bgZadsF42Dlx7HoimdkjZfQHIg== X-Received: by 2002:a17:907:76ed:: with SMTP id kg13mr33664258ejc.99.1615988608375; Wed, 17 Mar 2021 06:43:28 -0700 (PDT) Received: from dell ([91.110.221.194]) by smtp.gmail.com with ESMTPSA id u15sm13011965eds.6.2021.03.17.06.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 06:43:27 -0700 (PDT) Date: Wed, 17 Mar 2021 13:43:26 +0000 From: Lee Jones To: "Jonas Mark (BT-FIR/ENG1-Grb)" Cc: "Adam.Thomson.Opensource@diasemi.com" , Wolfram Sang , Support Opensource , "linux-kernel@vger.kernel.org" , "linux-i2c@vger.kernel.org" , "stwiss.opensource@diasemi.com" , "marek.vasut@gmail.com" , "RUAN Tingquan (BT-FIR/ENG1-Zhu)" , "Streidl Hubert (BT-FIR/ENG1-Grb)" Subject: Re: [PATCH v6 1/1] mfd: da9063: Support SMBus and I2C mode Message-ID: <20210317134326.GA2916463@dell> References: <20210316162237.877436-1-mark.jonas@de.bosch.com> <20210316170722.GF701493@dell> <9d64829d35474258a53b6785c0265e1c@de.bosch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9d64829d35474258a53b6785c0265e1c@de.bosch.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Mar 2021, Jonas Mark (BT-FIR/ENG1-Grb) wrote: > Hi, > > > > From: Hubert Streidl > > > > > > By default the PMIC DA9063 2-wire interface is SMBus compliant. This > > > means the PMIC will automatically reset the interface when the clock > > > signal ceases for more than the SMBus timeout of 35 ms. > > > > > > If the I2C driver / device is not capable of creating atomic I2C > > > transactions, a context change can cause a ceasing of the clock signal. > > > This can happen if for example a real-time thread is scheduled. Then > > > the DA9063 in SMBus mode will reset the 2-wire interface. Subsequently > > > a write message could end up in the wrong register. This could cause > > > unpredictable system behavior. > > > > > > The DA9063 PMIC also supports an I2C compliant mode for the 2-wire > > > interface. This mode does not reset the interface when the clock > > > signal ceases. Thus the problem depicted above does not occur. > > > > > > This patch tests for the bus functionality "I2C_FUNC_I2C". It can > > > reasonably be assumed that the bus cannot obey SMBus timings if this > > > functionality is set. SMBus commands most probably are emulated in > > > this case which is prone to the latency issue described above. > > > > > > This patch enables the I2C bus mode if I2C_FUNC_I2C is set or > > > otherwise keeps the default SMBus mode. > > > > > > Signed-off-by: Hubert Streidl > > > Signed-off-by: Mark Jonas > > > > Applied with Wolfram's RB, thanks. > > Thank you very much for your support to all reviewers. Any time. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog