Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7174103imu; Thu, 27 Dec 2018 13:58:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN7G6OWoWaA84gULI6Df67xPjd/W+8fRcshA8c6SrJ3CmLbaBUIK+s4i9179VGxzaolXGdN8 X-Received: by 2002:a17:902:7c85:: with SMTP id y5mr25094783pll.63.1545947935165; Thu, 27 Dec 2018 13:58:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545947935; cv=none; d=google.com; s=arc-20160816; b=gM5mbdamfy5UnBlEfK8LmCfB0PTGzHOYWTWA901Jckl+3e13E7v568OSHlYiPHMe/h +U0i6TduCij68XpOqy1Eha3yWsC1aCZgKkSBEKU44d2X5yb3fI760seGaGDHmIGZ4Fnj tZZevrV02eYLgPcCv2+IR4xbwhPQo3Aiwt2msUd6/XXDAeIJuOdJrgw477rmqDCZBs6g glQGxcWuY06VWpVK883PZme8zQuIcGFgUU54Kd6s6ec6AnRvM3ewKTx3SkR1TE4vkQO5 q6rJ7Z6gqYSXdHnhRw94UJ0GR9VoXqv79l480r0dVrD5PKZdNwnWXE9r+Mkq1pOyhT2j ZYXQ== 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=jCjNMpwaULpBADjsdRbFO6gL3c5aDJgwhY8Rl9yMB+4=; b=vHkUnrfSfutbPM/zB868K4fXCSzwC67wZjL5agpMCCINBsxVBQjUFP8xUk+/r22lrD f0mV9zFdgFiP67bY7gfZge/j7xdBsfU4nQJTiMKRJSMmFc4vcCvcLQGO6yaNzbaeUPu+ OOceAPOaawPd3QpahufMZ3y4u34RiSr822Wtw8+ZmURnC4r0G9XFf9skVd+xXtordGM+ saDyLj4LgZPim2ZmoNDlgtn3d2eWbXB71aQP2S2cQfIJidbJW9b8JVfe+EQqsvBIDvEg QMT7qLB6ma30QFwzPRSppVaFNB/zpAjyoTgwJSK/BYvximTLDIiuaPdjiFoiLHifEbli i3yA== 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 x4si34562249plv.56.2018.12.27.13.58.39; Thu, 27 Dec 2018 13:58:55 -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 S1730420AbeL0Io7 (ORCPT + 99 others); Thu, 27 Dec 2018 03:44:59 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39190 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728748AbeL0Io6 (ORCPT ); Thu, 27 Dec 2018 03:44:58 -0500 Received: by mail-lj1-f196.google.com with SMTP id t9-v6so15672480ljh.6 for ; Thu, 27 Dec 2018 00:44:57 -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=jCjNMpwaULpBADjsdRbFO6gL3c5aDJgwhY8Rl9yMB+4=; b=lXBaTHFAbrbWPg7nWzY7Ij7cRsbk4iq34W3wpSnMvsVl+mLJXWeVe/uXW+zn5twvk+ /mjq6UeBOzC4LeqFTdNG2lPIjCwaeRhMAMrRlj0C+z/hTRo5uwQsWnX+5KzV/NtUE0Bo PBfq1xFNmFd349NnJfrF+AXQlFOJt0oIOLLRVtbp25hbty8fp+jWIaDd7cq2T6XfTnZJ ACwZmDUwQhvCjEPnP2Xu35atywbKmdfijG7d9mlhZ8QKm8oeGdxn4qKseIgO4gtNYhnQ lxpPi97n//dSN3efTBXlo3FvVMxzKoA4lsj9jyPlcE0wOOK0NwVA5msoJ9w74RSFyuIt lcww== X-Gm-Message-State: AA+aEWYQTpmUCTO0r8IY3sl54V2ErG2V4S6yweR888YRNrjXINAxnNB7 USgDOx2pn0JBx67ylYtma6Q= X-Received: by 2002:a2e:4746:: with SMTP id u67-v6mr12908216lja.142.1545900296506; Thu, 27 Dec 2018 00:44:56 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id d23sm7481528lfc.11.2018.12.27.00.44.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Dec 2018 00:44:55 -0800 (PST) Date: Thu, 27 Dec 2018 10:44:43 +0200 From: Matti Vaittinen To: mazziesaccount@gmail.com, matti.vaittinen@fi.rohmeurope.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org, geert@linux-m68k.org, linux-kernel@vger.kernel.org Subject: [PATCH] regmap: regmap-irq: silently ignore unsupported type settings Message-ID: <20181227084443.GA23991@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 return error if irq-type setting is requested for controlloer which does not support this. This is how regmap-irq has previously handled the undupported type settings and existing drivers seem to be upset if failure is now reported. Fixes: 1c2928e3e321 ("regmap: regmap-irq/gpio-max77620: add level-irq support") Signed-off-by: Matti Vaittinen --- Geert reported that 1c2928e3e321 breaks da9063-rtc on the Renesas Koelsch board: https://lore.kernel.org/lkml/20181227075648.GB2461@localhost.localdomain/T/#m194616cc88d7b4c2a78f7ce07907608fdb64a092 Geert, do you know if anyone vould to test this? drivers/base/regmap/regmap-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 1bd1145ad8b5..d2d0014b0d23 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -258,7 +258,7 @@ static int regmap_irq_set_type(struct irq_data *data, unsigned int type) const struct regmap_irq_type *t = &irq_data->type; if ((t->types_supported & type) != type) - return -ENOTSUPP; + return 0; reg = t->type_reg_offset / map->reg_stride; -- 2.14.3 -- Matti Vaittinen ROHM Semiconductors ~~~ "I don't think so," said Rene Descartes. Just then, he vanished ~~~