From patchwork Tue Aug 9 10:29:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9270829 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D6B8160754 for ; Tue, 9 Aug 2016 10:32:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C52E727F80 for ; Tue, 9 Aug 2016 10:32:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9C1927F9C; Tue, 9 Aug 2016 10:32:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6A14527F80 for ; Tue, 9 Aug 2016 10:32:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bX4JV-0006pI-1w; Tue, 09 Aug 2016 10:31:13 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bX4IK-0004yW-0s for linux-arm-kernel@lists.infradead.org; Tue, 09 Aug 2016 10:30:05 +0000 Received: by mail-wm0-x230.google.com with SMTP id i5so24971696wmg.0 for ; Tue, 09 Aug 2016 03:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uGLJ7i/p5E1E+wg7EQ9bcA7N/E6MhFuXBdi4BeQy/hE=; b=A4cXwGd3c2jOFc7ycxgH0Zll+3XjBBoWAcBONX4nCEszIdgl5S9QtamdmQBYMy9rZf CeqyLnZpUTpLKifUsD8EoQKxip/xZeUe+1oMgXSDHzUsZWtvZzWqLIsvkv204FrG7REO CFn9QwNkxlAXtU/kbT3rmlNX9LQ9ARCwXH1tVBVLDg9AoOquxM8DuQH96Q009vlI67Ob iJlZMtSdMwzcQoBU2Y3AS6cF2WMrVhmJ5DGQ4v0T5LjoYpXOpjEDefJDWgq6qmfBvD2F vvThmQTNNCyyYy+HIYz8QunRMi1a8175C+nqVZuqr2vFs1Q/x4i8RawXA6CQIFpUm7JR 5vKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uGLJ7i/p5E1E+wg7EQ9bcA7N/E6MhFuXBdi4BeQy/hE=; b=N8eqV+gAydBXJJl+FmcyE++1SjE04GuHXY/39xAMui/bg0w3YRqOhh0p9m1JThbp0X gHPPeZ1drOpAz0sn4PfArflntxqnkm0ODi9ZZUrKgTFHeh/1r1oB4R71RRjohH7ff1f2 PWxwQU+SglVdeTipxOxvFsb+N+BBkDIDUokIYbCkBEQsPlEcyCpouuzRDxSSVj6WJFXz sbrRXI4YNGn/IGvo9Z7gzKnPKP7a6M06V7G9/j5bY+lxqH7bGZmnutlR99JsnBt0QDEV UZW2W4MDQr0K7XeAn4YEhpxvpYXwkl1Nz0JkqW5a5VbPwlXwsp7R4Vo9jjD7wQsVx/EE dXKQ== X-Gm-Message-State: AEkoousAr2Kz//TWG/asGoBm8FHeh56Mh3Df+847EPRvHc69yGUldgMhFCg5Of/NqNLRbLh1 X-Received: by 10.28.32.15 with SMTP id g15mr19723459wmg.25.1470738578260; Tue, 09 Aug 2016 03:29:38 -0700 (PDT) Received: from zoidberg.home (LFbn-1-1885-126.w90-73.abo.wanadoo.fr. [90.73.182.126]) by smtp.gmail.com with ESMTPSA id c139sm2624994wme.4.2016.08.09.03.29.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Aug 2016 03:29:37 -0700 (PDT) From: Neil Armstrong To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sudeep.holla@arm.com Subject: [RFC PATCH v3 3/8] scpi: Add vendor_send_message to enable access to vendor commands Date: Tue, 9 Aug 2016 12:29:17 +0200 Message-Id: <1470738562-20026-4-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470738562-20026-1-git-send-email-narmstrong@baylibre.com> References: <1470738562-20026-1-git-send-email-narmstrong@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160809_033000_465720_B5F37E2B X-CRM114-Status: GOOD ( 11.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heiko@sntech.de, Neil Armstrong , frank.wang@rock-chips.com, khilman@baylibre.com, linux-amlogic@lists.infradead.org, wxt@rock-chips.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Adds an optional vendor_send_message to the scpi to enable sending vendor platform specific commands to the SCP firmware. Signed-off-by: Neil Armstrong --- include/linux/scpi_protocol.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/scpi_protocol.h b/include/linux/scpi_protocol.h index 8e21e3a..dd5d81d 100644 --- a/include/linux/scpi_protocol.h +++ b/include/linux/scpi_protocol.h @@ -58,6 +58,8 @@ struct scpi_sensor_info { * OPP is an index to the list return by @dvfs_get_info * @dvfs_get_info: returns the DVFS capabilities of the given power * domain. It includes the OPP list and the latency information + * @vendor_send_message: vendor specific message sending, arg can specify + * a scpi implementation specific argument */ struct scpi_ops { u32 (*get_version)(void); @@ -72,6 +74,9 @@ struct scpi_ops { int (*sensor_get_value)(u16, u64 *); int (*device_get_power_state)(u16); int (*device_set_power_state)(u16, u8); + int (*vendor_send_message)(u8 cmd, unsigned long arg, + void *tx_buf, unsigned int tx_len, + void *rx_buf, unsigned int rx_len); }; #if IS_REACHABLE(CONFIG_SCPI_FW)