From patchwork Mon Feb 6 14:21:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 93435 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1796107obz; Mon, 6 Feb 2017 06:22:11 -0800 (PST) X-Received: by 10.99.232.5 with SMTP id s5mr13777325pgh.66.1486390931207; Mon, 06 Feb 2017 06:22:11 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si822084pld.147.2017.02.06.06.22.10; Mon, 06 Feb 2017 06:22:11 -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 S1753236AbdBFOWE (ORCPT + 25 others); Mon, 6 Feb 2017 09:22:04 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:38626 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752321AbdBFOWC (ORCPT ); Mon, 6 Feb 2017 09:22:02 -0500 Received: by mail-wm0-f52.google.com with SMTP id r141so116020680wmg.1 for ; Mon, 06 Feb 2017 06:22:01 -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=DxZ8FIbfHOJQXnSg0AL4xBllh+O/xMaHTWwF+gg/ABk=; b=JhrCE4u0n/oFVBGlB7iB8hGM118KhhH1vM02mUYT9/lp/3EyuqhCO3IgJP6oBFs2E3 /hOjUzYK0b2OIAW0Mqz8iVVPtn4dddKnV3bztknJLMVpAQAQRPiqLbfFuvZtViUviziJ KXUrkbrqnrwJhu5r75QSXu9rzjYxEPiqzVHEM= 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=DxZ8FIbfHOJQXnSg0AL4xBllh+O/xMaHTWwF+gg/ABk=; b=uTySTX5L9UIhSj9AIyFJueI8PbTIQnpvZytmxFYBoflXOejyrp5Uy1In7N7rl/3nX9 k1fh/it27wE2+o5lcJnN1qXgbRvie1/LViJZBYSNfwxJQR8zt9tqj12QgK/mZCLZhQUN 0PKzVe02MkTeFGRi7no8lk/jJF4SEJvbD1h/URJ1tFY377rWXxfNq7QNFQv524/PiJMD 10Q1TQHm1ezI754JGfKyzjSZIRslf277Q/7EwJ/D3eXbsSZz7UTmAhERiDMb6L6BM5T8 TOvjXJmt5IKxBb5um+fmtNwld1JnZ6s5vl2JMrG6lE33hL7QMOuNrdrn3VoVrcGgsohK Meeg== X-Gm-Message-State: AMke39lbgEuIpQGiNNtm5k3+XxPgYdMZq0zFcWdlolFk21DVVFJJrSiPK4TeS1fSMCfad+9b X-Received: by 10.28.91.16 with SMTP id p16mr8436198wmb.111.1486390920716; Mon, 06 Feb 2017 06:22:00 -0800 (PST) Received: from lmenx321.st.com. ([80.215.163.235]) by smtp.gmail.com with ESMTPSA id l140sm13189261wmg.12.2017.02.06.06.21.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Feb 2017 06:22:00 -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 v1 0/2] iio: Add parent_trigger attribute to triggers Date: Mon, 6 Feb 2017 15:21:50 +0100 Message-Id: <1486390912-24362-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 Thoses patches add parent_trigger attribute to IIO triggers. The goal is to allow triggers to use triggers like is this done for iio devices. With this patch it will be possible to chain triggers, for example stm32 triggers could be used as clock of an other triggers: echo "tim1_trgo" > trigger0/parent_trigger. 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. Benjamin Gaignard (2): iio: Allow triggers to be used as parent of others triggers iio: stm32 trigger: Implement validate_trigger function .../ABI/testing/sysfs-bus-iio-timer-stm32 | 26 ++++++ .../ABI/testing/sysfs-bus-iio-trigger-sysfs | 8 ++ drivers/iio/industrialio-trigger.c | 68 ++++++++++++++ drivers/iio/trigger/stm32-timer-trigger.c | 104 +++++++++++++++++++++ include/linux/iio/trigger.h | 6 +- 5 files changed, 211 insertions(+), 1 deletion(-) -- 1.9.1