Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp881611pxk; Thu, 3 Sep 2020 15:20:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYQIfb9ouH45VemiBw6+DCN+knrffIQeL3WrPIa/pBkgwzuYH/89ELa3CSq+0wsJqTWrvu X-Received: by 2002:aa7:ce19:: with SMTP id d25mr202219edv.189.1599171653393; Thu, 03 Sep 2020 15:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599171653; cv=none; d=google.com; s=arc-20160816; b=U++Y5TjJ9P/r/ubZKd8XB68WNV8k4PUSvfZ49YD4U3Kxlxws1SUG8PQQUmzOWcWuzf sIdJv/+1ptt8XSKK42xFglE3KvQx8OhtB+rA+ImbF+jjX5kA+5k+d1PTOgSdsIhLrRQe V4rUM6enC8lk3zGthQnGgqbnBEIc8Ra4Ji1QmOKYMG2C44R5ZPgctJRw53+8iJEMEJgu vFng4QKDq5EsIK5qD5+k9aqnAjvuBcoOB90R1AEaTUMs9LGLiT8e1SloCgKWqVOCQOd7 dMVI7HB+f7CQ3PWABh6j2Ora1vWaw/alA5C76DUpqN1nQU4npMTqMWgEqP4QOeqHpmwq rLLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=L6OYjrBWLMGkLZUDNUHAcsUTScuiU6WSVwlqzVd6Pzc=; b=sihZ5b3iFYnT8EcS026Jih9iqWp7/zEsSeT+EqTOEpBhbduKTqeyzVoMPHOXb5ELsV W97gZ49paE55aJ1liiG36XhTH2sS0+2GiMeNiXo1Qa8ReLi/SXLQqbdRpGBpMOl5nvEL XZGn8AZxVRY2qRn4B32HnQ8LAHYKVRg7evdCeeaRg1vBnYWij2GpHDi1R22g8g012obT 75gqsE//YDEAIU68moa+H5iqxN5wO6hZUBXOgnjkQ1wYQDmSCW52cZguUClBrhLtmdFd 5/RqR04M4Nc5M8gbTNXiEOLQ48CwtDWOa6AmE6FRpyLa/y687utgbY29TUi7UKiOR0aO 8ImQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TWyRrvJA; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ot12si188873ejb.692.2020.09.03.15.20.30; Thu, 03 Sep 2020 15:20:53 -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=@gmail.com header.s=20161025 header.b=TWyRrvJA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729037AbgICWSV (ORCPT + 99 others); Thu, 3 Sep 2020 18:18:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727065AbgICWST (ORCPT ); Thu, 3 Sep 2020 18:18:19 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54CAAC061244; Thu, 3 Sep 2020 15:18:19 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id v23so5661552ljd.1; Thu, 03 Sep 2020 15:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=L6OYjrBWLMGkLZUDNUHAcsUTScuiU6WSVwlqzVd6Pzc=; b=TWyRrvJAvb5keY81T6x3lfqcDecwPzWx87ybAGWLnxTvc0Rha1udM7jn+nGN8AbBoX /PPf1Jd2rpVcEBSnypYGZTUFD8BZoNRbJPQjnHXQphg4fL0cLyA3WB+SmZOB9DvHkH1s 2pje8dwelv9GhEcpHe/t1X6caFRA75du5buyYrB/0o6kdzGdyg4w05FVo3l6Af6iPKEl DkfCwypiyhMfHKUEq9OSDThzRqYH5aCTQ/nIloDqhLezdVbDD2dfIAAQiYGucHtFY0yl mbFNZUh7A9Fm9fL2eJrmeSyrp2mF3C22jcATK3HfQ+q/hx5dWhWRoWguSBy34/nG+rxO hRzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=L6OYjrBWLMGkLZUDNUHAcsUTScuiU6WSVwlqzVd6Pzc=; b=eFVaeUHOuvODiP4bKhjtTdaTPodYq24idoKW7mRYHI5kZKlFveu/HyU86OTq+cdGRd 6bG17rL8nXYQu0N6KhS+1jPYSqZaHFsnCr23+JH9Cn0jThJWOUnIpjV0ydGI0XBLaSpP /CElyTO0HtMe802Ahczhnmc2aE7Vt70sVj6Rhmy/4dbgGJMITbp4R9SjfSvguW77kQ8M dUGYx1U+JY+21BAy0I+EFfMdDgzRRuzqmW3OjoRKAZE8fqjMeaRdvdL2omXLb4CROGIt 77EfcfybIG3fajFg488X+StUnuSG094vcGmoWk2Nr1lCotcldiXE42jODS8D4fsayUYI WhwA== X-Gm-Message-State: AOAM531fE3P4v4xG5zsetOZQuBmSVjW/CkM4z9InhnwWAyPXCs7baNG+ TfqNABHvQ6sBo2ie345rw2nGt6piB/M= X-Received: by 2002:a2e:9d8e:: with SMTP id c14mr1019646ljj.135.1599171497517; Thu, 03 Sep 2020 15:18:17 -0700 (PDT) Received: from [192.168.2.145] (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.googlemail.com with ESMTPSA id c13sm855258lfi.76.2020.09.03.15.18.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Sep 2020 15:18:16 -0700 (PDT) Subject: Re: [PATCH v1 00/12] Improvements for Tegra I2C driver To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Wolfram Sang , linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200831202303.15391-1-digetx@gmail.com> <20200902212026.GD1624@qmqm.qmqm.pl> <04aae642-80f9-d22e-1d80-bb206bb27a8b@gmail.com> <20200903164709.GA7406@qmqm.qmqm.pl> From: Dmitry Osipenko Message-ID: Date: Fri, 4 Sep 2020 01:18:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200903164709.GA7406@qmqm.qmqm.pl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 03.09.2020 19:47, Michał Mirosław пишет: > On Thu, Sep 03, 2020 at 04:12:13AM +0300, Dmitry Osipenko wrote: >> 03.09.2020 00:20, Michał Mirosław пишет: >>> BTW, I wonder if you could expose i2c_in_atomic_xfer_mode() and use it >>> to differentiate atomic_xfer from normal and get rid of the internal >>> flag and .master_xfer_atomic callback. >> >> The atomic transfer uses 90% of the code path that a non-atomic transfer >> uses. I don't see how it could be exposed without duplicated lots of the >> code, unless I'm not missing what you're suggesting. > > The I2C core falls back to .master_xfer even in atomic mode if > .master_xfer_atomic is NULL, so what I'm suggesting is to make > i2c_in_atomic_xfer_mode() public (from i2c-core.h) and use it in > normal .master_xfer to choose atomic wait variants. Okay, I see now. But the I2C core prints a noisy warning if master_xfer_atomic is NULL in atomic transfer, so I'm not sure whether changing all that code will bring much benefits to us and anyone else. It's a bit too questionable change to me, but maybe I'm still missing something. Will be great if you could provide an example patch.