Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3821984imu; Mon, 28 Jan 2019 11:25:20 -0800 (PST) X-Google-Smtp-Source: ALg8bN7IAzguU0g7tgDSQVHYkKG1FDcZQR4m8nzaK4ryXJ/LifWCEL3f4NvLoRvG4pmFFMBq6/Ha X-Received: by 2002:a62:68c5:: with SMTP id d188mr23847447pfc.194.1548703520801; Mon, 28 Jan 2019 11:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548703520; cv=none; d=google.com; s=arc-20160816; b=TCOUkmJpIKFi9Ahuxezm8mOURck0FWMjgStA3G1PjmFgCt+zuqCMeXj5SpFtE33LZQ YREjqHUt7aespGkvtQ4GA2w3t5QXvZmx7oB221qkP5B1HabqrcIud+xIz3nM2aZioMY0 NKqpfbmWExK4TYYQOVts3AoL85BX16o024jWxhMhzol6hFq8TVb9LjWeUfsNWtUCuDRw 93N+EdVPMAy0fc6fALg1tQNMq8oNKif4PuTENu0iWraTmlG8RkzybwXXsPpahXR+ke32 hPnnPEvXhhYeU6XBS5FpE/QhIcjaKEDCdDE119uZ896E73F8ytAnJy0VN8oT0QTr3kPz 5PPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4w5GVgfSc7HDd4w82dp/ZXFLWhzvarEeSPreNtWAt24=; b=XflGBQyzQXHrnH54Ee7Es41+NBrjcMkk0SIUvm/ZBIvvwJt18xsm2z/S/cpp+UgsMF 4dZdvVWWmv/poEALrcts93tCI8aKOC3FOoF0qsRJceepkDWjWtRxQCzZW5GlXT5EPnsL h124nCpRTi6BiP3THyQ0ptgtL54Jok0IhQnO6rh4voY9bFhBUFC5qxcOY9UbSw0Mpkqy 7Lq1bY+LqkUT7fnwbHpkmedAUG5+vluKngIkI1BRPOU0my8f9IPKF03gfn7ohxle7ove bF8xS7JZ9nqH2jdaCOM3H2VPgjnkfDCgGU9eC17P2H8m849A9mCY8qjuu5VAcYSNziLl u/AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="YtLRJh/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id d92si34497570pld.45.2019.01.28.11.25.04; Mon, 28 Jan 2019 11:25:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="YtLRJh/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728256AbfA1TW5 (ORCPT + 99 others); Mon, 28 Jan 2019 14:22:57 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36757 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727052AbfA1TW5 (ORCPT ); Mon, 28 Jan 2019 14:22:57 -0500 Received: by mail-pf1-f193.google.com with SMTP id b85so8460326pfc.3; Mon, 28 Jan 2019 11:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=4w5GVgfSc7HDd4w82dp/ZXFLWhzvarEeSPreNtWAt24=; b=YtLRJh/VTwFwZTLiBH8nhmwp9XiwpPsk/31466R4V8uL7VKH1UaBT7UHcwuVZmF7Pn yi2aqKPdjxQr5JB0PEpPjVrCbcdtaSTf2+350JAfH00AvlYlUF7El8XBZ2T9NVRDRBdG W0OJ87fZxqp4EB7IVz95BPOFUWc8fp1ecxSc2GrFU6nh2D0bVMvH0hP96F7db5F6HxPL ztg5Oa1aak6pmGzWjXR7Zv9LupnlU/55TaYJs8D2Lh6K4IqwFipaes8z6WAtx75UEbpl /U5FnoY3YPeCIDx3063c2hTT+awuZivw+RrwzBpCEmyyXQYocAUEV5KmkJ4XnID+AvjE r5wQ== 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:user-agent; bh=4w5GVgfSc7HDd4w82dp/ZXFLWhzvarEeSPreNtWAt24=; b=l9PN/R9uUzeRrrS6uAKDxrOZ/aHpMKwEPVVBaN0qo3vd8okfeiqqm0+pE8B6SEfAhw gEVYlXggzkYW+RcHa0MLgdKkScuHqhiSBkMKXGnflY1B/EuEOPUkxkEq3AuBzcX4Y2H+ 1VnFHBQmN+Ud/Va9Y0iwTQvdlQPWDPBl7yOiyngVxLND5/L8XYPQBjJVxqPbyDgQDsm8 pSSzeezwZkaxvKavtiVZ1djI0b6R0IPKrWmeODe0N3pzPkmKK7RSWuSm4kRU6RU+iy/u IFHI3K9XA9SpVQ+74iQVZkO8FEdFjWZ1AAe5SXGaJLYJheWGbiMgy7ulanxmT7EXyXcr HpZg== X-Gm-Message-State: AJcUukco/14QzjECjx4FZHpWLAuDnqe7wRxRlXOFRHhZFwEt5OzBA+BF KcXnfTpbkbVLmUh1zsAiHLQ= X-Received: by 2002:a63:4e15:: with SMTP id c21mr21004600pgb.50.1548703375956; Mon, 28 Jan 2019 11:22:55 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id y6sm49018429pfd.104.2019.01.28.11.22.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 11:22:54 -0800 (PST) Date: Mon, 28 Jan 2019 11:22:53 -0800 From: Dmitry Torokhov To: Bartosz Golaszewski Cc: Rob Herring , Mark Rutland , Linus Walleij , Jacek Anaszewski , Pavel Machek , Lee Jones , Sebastian Reichel , Liam Girdwood , Mark Brown , Greg Kroah-Hartman , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , devicetree , linux-input@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH 12/13] input: max77650: add onkey support Message-ID: <20190128192253.GD34692@dtor-ws> References: <20190118134244.22253-1-brgl@bgdev.pl> <20190118134244.22253-13-brgl@bgdev.pl> <20190119090318.GB187380@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 11:52:50AM +0100, Bartosz Golaszewski wrote: > sob., 19 sty 2019 o 10:03 Dmitry Torokhov > napisaƂ(a): > > > > Hi Bartosz, > > > > On Fri, Jan 18, 2019 at 02:42:43PM +0100, Bartosz Golaszewski wrote: > > > + input_set_capability(onkey->input, EV_KEY, onkey->code); > > > + > > > + rv = devm_request_threaded_irq(dev, irq_f, NULL, > > > > Why threaded interrupt with only hard interrupt handler? If parent > > interrupt is threaded use "any_context_irq" here. > > > > Hi Dmitry, > > actually it's the other way around. Take a look at the function > prototype for devm_request_threaded_irq()[1]. > > The third parameter is the hard-irq handler (NULL in my patch), the > fourth is the thread function. Actually even if I did what you're > saying - it would never work as this is a nested irq for which the > hard-irq handler is never called. Sorry, my eyes must have crossed. Still, from the driver POV the interrupt does not have to be threaded, this is dictated by the constraints beyond the driver control. For these cases we have devm_request_any_context_irq() that takes essentially only "hard" IRQ handler, but internally either does request_irq() or request_threaded_irq(), depending on the context (whether the interrupt is nested or not). Using devm_request_any_context_irq() should not have any behavioral changes, but documents the logic better. Thanks. -- Dmitry