Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3711080imj; Tue, 19 Feb 2019 08:09:44 -0800 (PST) X-Google-Smtp-Source: AHgI3IbmffB0+TiSlPySIHoTS2wQyo8suNXDrjwBiRfSLhViT/NBcPYUdFT2hGYgjSfCZHIaZ2GO X-Received: by 2002:a63:5107:: with SMTP id f7mr23570445pgb.218.1550592584860; Tue, 19 Feb 2019 08:09:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550592584; cv=none; d=google.com; s=arc-20160816; b=ATWYQ2xe9XFa475ki4hvLaRvSWh/DEo1a1mM0UnsIKayAy/CYNH95q9ki1nllXVfxH GKb80zLl82U7Gs/FwvWKHM49jtlBPYf1THXxIQp2VeUhrQixHElAZ5E+8qRFw9/Nhm1n 1wOkoCHfhmD6wBw5H3QUP/a9x97+N/0htCKet/t0FdnULJkFdyp3Yo9W1blCCGAjhzhM xXaoDrcvLAIcC5+ckYEiddhLlrvJQhVU7Lx7FVUSeJBaNDU0/wTlEz5pzv9znm0FW+Gx kSkKwlxtuCgPuvU5WsDVNSm1KgeiMlo59NIdnkVS69cjLgGEZjQ1sjmCzOrcYhYh69a9 hswQ== 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=7s4eDmqcVrJit+LRNz/3DTAZJVvDNlWByMSZ7/sgKQ0=; b=AXMB766BrCOOoR0FUEeEs8u91nNRClvX+BVjlxCubx+B7EjPVoh0D2pcU2yIKbO8ra 2t0SyTJIks0EkFDFI74aUlDBFLHeP04EGplL9h7y/1z+MjBDy0Cmwd2vUUxH27WGW3QI 9gGMux8hybcdQBmjb2JdWgnFH0s3u0+ixZNWchtyHHXQmovxFnFkfr046EFH9HJ5IcF9 GTaz0sGsK/kHyUnRnP5GbshQG1KiSG0R17e2OzTGSqQzsIXY2cpEN6noVzGDWQ7s6JUR yvHUOLpYrUD2ehZ4pNsFLq8oD/yz4q18FYEKKeKrg2WW/IXw5/JtD0mXYId7yPgJ8Um5 ti6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=sBwQjTHT; 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 d23si7879356pfm.181.2019.02.19.08.09.28; Tue, 19 Feb 2019 08:09:44 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=sBwQjTHT; 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 S1726565AbfBSQG6 (ORCPT + 99 others); Tue, 19 Feb 2019 11:06:58 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46729 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727303AbfBSQG5 (ORCPT ); Tue, 19 Feb 2019 11:06:57 -0500 Received: by mail-wr1-f68.google.com with SMTP id i16so14356141wrs.13 for ; Tue, 19 Feb 2019 08:06:56 -0800 (PST) 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=7s4eDmqcVrJit+LRNz/3DTAZJVvDNlWByMSZ7/sgKQ0=; b=sBwQjTHTUad96tqXQ19VixTG8equAaSgvO9R99ygJbZT+h74UDZ5wjzsQURo3tJ+qM 2LFUexxGD3rjFyS6fbtpmtTsWPAm09UcFHsUnAPHqsDwKMkPcQL7ppNdt3S/NQtxX7BE ZRYtmBVYUe9lQ6ppBtkwUAEgFnNyq/pxYNpjVR9oyctuOHjNHbFmXezjqnHp4WYr68pY p8+KRjd6+mEcxHn5w7aCKxVqs+PCsvyHZFRz2i3kluGDgN7T1X4O0ep8tbfiNyW1874q aDr4mS9d5oT7vcvHOk9RrUQnDdGZ/9zL0lMSvFTuW2hTUtT451NUlaBSsv86Trcmd1ss f3Gw== 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=7s4eDmqcVrJit+LRNz/3DTAZJVvDNlWByMSZ7/sgKQ0=; b=g/INbCV+kDTnwdwFYOCR0kbLjD8opCR+Ig0RCvSNPxn25rMHSIQhXfUpKKX/Fie9s+ 2MAuXE+pzqqscwEpjgA5tXbgZF4zOWX2fqjEVmw4StvSc+k6xnjcV1pa6S0ck3ckJ5+F OHb3x5lENcB8WSAXLROsyZJjcf3cv90j5PoqrJLF+hhR5qSFcWKvMXqH3quYmKCzWvCo HbRB8sSmptJ5lEv5MUZm/R+ODglNm60pKqYky9PTxVFIQAv2R4h5a/vqYB4rfEgcGQ4L HVK8PgerX1y1zQfIEcdbfzkGrzfhTzaGQA6SHVjiN96A8mrqqz4A8o4DnzBGygQsD8jn YLiQ== X-Gm-Message-State: AHQUAua+Lyje0gDggqzsXgtWp8Qh3T/pJimXOlKY8ng8EAabIvR4osBt 48Vmrp9w37TyoxvMKGPxw+prZg== X-Received: by 2002:adf:ef4a:: with SMTP id c10mr21210682wrp.180.1550592415724; Tue, 19 Feb 2019 08:06:55 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id h17sm12161381wrq.17.2019.02.19.08.06.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 08:06:54 -0800 (PST) From: Bartosz Golaszewski To: Linus Walleij , Thomas Gleixner , Marc Zyngier , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v6 0/7] gpio: mockup: improve the user-space testing interface Date: Tue, 19 Feb 2019 17:06:43 +0100 Message-Id: <20190219160650.9614-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Marc, as discussed. This is hopefully the last version. The irq_set_type() callback now only accepts edge triggers. v1 -> v2: - instead of providing the irq_sim_get_type() helper, move the irq type logic into the simulator and provide a helper that allows users to specify the type of the fired interrupt v2 -> v3: - switch back to having irq_sim_type() and put the line state logic into the GPIO testing module v3 -> v4: - drop irq_sim_get_type() and use a notifier chain instead so that any change in type configuration can be pushed out to interested users - change the locking mechanism in gpio-mockup to a spinlock as we can't take a mutex when a hardirq-safe spinlock in irq_desc is being held when the irq_set_type() callback is called - refuse to set any other type than falling or rising edge in irq_set_config v4 -> v5: - drop the notifier, use irqd_set_trigger_type() instead v5 -> v6: - same as v5, but we're now validating the trigger type and only allow edge triggers Bartosz Golaszewski (7): irq/irq_sim: add irq_set_type() callback gpio: mockup: add locking gpio: mockup: implement get_multiple() gpio: mockup: don't create the debugfs link named after the label gpio: mockup: change the type of 'offset' to unsigned int gpio: mockup: change the signature of unlocked get/set helpers gpio: mockup: rework debugfs interface drivers/gpio/gpio-mockup.c | 189 +++++++++++++++++++++++++++++++------ kernel/irq/irq_sim.c | 12 +++ 2 files changed, 174 insertions(+), 27 deletions(-) -- 2.20.1