From patchwork Tue Dec 10 14:53:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 181136 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp5606690och; Tue, 10 Dec 2019 06:55:03 -0800 (PST) X-Google-Smtp-Source: APXvYqy8385m5WlRt3EUyP49W9JDmYdvQzbliv7X9g+Md+15yP4K8ik4Lqcu14b+a3fEgtwkYGjd X-Received: by 2002:a05:6808:64d:: with SMTP id z13mr4372435oih.104.1575989703869; Tue, 10 Dec 2019 06:55:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575989703; cv=none; d=google.com; s=arc-20160816; b=xFoloHhBTeY4aFAIQr8Kdl9BienuJp9E6I9wWN3EDPLDpFT/dcSCH1dnDWi5H0a/I5 1LF3RhMTkYm7QJcssdavPgtWleJ9ivoxEZoyHPvp8JcTLOyyuaZ4n630xcNcE49AOyZN neHMB1QyJ0b+xoXazvZ3ia02/BvxHVGRKK2MpV4601ev3201b++HFAm8BB3QjPybb3UM /bXMUy9RNe454qDF0RqngcGby6+v7dsi0j5/VSlCg9BhJVl6ShUrjbc4fVITnespcJ9U DEeaWvAHKI7orPfrMli9at6HfqI2K0bEHWFmWGOx+nW2ZD+G0yZ6BJDkKJLj9aqa84Vf mqgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Voqq4HHwyoWr4fBuqBlylOOP8HHZGcsjBYmO6hZ9WlM=; b=zBX9Zjr/Ct5yRCKXvFnHliYr/PW04cX24w3R+yP/2/2AmxaSgxEkzznqenBBCQFxBf c3OhhjZ3WnwNT6kmKUNqNPVT5vRfKvMKOGmo65h0NuC4zAwXehp7ckkQe5CqtEh8VVnZ rZEP+RiDyd9frPOl58rMkaNWtmo2OQCBSsTrJLBw/Y1mrr/sIfhwjNH1gCxdVgU838uY Hh2+Ckfq5ao71crUwUMue8xO09EfazXSamrufE3zoMWOkBuJV2kTQ0stn0jWYCeXTzpJ rtkDkLtWmCfj+PbQGwS33ti1QZsNNSdBY45Rwznqag+aYJs/MCeURD1j73poiSSwtLrA j1nA== ARC-Authentication-Results: i=1; mx.google.com; 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 y23si2020624oti.65.2019.12.10.06.55.03; Tue, 10 Dec 2019 06:55:03 -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; 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 S1727852AbfLJOzC (ORCPT + 27 others); Tue, 10 Dec 2019 09:55:02 -0500 Received: from foss.arm.com ([217.140.110.172]:47102 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727602AbfLJOyF (ORCPT ); Tue, 10 Dec 2019 09:54:05 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D02F2113E; Tue, 10 Dec 2019 06:54:04 -0800 (PST) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2B6B13F67D; Tue, 10 Dec 2019 06:54:04 -0800 (PST) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Cristian Marussi Subject: [PATCH 00/15] firmware: arm_scmi: Add support for multiple device per protocol Date: Tue, 10 Dec 2019 14:53:30 +0000 Message-Id: <20191210145345.11616-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently only one scmi device is created for each protocol enumerated. However, there is requirement to make use of some procotols by multiple kernel subsystems/frameworks. One such example is SCMI PERFORMANCE protocol which can be used by both cpufreq and devfreq drivers. Similarly, SENSOR protocol may be used by hwmon and iio subsystems, and POWER protocol may be used by genpd and regulator drivers. This series adds support for multiple device per protocol using scmi device name if one is available. It also updates existing drivers to add scmi device names to driver id tables. Regards, Sudeep Sudeep Holla (15): firmware: arm_scmi: Add support for multiple device per protocol firmware: arm_scmi: Skip scmi mbox channel setup for addtional devices firmware: arm_scmi: Skip protocol initialisation for additional devices firmware: arm_scmi: Add names to scmi devices created firmware: arm_scmi: Add versions and identifier attributes using dev_groups firmware: arm_scmi: Update scmi_prot_init_fn_t to use device instead of handle firmware: arm_scmi: Stash version in protocol init functions firmware: arm_scmi: Add and initialise protocol version to scmi_device structure firmware: arm_scmi: Add scmi protocol version and id device attributes firmware: arm_scmi: Drop logging individual scmi protocol version firmware: arm_scmi: Match scmi device by both name and protocol id clk: scmi: Match scmi device by both name and protocol id cpufreq: scmi: Match scmi device by both name and protocol id hwmon: (scmi-hwmon) Match scmi device by both name and protocol id reset: reset-scmi: Match scmi device by both name and protocol id drivers/clk/clk-scmi.c | 2 +- drivers/cpufreq/scmi-cpufreq.c | 2 +- drivers/firmware/arm_scmi/bus.c | 53 +++++++++++-- drivers/firmware/arm_scmi/clock.c | 15 +++- drivers/firmware/arm_scmi/driver.c | 92 +++++++++++++++++++++- drivers/firmware/arm_scmi/perf.c | 15 +++- drivers/firmware/arm_scmi/power.c | 15 +++- drivers/firmware/arm_scmi/reset.c | 15 +++- drivers/firmware/arm_scmi/scmi_pm_domain.c | 2 +- drivers/firmware/arm_scmi/sensors.c | 15 +++- drivers/hwmon/scmi-hwmon.c | 2 +- drivers/reset/reset-scmi.c | 2 +- include/linux/scmi_protocol.h | 8 +- 13 files changed, 202 insertions(+), 36 deletions(-) -- 2.17.1 Acked-by: Viresh Kumar