Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp644535imu; Fri, 4 Jan 2019 04:37:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/WzL7R1ZT9ohjpbc3Uz7Y+wahP1yM5wvCOqi858UjfiYxBrR1IofvmtVRAtPKK2bpyTd7Os X-Received: by 2002:a62:5301:: with SMTP id h1mr51718565pfb.17.1546605427019; Fri, 04 Jan 2019 04:37:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546605426; cv=none; d=google.com; s=arc-20160816; b=wJj/bbOfMByIYAx3sF15gXi+4tYZeqAmpD3+Hdp7o/3gme3M3DyhQzf6dJ9415Q9XK zWeD70XD4/Hyi3CkuBU7lA/SjshwJYkZ6q6LaDpmrrfKIRk1hObYzboZJzoXDf1BCB16 nN1M2Dhz+Yxx1Un9DphEFv/TjrxyqNIUknRVgbM57A7E9Mg6Qfa4y6VbjYs4WUrfBkVk VdOOHc0C0z7Ayv1uRQOk1UGwIEogP5xtiJl0PHVk31ZdgVZpNcgcXTpk7jVZlQlyjVmB 0kuoVAQ38D7gR65dN8npz/+i3ypc8jSDHTk1Gc9U0CCNghvaoRyu6abKplqgYMXmj7t/ XJpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=lM5pvkUWtdBGBf295DNJav2rv4tKoFpjI+CoLPP6ETU=; b=ENsBWkRimSUogZHW4aP5jRQOWVSPslwOjBtgNdaGkcvCZg8pJ259bXgaEolq+zgNG+ rrEVsTTfZZcjBeSwR97y2iguWliFXYqQZe+r5wqOsToTGqi4rN8hB/KSDQK7CwxExyF5 5MKQ8HtmSbTmhAzjyKKacPi5THwD+OM04zgrpyecgvIAPzVPi4aN8uVCO+1KBa7BX3Ef 3uVuKfG51OQQQQpDRlCiOh5ynjTBk4bh2Qa9BR5G+7w+X2G8yU6kK8lkSuk/wvo3VQDG j1mdbk/d6IJ3l9Y+m8Zk9ZdlXs3kKzOTye1mXvqRNjXnGzqRnkhLhgYkJFmICZB66ieZ 684g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si9814671pls.71.2019.01.04.04.36.51; Fri, 04 Jan 2019 04:37:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727163AbfADKba (ORCPT + 99 others); Fri, 4 Jan 2019 05:31:30 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45494 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726134AbfADKba (ORCPT ); Fri, 4 Jan 2019 05:31:30 -0500 Received: by mail-lj1-f194.google.com with SMTP id s5-v6so32036869ljd.12 for ; Fri, 04 Jan 2019 02:31:29 -0800 (PST) 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:mime-version :content-disposition:user-agent; bh=lM5pvkUWtdBGBf295DNJav2rv4tKoFpjI+CoLPP6ETU=; b=YcvOz8cWXWZ59BQQpgoFDbPyeRr3o6oFXzozhWQ0lg7G5nXgADiH2x+3EhCuBJyqpI Ac0nqVZDu8V9aUK5WCK+GpfsqieHYnB/MiXCxb85TZTzMLpJGye+M+cxk4nXGszIu94e FMTKj2Pe8qM8OD0OlJjQ3zcAm+S+qwRpBxl6hoal9cpIr+b6c6FuSYEwqFC61UrKgKoM 6REA1IUfw1VXrxIsOa7cA0s/URxhtGbCK+pTcpvkYJXa8kn5fHQ4M4J/Bx1mk7a9x4za oZemrF9kwXVnBL3h7LzsPVstHqeFkn+OxIoNA5VD3+CXxySH/5zB0Ha7G9mQrzLL11Gd wPjA== X-Gm-Message-State: AJcUukf6vml6F4uqnYRdDxcwps3keOK9VB4RHHrnTW1Fjyg5SPkn+iZ/ h4Z/Dcz/OgD6urvodZDzFgM= X-Received: by 2002:a2e:612:: with SMTP id 18-v6mr27757671ljg.125.1546597888308; Fri, 04 Jan 2019 02:31:28 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id y24-v6sm12217917ljd.20.2019.01.04.02.31.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Jan 2019 02:31:27 -0800 (PST) Date: Fri, 4 Jan 2019 12:31:15 +0200 From: Matti Vaittinen To: mazziesaccount@gmail.com, matti.vaittinen@fi.rohmeurope.com, mikko.mutanen@fi.rohmeurope.com, heikki.haikola@fi.rohmeurope.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org, linux-kernel@vger.kernel.org, geert@linux-m68k.org, ckeepax@opensource.cirrus.com Subject: [PATCH] regmap: regmap-irq: Make irq-type callbak optional Message-ID: <20190104103115.GA10043@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Do not register type setting callback if HW does not support setting the irq type. IRQ core can then handle cases where type setting is not supported and no regmap-irq specific handling is required. Signed-off-by: Matti Vaittinen --- drivers/base/regmap/regmap-irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index d2d0014b0d23..a387ee499b5c 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -322,7 +322,6 @@ static const struct irq_chip regmap_irq_chip = { .irq_bus_sync_unlock = regmap_irq_sync_unlock, .irq_disable = regmap_irq_disable, .irq_enable = regmap_irq_enable, - .irq_set_type = regmap_irq_set_type, .irq_set_wake = regmap_irq_set_wake, }; @@ -560,6 +559,9 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags, d->chip = chip; d->irq_base = irq_base; + if (num_type_reg) + d->irq_chip.irq_set_type = regmap_irq_set_type; + if (chip->irq_reg_stride) d->irq_reg_stride = chip->irq_reg_stride; else -- 2.14.3 -- Matti Vaittinen ROHM Semiconductors ~~~ "I don't think so," said Rene Descartes. Just then, he vanished ~~~