From patchwork Wed Nov 15 14:10:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 118955 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4364785qgn; Wed, 15 Nov 2017 06:13:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMZjq6sUmjK+kbHMOGVVKNfDwZAn59/t/pgzlDFLAdtW/HeFgTDCknjfraafvYt8hRSVlpzI X-Received: by 10.84.233.207 with SMTP id m15mr12782448pln.424.1510755208311; Wed, 15 Nov 2017 06:13:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510755208; cv=none; d=google.com; s=arc-20160816; b=LHCxeeQdv8/EAd334dAc06rATEaey+CJ37vX7F1KWXjaZcc/4DcoQbWuI0SDZRDLyf ESBOREXXISRazMOpeIARiGoL/KJuP0s6xKD4dBr7KkhYreHAAqEBQPfo++U+5/yVq83q QwPtIJDi9Y4CiNrmNPXAR7iuuYiTuoEsEzLMQ2sC2JLYgXEdShUWjcuuMZiIEmO0tq8L xc/34nWgpb8K6socmwx5vsQKMQoNxbG72i9pR4nwRgJtuoRnS35uYWE8NrOv/spkmR+3 C8QsUR/bDpyJ9uX6spsWYD8kSI7G6lM2ztkfElaVMCnTPf1ROFuIYXq3GWB1wZMfwM+p 3JcQ== 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 :dkim-signature:arc-authentication-results; bh=Mj25mO7+4Gka/i2f3liXZC0NWlzpcspt6qEcYqwhNhg=; b=vWLKF7OESpWpVzHlgsSKhew1PWq5IcyWHHd/fCoHhFPGoaRGUqrZ7LV54x4l4vcdkC z0DHFbNM3W1pR/p6oNXo1wKpTx+wJ1gvpgkoMl0iWk11dMBAWczUdCO9YHxQ3MLNDrss uzYSLVCF3GyJAUnY/wFhXTEqDIVjGmgcHxyaNQJtqU4HK6C557kGfDj7cVxev/uooi49 rYHMJk9OBV0FEvn+qwNYpf/4BaH0fgzJBeZownZ5K5SQPN8eSHwcS3uLNiuzB/0B/nBK 8Sf83Q7M6Q5c9Y72CxXB/UGx+8dnGwIi22fy3c8XT6kYdQJwJGY/Cb12tgVm4iCs24JD ZCNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=il2DiM6d; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e67si1326237pfg.204.2017.11.15.06.13.27; Wed, 15 Nov 2017 06:13:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=il2DiM6d; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757594AbdKOON0 (ORCPT + 10 others); Wed, 15 Nov 2017 09:13:26 -0500 Received: from mail-wr0-f175.google.com ([209.85.128.175]:49966 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752629AbdKOONZ (ORCPT ); Wed, 15 Nov 2017 09:13:25 -0500 Received: by mail-wr0-f175.google.com with SMTP id o88so20549225wrb.6 for ; Wed, 15 Nov 2017 06:13:24 -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=lIDFUuaCwnwzJ/IfGtRPuV0dqaZQ8Wwyl9oR8lcapnI=; b=il2DiM6dgemJcAb6iiSjhtaXlO4XXBXS6QcniS4hYDhdy4pz4JhLcHOjM509JNEdq3 Sp9P/Ss31fZFbkgcQUiBa354mCHNYviWlQORNmXs/C/4sapJ4bnVpbRhdTYhGOGV7uu2 hpVNDkOVnMeDe7YM6Q0A2MNs8uMen5v2yjZRw= 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=lIDFUuaCwnwzJ/IfGtRPuV0dqaZQ8Wwyl9oR8lcapnI=; b=VbsAO6yxO8dfE60wN9MiqUmpyMJH9FYqvNnw1mvIVC3KSd+nMyPUKR4nfFP7oeif3n T+d0pDTztgok2CzFw/U1PQgxZq/HrLqDKFPvrBNnW3x41onwBNck0+YTW0ihAGP2TmIQ 25WYF9b+kpADy/YLzlY6Cs10dgDH5PXFdt1hiUM1Fmi8Cq5gzGGaGVR19l15EMPvHitd sq5M99sN3Q8rEbadnXQmoTaGxuH7qhjlXOdBM+H1p0WzRofnKfK2C/bJd/tRCMKRq2OB FjGidRH3QG64U7VJ6e/AXCFAlLDKgO4W8JKZ8U+yBZwLyeoUcebIUHqRBEEMJFM7X2/x 808g== X-Gm-Message-State: AJaThX5/gX8FaBb05blfcenLB5XUw2VzQzgO71LraLolzHfFSzeeN8+g Vl5Mbdn3jT5OZSNx7elsCal+Tw== X-Received: by 10.223.171.91 with SMTP id r27mr12345829wrc.98.1510755203737; Wed, 15 Nov 2017 06:13:23 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id m11sm56707wrf.56.2017.11.15.06.13.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 06:13:23 -0800 (PST) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org, broonie@kernel.org, alsa-devel@alsa-project.org Cc: sdharia@codeaurora.org, bp@suse.de, poeschel@lemonage.de, treding@nvidia.com, andreas.noever@gmail.com, alan@linux.intel.com, mathieu.poirier@linaro.org, daniel@ffwll.ch, jkosina@suse.cz, sharon.dvir1@mail.huji.ac.il, joe@perches.com, davem@davemloft.net, james.hogan@imgtec.com, michael.opdenacker@free-electrons.com, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, vinod.koul@intel.com, arnd@arndb.de, Srinivas Kandagatla Subject: [PATCH v7 00/13] Introduce framework for SLIMbus device driver Date: Wed, 15 Nov 2017 14:10:30 +0000 Message-Id: <20171115141043.29202-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Srinivas Kandagatla Thanks for everyone who reviewed v6 patchset, here is v7 with review comments addressed. SLIMbus (Serial Low Power Interchip Media Bus) is a specification developed by MIPI (Mobile Industry Processor Interface) alliance. SLIMbus is a 2-wire implementation, which is used to communicate with peripheral components like audio-codec. SLIMbus uses Time-Division-Multiplexing to accommodate multiple data channels, and control channel. Control channel has messages to do device-enumeration, messages to send/receive control-data to/from slimbus devices, messages for port/channel management, and messages to do bandwidth allocation. Framework is introduced to support multiple instances of the bus (1 controller per bus), and multiple slave devices per controller. SPI and I2C frameworks, and comments from last time when I submitted the patches were referred-to while working on this framework. These patchsets introduce device-management, OF helpers, and messaging APIs, controller driver for Qualcomm's slimbus controller, and clock-pause feature for entering/exiting low-power mode for SLIMbus. Framework patches to do channel, port and bandwidth management are work-in-progress and will be sent out once these initial patches are accepted. These patchsets were tested on Qualcomm Snapdragon processor board using the controller driver, and a test slave device. v6: https://lwn.net/Articles/735693/ Changes from v6 to v7: * Various improvements in commenting style and kerneldoc suggested by various reviewers. * Removed usage of semaphores. * Split patches into more reviewable sizes. * Move buffer management into the controller driver. * use IDR for TID transactions. * use IDA for controller ids. * Remove lot of redundant code. * remove framer booted call for now, which can be added in future. * Added slim_readb/writeb and slim_read/write apis for simplified value element interface. Inspired by Soundwire patches. * Added slim device state so the the drivers which are probed after the device is announced, can get device state. * Lots of code cleanup. * move summary to .rst format. * move from callbacks to completions for async reads. * split slimbus.h into device and controller specific parts. Sagar Dharia (9): Documentation: Add SLIMbus summary dt-bindings: Add SLIMbus bindings slimbus: Add SLIMbus bus type slimbus: core: Add slim controllers support slimbus: Add messaging APIs to slimbus framework slimbus: Add support for 'clock-pause' feature dt-bindings: Add qcom slimbus controller bindings slimbus: qcom: Add Qualcomm Slimbus controller driver slimbus: qcom: Add runtime-pm support using clock-pause Srinivas Kandagatla (4): slimbus: core: add support to device tree helper regmap: add SLIMbus support slimbus: core: add common defines required for controllers MAINTAINERS: Add SLIMbus maintainer Documentation/devicetree/bindings/slimbus/bus.txt | 50 ++ .../devicetree/bindings/slimbus/slim-qcom-ctrl.txt | 43 ++ Documentation/driver-api/slimbus/index.rst | 15 + Documentation/driver-api/slimbus/summary.rst | 108 +++ MAINTAINERS | 8 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/base/regmap/Kconfig | 4 + drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-slimbus.c | 95 +++ drivers/slimbus/Kconfig | 22 + drivers/slimbus/Makefile | 9 + drivers/slimbus/core.c | 500 +++++++++++++ drivers/slimbus/messaging.c | 448 ++++++++++++ drivers/slimbus/qcom-ctrl.c | 791 +++++++++++++++++++++ drivers/slimbus/sched.c | 128 ++++ drivers/slimbus/slimbus.h | 276 +++++++ include/linux/mod_devicetable.h | 13 + include/linux/regmap.h | 18 + include/linux/slimbus.h | 167 +++++ 20 files changed, 2699 insertions(+) create mode 100644 Documentation/devicetree/bindings/slimbus/bus.txt create mode 100644 Documentation/devicetree/bindings/slimbus/slim-qcom-ctrl.txt create mode 100644 Documentation/driver-api/slimbus/index.rst create mode 100644 Documentation/driver-api/slimbus/summary.rst create mode 100644 drivers/base/regmap/regmap-slimbus.c create mode 100644 drivers/slimbus/Kconfig create mode 100644 drivers/slimbus/Makefile create mode 100644 drivers/slimbus/core.c create mode 100644 drivers/slimbus/messaging.c create mode 100644 drivers/slimbus/qcom-ctrl.c create mode 100644 drivers/slimbus/sched.c create mode 100644 drivers/slimbus/slimbus.h create mode 100644 include/linux/slimbus.h -- 2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html