Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2430413pxu; Mon, 7 Dec 2020 06:30:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbsZKiOCjDt68qcB00ZY4bl8/zLuYMLvFvgoetw1o6WiXu48cPe4/llva5SWzNy4DpKVzl X-Received: by 2002:a17:906:a011:: with SMTP id p17mr9711223ejy.30.1607351428236; Mon, 07 Dec 2020 06:30:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607351428; cv=none; d=google.com; s=arc-20160816; b=OotYeslDK2lRnps1qFtIN2+2l/ZMFaUjWaTLKfoiKuLGCvhfOPpecCLhC7vaL7F8hO Z+a9sthZJFOcaIyG0KWBj8wGPMsavGX15cNmjf9K1jbWFqWe5XqRnv4hA26iwAi0KFe9 RL43Hl7fLFPqFe5YFd62LBUbGqWICOymYy1nLftOyXQy7cjoE7Cm1sg9mavy5U79Llgg h7GKnML+j7cSP+1As7soI8ONYGdLd1IB9IcV7kSi7Qp+ZrTtPx/x3BWmDCjOpCR7knKa MPXzgjZUdqwVm28IiAJaeBYqgaNslPckWspEk7I/M7Zj7Tr1Bl3e/9LWLlvSzg8lzbe4 L/dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1B4ipYgOhPfv+d9TPnP1fvw4sKD2zjUHJ0ZUz1kJsk4=; b=YyZ+OHMM2UZyZWvu39fg07H3PICVFoqnXvvxfT3Z/yGLRSHVSKpjOrZxTwGDPmvazW 3Fm3iI2Ia+yZQGukbHN4oCpY58APru0La+PXm0u0hiKZ3OepZKbGb7R3iHRHjwNghUix N3RaFJxL8K2DrBl3PND5V9f4bS/xEpxyw00NxKKX65LhkxlfkWMFlyx2x+6gtGRDf1dW 4H0QzcP5iNevd4gwi24RjBiOOP6xSwypKm15CJ46npwo0Tk27f637+erStkL7rpzVysz oUgeiGsC7SxFJExh7eZ4cCC126OuEUwMquNVHu22Ik7uljZMAKmMAgljnyzWRkm+uOSt eSpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nHDJ6961; 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 d8si6463472ejw.38.2020.12.07.06.30.04; Mon, 07 Dec 2020 06:30:28 -0800 (PST) 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=nHDJ6961; 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 S1726636AbgLGO1P (ORCPT + 99 others); Mon, 7 Dec 2020 09:27:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbgLGO1O (ORCPT ); Mon, 7 Dec 2020 09:27:14 -0500 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 0AC83C0613D0; Mon, 7 Dec 2020 06:26:34 -0800 (PST) Received: by mail-lj1-x241.google.com with SMTP id x23so8123372lji.7; Mon, 07 Dec 2020 06:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1B4ipYgOhPfv+d9TPnP1fvw4sKD2zjUHJ0ZUz1kJsk4=; b=nHDJ6961kd4vzacwTGOMER8fNFWyBeL2p/kPlIIggbsazO+mT0b7hWs1PMrf2Pyu7R 5+1a6HO2FDGcy8/94NYqI8RUNzd0/Ff2ND6b8YKxfDv4jUpbqbhxkA5c8YJiZ9xdrB42 OOUjVeveeN+Qc0fsSciHyx7JGyIQUJBc35kxbbdAjUehJEnxWwi3BkN6cHu1aGTt8Ko9 IVRbcYBFWFDMWerSi+1LcIcH7qDoBJveqSTRzsuMmOBb99+9j11X1IEXkaJXvMQKH3zp +WW21ZuZcmguwkBWUd0Vcvi0b4B9T/RMuEJNr9IhkPxRtTTftjzsDCxw5IdqocQEXYTg 4CkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1B4ipYgOhPfv+d9TPnP1fvw4sKD2zjUHJ0ZUz1kJsk4=; b=E2dOSj+sdvjZXUEEtl5LyCf+hxNsKNQj7BQbdhvjvLOVC+sjxClvybLFfdbk79wSss X/lgajUyBHaD4/JmggCMj/MPefp9pP65rJHS4A1fEQh7ADQhYWnumuQ7Kwxv+Ck399DI GN+N0dyd2Z05WzLjqfyqJboBHH2iogo7soFoCzspSIuDmg1b6hIZ0hQfOW9l1WP/OnhO 4KFSjlgTrqwcys5BrNHi9VJrQswEykiU85T9KzprE+uLA3qyMrngBJtnFqLe57ytBZFc JDthhuMQ9QflB88+FbdKQDsJZ/yyTSIj5QdgR9MIQ+nnBXvrm+dhGScef29fbtadwIwV XijQ== X-Gm-Message-State: AOAM532EMH8XBPm9ctDdSYKcpi1s/mzbNbSs2+eJQkWgXOvZd9WQd8Ku 57BmDVsA3+PjbS06VeU5fUk2aKvBdSpwch0sX5g= X-Received: by 2002:a2e:9842:: with SMTP id e2mr8814104ljj.373.1607351192458; Mon, 07 Dec 2020 06:26:32 -0800 (PST) MIME-Version: 1.0 References: <20201207113827.2902-1-bongsu.jeon@samsung.com> <20201207115147.GA26206@kozik-lap> <20201207141311.GB34599@kozik-lap> In-Reply-To: <20201207141311.GB34599@kozik-lap> From: Bongsu Jeon Date: Mon, 7 Dec 2020 23:26:21 +0900 Message-ID: Subject: Re: [PATCH net-next] nfc: s3fwrn5: Change irqflags To: Krzysztof Kozlowski Cc: linux-nfc@lists.01.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Bongsu Jeon Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 7, 2020 at 11:13 PM Krzysztof Kozlowski wrote: > > On Mon, Dec 07, 2020 at 10:39:01PM +0900, Bongsu Jeon wrote: > > On Mon, Dec 7, 2020 at 8:51 PM Krzysztof Kozlowski wrote: > > > > > > On Mon, Dec 07, 2020 at 08:38:27PM +0900, Bongsu Jeon wrote: > > > > From: Bongsu Jeon > > > > > > > > change irqflags from IRQF_TRIGGER_HIGH to IRQF_TRIGGER_RISING for stable > > > > Samsung's nfc interrupt handling. > > > > > > 1. Describe in commit title/subject the change. Just a word "change irqflags" is > > > not enough. > > > > > Ok. I'll update it. > > > > > 2. Describe in commit message what you are trying to fix. Before was not > > > stable? The "for stable interrupt handling" is a little bit vauge. > > > > > Usually, Samsung's NFC Firmware sends an i2c frame as below. > > > > 1. NFC Firmware sets the gpio(interrupt pin) high when there is an i2c > > frame to send. > > 2. If the CPU's I2C master has received the i2c frame, NFC F/W sets > > the gpio low. > > > > NFC driver's i2c interrupt handler would be called in the abnormal case > > as the NFC F/W task of number 2 is delayed because of other high > > priority tasks. > > In that case, NFC driver will try to receive the i2c frame but there > > isn't any i2c frame > > to send in NFC. It would cause an I2C communication problem. > > This case would hardly happen. > > But, I changed the interrupt as a defense code. > > If Driver uses the TRIGGER_RISING not LEVEL trigger, there would be no problem > > even if the NFC F/W task is delayed. > > All this should be explained in commit message, not in the email. > Okay. I will > > > > > 3. This is contradictory to the bindings and current DTS. I think the > > > driver should not force the specific trigger type because I could > > > imagine some configuration that the actual interrupt to the CPU is > > > routed differently. > > > > > > Instead, how about removing the trigger flags here and fixing the DTS > > > and bindings example? > > > > > > > As I mentioned before, > > I changed this code because of Samsung NFC's I2C Communication way. > > So, I think that it is okay for the nfc driver to force the specific > > trigger type( EDGE_RISING). > > > > What do you think about it? > > Some different chip or some different hardware implementation could have > the signal inverted, e.g. edge falling, not rising. This is rather > a theoretical scenario but still such change makes the code more > generic, configurable with DTS. Therefore trigger mode should be > configured via DTS, not enforced by the driver. > Okay. I understand it. > Best regards, > Krzysztof