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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 353BAC7619A for ; Tue, 11 Apr 2023 10:59:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33EB985F7E; Tue, 11 Apr 2023 12:59:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1681210775; bh=uO9G11kf6F73VTad7wrpWJC0scWcy+FMCBrZsEd2zwQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=qDzbYZjycttp27b+/Q6etnMJGyMnFuI+HCezpDpZe7ypMyfxiE1u9F1zsoR/R/0JN j1D9jL/PJ787xZZVH4W+xoCYj3Y0/W1O+uRj6P3v1gEI7hjlnrWFAoXN2xR9RPdw5S wWyOQWelXph2dgp1PaqGMHcs9yCtYkBENdduGBRADNmZCkP4JgCwRkxIiVvG/iV+FQ ahb+fNInB+y7PeLr+2hgKbLZ0MxOeMDe6rFCgdX+Sw+kktI3xu2qnYz5Csirxxxpox 40tV1EvXmVwn1Vi5uV+hFwbqNyrXIZhPlZPl9hmg2r3ZeJdPTEOjM43O6C3/84x02N UJjzpWXsrvg9A== Received: from [192.168.1.107] (89-186-115-51.pool.digikabel.hu [89.186.115.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: hs@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 79D9385F22; Tue, 11 Apr 2023 12:59:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1681210753; bh=uO9G11kf6F73VTad7wrpWJC0scWcy+FMCBrZsEd2zwQ=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=k/hg48Z6LsbtmiO/fs0zViMzO93SIWY4uW1jNMyLBhbUry3M9BFDOaw5SEeF5lPad YoRFEfAi+z8H6ZvKMSi3UCVradyFfrUuZ+RAOiI3odzhDNuOvwgomi+Z5a4TwqFx3m 2G57PMdj8Ee2rbhjvs03jGiqzXuhAKxi1h4jUw4aJxSUGhhNry2domrCuF5pFGhiu/ TsCBseutpzGEgglGHF46NEyIaGfKgD5KHuRmhaERi9Xt6m+CPn+/dJKXKnMW5axS3j ZdSZKdv+R0JMUBcCRZ5vJ9sn0FV9r4NzXaCsqXUuMpkrZp5c+pSMuJ/yAzvkxbOU20 D2SS66XSqQgVw== Subject: Re: [PATCH v3] i2c: correct I2C deblock logic To: haibo.chen@nxp.com, al.kochet@gmail.com, patrick.delaunay@foss.st.com Cc: u-boot@lists.denx.de, uboot-imx@nxp.com References: <20230327112143.4029840-1-haibo.chen@nxp.com> From: Heiko Schocher Message-ID: Date: Tue, 11 Apr 2023 12:59:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20230327112143.4029840-1-haibo.chen@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: hs@denx.de Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Hello haibo, On 27.03.23 13:21, haibo.chen@nxp.com wrote: > From: Haibo Chen > > Current code use dm_gpio_get_value() to get SDA and SCL value, and the > value depends on whether DTS file config the GPIO_ACTIVE_LOW. In ususal > case for i2c GPIO, DTS need to set GPIO_ACTIVE_LOW for SCL/SDA pins. So > here the logic is not correct. > > And we must not use GPIOD_ACTIVE_LOW in client code include the > dm_gpio_set_dir_flags(), it is DTS's responsibility for this flag. So > remove GPIOD_ACTIVE_LOW here. > > Fixes: aa54192d4a87 ("dm: i2c: implement gpio-based I2C deblock") > Signed-off-by: Haibo Chen > --- > drivers/i2c/i2c-uclass.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied to u-boot-i2c.git master Thanks! bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de