Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp481130pxk; Thu, 17 Sep 2020 08:06:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVIGA0RM3p6dkh1pI2YCK2nKGclDkjm2uhWKuL4FtoAtlG7OXCRxKbEBhxIDnlvAhTpZRH X-Received: by 2002:a17:906:3552:: with SMTP id s18mr30845389eja.23.1600355206798; Thu, 17 Sep 2020 08:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600355206; cv=none; d=google.com; s=arc-20160816; b=NNvxvUL6i0xM5E29ObYdp4gkWf82BdoYv8o+h7AHIcVcp7/7hjb3ZIeFNQO1DzNBUK vo6mnc1sYv882uwfgWzwdgULXXAqmqabEu/rt1NjyAlsY93VOCnUiaJMxxhDvwbL9xqO ZxGOaauwFCr9VrJD6YY8QAu7e86MftH3VUUnejU1sGZ/Miwi0tijfAqQzLdyICzoGP4w zgWhqatvS6QllYBuU5VATJWpwi5eWU2OoEE2iGLP1dE8UfSUKDljXNgkG+CugeGN+Na0 VXDPkm+xaznV0m3HVSLWrJswazZT9IcWzEf8MJ28/yPrQcCERx3e6S/W/RrsV3gJaWiN R9EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=fNGJcc/2UfIVs8mbBxVK/VFNj4D7nz0HCrf2fMGXSIw=; b=wecn+cCPV9uNqmHGy9c15Uo+4moG2r6/7JyJ43nTzMUqadsIhbB1mmmVEl9Sr7BtfD 6ts4v0NOMKxGDsUQE6us7mcKTzHcoHVtfirMBPC5a3intuz1llRmCc0xF1fV3uxGEXDY 0tUjT8EKJBkmQkQ8+tI+Stj46EOg+iP0kZMJlVAA/XHHrh36O0d7QyZySeqmnZR1v1Ia uZvfvYLfRlHFNY1ONzpdt1+JAD0NCPNijkYHDllnu1CHEvT2uJ12nvtexK/qfnlebbHi t1lFwoAmLBJpFpsOImUYJSSonJ6YjNmOYqWwQTJuTktSBj7rLBnbKKMF3KcGzzhK2dAc 0TKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c3yPYEzc; 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 18si17284381edv.184.2020.09.17.08.06.21; Thu, 17 Sep 2020 08:06:46 -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=c3yPYEzc; 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 S1727775AbgIQPE6 (ORCPT + 99 others); Thu, 17 Sep 2020 11:04:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbgIQPCc (ORCPT ); Thu, 17 Sep 2020 11:02:32 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B405AC06174A; Thu, 17 Sep 2020 08:02:29 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id q8so2535206lfb.6; Thu, 17 Sep 2020 08:02:29 -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=fNGJcc/2UfIVs8mbBxVK/VFNj4D7nz0HCrf2fMGXSIw=; b=c3yPYEzcgE6WEkQG/+eUuv7eyZ/zXffo7yYj9Q3BHrRpxwV016wGSF2beNFXZxQKm9 W9bm8ywz3D898Gb/qSQcfQJsGymz6/8L/63GPOphIF8LfGxnTSA8+/OsIfv2JnZE6KtB xABo8aFMyjY+SLsU/+kBPZtg6IwE/sh7T/VvvgmvKuJ5VUHfaX2GGqhRKFyvKn63f5wc YM6G7RhjEqEWFhG43M/31EZ3rDgGiMvXy6tQ+UQpVW8d5E8y4HN02D4b0tWP+xNiFBMg +c7alrqp7eusvWL2nSeH/BVy+lUbrYRH+aFIhvwV4VJisf2WLwoVdFBq0SizOaNzYT80 gOJw== 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=fNGJcc/2UfIVs8mbBxVK/VFNj4D7nz0HCrf2fMGXSIw=; b=n3fbnga0a1W9IOPSegFoKglfu/07Dqog1UvrtJbk8FnV/35gOgR7pGqK0qfmbz77E3 TeUM84Ou5OEYZ65pU0IwgRZRbD01eKhue9bsGrJ3nxr4kklA064pDlUf/d0PcvwO7s+a BS2GkKcRoWiJTy+4X8Dn1bTp44ywm3lYDwUQSS97UC0k1iWUGFILA8T6rAyxYQGbjurv WRGeL5WJV0E9aUtukyXlAN35WqG9PAeoVA/pZBoVTZoOo86eYXFe5tEZ5nljsTCO/hrj a0gbYO9yBDz4KX2JXF6cFKbQ3hNHiF6p7axd38VZRv4Zcys4su0Fz4kdBFNb0TyeEO57 TldQ== X-Gm-Message-State: AOAM532uvX8ziDkP44JBVzIecEKpf1smTnzyFhMjvs6BHwemb8CKTp4X d9FbPR4Ksnnhtsj+td5lZtZ3iWZjx7M= X-Received: by 2002:a19:50d:: with SMTP id 13mr8435113lff.500.1600354948063; Thu, 17 Sep 2020 08:02:28 -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 s14sm6177917ljh.98.2020.09.17.08.02.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Sep 2020 08:02:27 -0700 (PDT) Subject: Re: [PATCH v7 14/34] i2c: tegra: Clean up probe function To: Thierry Reding Cc: Jonathan Hunter , Laxman Dewangan , Wolfram Sang , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200908224006.25636-1-digetx@gmail.com> <20200908224006.25636-15-digetx@gmail.com> <20200917123755.GO3515672@ulmo> From: Dmitry Osipenko Message-ID: <7d2803c3-b25e-da62-5e55-fca8e550fcda@gmail.com> Date: Thu, 17 Sep 2020 18:02:26 +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: <20200917123755.GO3515672@ulmo> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 17.09.2020 15:37, Thierry Reding пишет: ... >> + /* interrupt will be enabled during of transfer time */ >> + irq_set_status_flags(i2c_dev->irq, IRQ_NOAUTOEN); ^^^^^^^^^^^^ >> + ret = devm_request_irq(&pdev->dev, i2c_dev->irq, tegra_i2c_isr, >> + IRQF_NO_SUSPEND, dev_name(&pdev->dev), >> + i2c_dev); >> + if (ret) >> + return ret; > > Is it safe to install the interrupt handler at this point? What if, > perhaps because some bootloader didn't properly quiesce the I2C > controller, an interrupt triggers immediately after this? This is why we're using the IRQ_NOAUTOEN flag above :)