From patchwork Thu Feb 16 14:23:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 94076 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2527839qgi; Thu, 16 Feb 2017 06:23:24 -0800 (PST) X-Received: by 10.84.211.7 with SMTP id b7mr3546136pli.82.1487255004849; Thu, 16 Feb 2017 06:23:24 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w70si7054047pgw.402.2017.02.16.06.23.24; Thu, 16 Feb 2017 06:23:24 -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=@linaro.org; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932193AbdBPOXS (ORCPT + 25 others); Thu, 16 Feb 2017 09:23:18 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:33722 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067AbdBPOXP (ORCPT ); Thu, 16 Feb 2017 09:23:15 -0500 Received: by mail-wm0-f49.google.com with SMTP id t18so3778953wmt.0 for ; Thu, 16 Feb 2017 06:23:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=3krsQXqiHz04pUIun35qGLTJpm7b5CfNXQ0+vZ1JxAI=; b=EQP2aXj3m7ZXfWP6D0VXWGX+cuoELqC+J7gFqm+wbLNFkq7iu2n7ZFgaZ6EG3oxHvy KrAPrKQyz1XV5+JjDaLqBs/DaXrvceQmLp73bozyHlB1OUu8NqR+b8gPFAwzhMnnFMlw traciGuGXgCGZs4uhF4t4ROdM4xtZyAQRC8NU= 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; bh=3krsQXqiHz04pUIun35qGLTJpm7b5CfNXQ0+vZ1JxAI=; b=J2Hx8ZJLrtFshZpnLsY0/H7MXgVTpRh2aLz/4exFB5eBwSkEXSbU26rhKJgKHYQare GlVTA46zZO1nu3u5HePNthBqg7CHKYUIm7h2+LcmBql14JEBUNZdv3vIbB1g0uTrOIIO EZZTn7068XIyw1lSRJta0KoPEN+LSZtAgBOWoM+50M/lmFWelZ0gb6VbeBIIaIWWes2b jDi8vDGyykQBq6puisMUl2tvppXe0J1U0Q3fV4aC69/uhg1mB+hhU7H7FKoka2e9wwVL 9MpTb1CAlBWxqaNVOtPb+ZlvfemVn68YGMNmkDfUh7CznexTkF5OZHDWNXPsW05AK64F 21SQ== X-Gm-Message-State: AMke39nuxZVzEzYkV+wkBHizQknmiIYtcy/Y09RHWx+BGNBZG+KVmH6dBEhXq6kpVfo1nUAk X-Received: by 10.28.18.130 with SMTP id 124mr13391707wms.8.1487254993929; Thu, 16 Feb 2017 06:23:13 -0800 (PST) Received: from lmenx321.st.com. ([80.214.74.235]) by smtp.gmail.com with ESMTPSA id s26sm9137151wra.26.2017.02.16.06.23.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Feb 2017 06:23:13 -0800 (PST) From: Benjamin Gaignard X-Google-Original-From: Benjamin Gaignard To: linux-kernel@vger.kernel.org, jic23@kernel.org, linux-iio@vger.kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: fabrice.gasnier@st.com, linaro-kernel@lists.linaro.org, benjamin.gaignard@linaro.org, Benjamin Gaignard Subject: [PATCH v2 0/2] iio: Add parent_trigger attribute to triggers Date: Thu, 16 Feb 2017 15:23:01 +0100 Message-Id: <1487254984-20122-1-git-send-email-benjamin.gaignard@st.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org version 2: - Do not automatically set parent_trigger attribute on all triggers. Let driver decide to use it. - Improve documentation of parent_trigger - Improve slave modes documentation Thoses patches add parent_trigger attribute to IIO triggers. Parent trigger edges or levels could be used to control current trigger for example to start, stop or reset it. Similary to what already exist to validate a device, a new (optional) validate_trigger function is added in iio_trigger structure and should be filled by drivers. For STM32 triggers parent trigger edges or levels could used in various ways. To be able to select them "slave_mode" attribute is added to STM32 triggers. For example the combinaison of parent_trigger and slave_mode allows to start a trigger only when parent trigger level is high or to reset it on parent trigger rising edge. Benjamin Gaignard (2): iio: Allow triggers to be used as parent of others triggers iio: stm32 trigger: Implement parent trigger feature .../ABI/testing/sysfs-bus-iio-timer-stm32 | 43 +++++++++ .../ABI/testing/sysfs-bus-iio-trigger-sysfs | 10 ++ drivers/iio/industrialio-trigger.c | 68 +++++++++++++ drivers/iio/trigger/stm32-timer-trigger.c | 105 +++++++++++++++++++++ include/linux/iio/trigger.h | 7 +- 5 files changed, 232 insertions(+), 1 deletion(-) -- 1.9.1