From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sagar Dharia Subject: Re: [PATCH 1/3] SLIMbus: Device management on SLIMbus Date: Thu, 18 Jun 2015 21:48:39 -0600 Message-ID: <55839117.4010005@codeaurora.org> References: <1434260958-13732-1-git-send-email-sdharia@codeaurora.org> <1434260958-13732-2-git-send-email-sdharia@codeaurora.org> <558336E1.5070404@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:55455 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752261AbbFSDsp (ORCPT ); Thu, 18 Jun 2015 23:48:45 -0400 In-Reply-To: <558336E1.5070404@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Srinivas Kandagatla , gregkh@linuxfoundation.org, broonie@kernel.org, linux-kernel@vger.kernel.org, bp@suse.de, poeschel@lemonage.de, treding@nvidia.com, gong.chen@linux.intel.com, andreas.noever@gmail.com, alan@linux.intel.com, mathieu.poirier@linaro.org, daniel@ffwll.ch, oded.gabbay@amd.com, jkosina@suse.cz, sharon.dvir1@mail.huji.ac.il, joe@perches.com, davem@davemloft.net, james.hogan@imgtec.com, michael.opdenacker@free-electrons.com, daniel.thompson@linaro.org, nkaje@codeaurora.org Cc: kheitke@audience.com, mlocke@codeaurora.org, agross@codeaurora.org, linux-arm-msm@vger.kernel.org Hi Srini Thank you for the review. On 6/18/2015 3:23 PM, Srinivas Kandagatla wrote: > Hi Sagar, > > On 14/06/15 06:49, Sagar Dharia wrote: >> 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. >> The framework supports multiple instances of the bus (1 controller per >> bus), and multiple slave devices per controller. >> >> This patch does device enumeration, logical address assignment, >> informing device when the device reports present/absent etc. >> Reporting present may need the driver to do the needful (e.g. turning >> on voltage regulators powering the device). So probe is called >> if the device is added to board-info list for a controller. >> Additionally device is probed when it reports present if that device >> doesn't need any such steps mentioned above. >> >> Signed-off-by: Sagar Dharia >> --- >> drivers/Kconfig | 2 + >> drivers/Makefile | 1 + >> drivers/slimbus/Kconfig | 9 + >> drivers/slimbus/Makefile | 4 + >> drivers/slimbus/slimbus.c | 767 >> ++++++++++++++++++++++++++++++++++++++++ >> include/linux/mod_devicetable.h | 13 + >> include/linux/slimbus.h | 393 ++++++++++++++++++++ >> 7 files changed, 1189 insertions(+) >> create mode 100644 drivers/slimbus/Kconfig >> create mode 100644 drivers/slimbus/Makefile >> create mode 100644 drivers/slimbus/slimbus.c >> create mode 100644 include/linux/slimbus.h >> > > Good to see the slimbus patches :-) > > Can you also add patch to add MAINTAINERS to this? > > I like to try these patches on APQ8064 or any upstream Qcom platform, > Do you have other patches to test this on APQ8064 or any A family > SOCs/ B family SOCs which have upstream support? I am testing this IFC6410 (APQ8064 based platform). I've the test-ioctl module that's work-in-progress. But to do some device-management like logical address assignment, you don't really need it (only this framework, and controller should be okay) since slimbus HW components inside the SOC reports present, enumerates when it boots. The IOCTL module binds to one of those devices, and makes sure probe, device-up, remove happen as expected. > > Also I keep getting lost as I start looking at code, Am missing > understanding of how these exported functions are going to be used by > consumers/clients/controllers? > It would help if > 1> document which explains how these apis are supposed to be used. > 2> split up this patch into small patches, so that you can get good > review comments. I have already split the files and have uploaded only device-management in this patch. This can't really be further broken while providing some useful functionality. There are in-fact multiple other patches coming up as described in the cover-letter. I will try to provide documentation (call-flows etc) next week when I upload next set of patches, and take care of some of comments you have given below. Thanks Sagar -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation