Re: [PATCH 1/3] SLIMbus: Device management on SLIMbus

From: Sagar Dharia
Date: Thu Jun 18 2015 - 23:48:58 EST


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 <sdharia@xxxxxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/