Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3750412ybl; Mon, 12 Aug 2019 05:54:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4UqgyjtZILXbFWpVGq4UwbYe++WfNxRxpyXNZ+qzNG/ECJ+luWAQXhKcm0isufLykpxc2 X-Received: by 2002:a63:3147:: with SMTP id x68mr30809863pgx.212.1565614442739; Mon, 12 Aug 2019 05:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565614442; cv=none; d=google.com; s=arc-20160816; b=A1Mdbp98OXT+KGw4nibSQMnN7GuYqaMT961mkTk/cnXV1bxwJkkf6DrTPMHcc2L6FE gZUIXrWJRXE8yjTmCidfFdYFEzL/k9bAidIx3zqoacyX6Jwt0DKRE+yvZ2TdNf47NokO caeoWZn+NKBT5QRNzqEyOR+eo6KWGNb3vdFu41A3g8/VfKyyIwHkr6VWpWLWHyOU240R qgSF3oSdngOaTKOV+Oo5BJ0g9mjSsCcLJZmCAX6AEcLIGgRW0NZp1cC6rFWiw0QSzd90 PtLUdxVZWz/zC8T18MWT9C+kVJB6uuOfMu+lVqQAJyeTF9DmPYe5L+KVHlSypww2aYRu gJ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UbDB6JFS0IFPkYF4fl0nqbXR16d37yVxlPN08CwT4oU=; b=iybYjL9xKGL/ltg97I5EGyAMzqf8zKAZATII5eluRGPgYpPFd115Qi01HPdIcTR2cR Q3zkT8ZVEISb+ECEfbenab1fGKC9flx27Ne4jXIqZu5AU0UdAu9B3lm37Spisk2Q+6Yi tHKlD9cxoOuGOGUfB8slT7zBb6RZCvBpJTSQjtHX7foKRsykSMpm2rQIrbJNhj8aZRwO HspBJD9ifc1gbUhyH/1MqQwYSSXgToHrY3zVE0ma5XSSCz0IfPyzqiZSgb+TK44nciCa 4TbAgp4ilCuuHTzsNKgMpQG2GhpVxctffU3XqYiRC7+pVGwb+xKuAqQ+7YTuV/GjHCuX NCMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=OaK1uWNk; 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 21si38208932pgk.492.2019.08.12.05.53.47; Mon, 12 Aug 2019 05:54:02 -0700 (PDT) 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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=OaK1uWNk; 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 S1728682AbfHLMxE (ORCPT + 99 others); Mon, 12 Aug 2019 08:53:04 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:38005 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbfHLMxE (ORCPT ); Mon, 12 Aug 2019 08:53:04 -0400 Received: by mail-wm1-f68.google.com with SMTP id m125so7610259wmm.3 for ; Mon, 12 Aug 2019 05:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UbDB6JFS0IFPkYF4fl0nqbXR16d37yVxlPN08CwT4oU=; b=OaK1uWNkYBTnkyqRDeDUdTQBsgC23gwVtMC4iKGuof8O4PZDBlaeLwIJOJnKurvNE1 AuawtYfXVgsuH5DeSPIDr7kNWi/+MFbtigLkgi2oKVwkL5v43Oa9DKRfDMHBLhGstPyT fZWqmyN5Ch6WyXEinLQCAOmpmrn6uHVWRyFjt/YDaphpuCigkkZPQxDd4D/9ArRtqqzm u/D7S6h+fPtrio3kd99RVEaVeKdz7BBXC3Ga3gnw1qQZ4i2jasMyELTS/LlpZL+/nsjO MhllbK3/tAgqeoEJob1N4HV+YGndyEo3ciPkLDDDkqPUJIUkXjDzknRuGL5/V30+bCpZ 9HHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UbDB6JFS0IFPkYF4fl0nqbXR16d37yVxlPN08CwT4oU=; b=ATIN9cMgLgPiBpLN1hip6dVqqmU+H12K9pc+CZ0UY91iQBu5/nCDe6EQv1wxvyiGSD nLYM76JB0HZ4wkxDGgx3tb/vk+AZjFFcdzhAW2z7y1uDz7iNE6PFbGX1pmT8+WKQp6Ze /PTRUn1Ct9P1x0xoewlklIFcSBj+skVoLOLuBUqstwAqyR4Blul765YQLhMAuYTVuVIB a5sy/JGgmdFR+UrKaY9K0IBfRPpE/KsNJfv/C6PX6G5gYDIWsvpRsV7J6Rbo4SYALL0m EE7WQoKJRoriTwrX//2Dlw51cdbxIDHuo+eZ4Ng7jyMCB5XY7G86f9q1IN02/aVYuFop tn1A== X-Gm-Message-State: APjAAAX2i4jLW3q/4vlVG9xH6XQPJSPKtgFw5mQBnFUwK+jPTBm4rpj3 sQDS4a4/R6GOqXVp6XJokHL74g== X-Received: by 2002:a1c:238e:: with SMTP id j136mr27057657wmj.144.1565614382150; Mon, 12 Aug 2019 05:53:02 -0700 (PDT) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id r16sm28288431wrc.81.2019.08.12.05.53.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 12 Aug 2019 05:53:01 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Thomas Gleixner , Marc Zyngier Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 0/2] irq/irq_sim: try to improve the API Date: Mon, 12 Aug 2019 14:52:54 +0200 Message-Id: <20190812125256.9690-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Currently the interrupt simulator exposes structures that don't need to be public and has a helper that manually maps the simulator's irq offsets to the global interrupt numberspace - something that should be preferably handles by an irq_domain. The first patch addresses the public structures: it moves them into the relevant .c file and makes the init function return an opaque pointer. The second patch adds a linear irq_domain to the simulator and removes the irq_sim_irqnum() routine. Users should now use the standard irq_domain functions. Both users of the irq_sim are converted at the same time as it's much easier than trying to transition them step by step. Tested both the gpio-mockup module as well as the iio_dummy_evgen. Bartosz Golaszewski (2): irq/irq_sim: make the irq_sim structure opaque irq/irq_sim: use irq domain drivers/gpio/gpio-mockup.c | 21 ++-- drivers/iio/dummy/iio_dummy_evgen.c | 34 +++--- include/linux/irq_sim.h | 29 ++--- kernel/irq/Kconfig | 1 + kernel/irq/irq_sim.c | 177 ++++++++++++++++++---------- 5 files changed, 152 insertions(+), 110 deletions(-) -- 2.21.0