Re: [PATCH v4] hwspinlock: qcom: Add support for Qualcomm HW Mutex block
From: Bjorn Andersson <hidden>
Date: 2014-09-30 22:14:35
Also in:
linux-arm-msm, lkml
On Tue 30 Sep 14:48 PDT 2014, Suman Anna wrote:
Hi Bjorn,
Thanks for the review, I didn't find the generic binding until after I sent this out.
On 09/29/2014 11:35 PM, Bjorn Andersson wrote:
[..]
quoted
diff --git a/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt
[..]
quoted
+- qcom,num-locks: + Usage: required + Value type: <u32> + Definition: the number of locks/mutex available in this blockPlease use the common hwlock-num-locks property defined in the common bindings, instead of a qcom specific property name.
I'll update this and send out a new version as soon as the generic binding have settled.
quoted
+ +Example: + + hwlock@fd484000 { + compatible = "qcom,tcsr-mutex"; + reg = <0xfd484000 0x1000>; + reg-names = "mutex-base"; + qcom,num-locks = <32>;You also need to add the #hwlock-cells = <1>, without which you won't be able to parse a client user's lock id.
Yeah, I noticed. [..]
quoted
diff --git a/drivers/hwspinlock/qcom_hwspinlock.c b/drivers/hwspinlock/qcom_hwspinlock.c
[..]
quoted
+static int qcom_hwspinlock_probe(struct platform_device *pdev) +{
[..]
quoted
+ + ret = hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops, + BASE_ID, num_locks);I had also done the registration for OMAP hwspinlock driver using a constant id in my v5, but had revised it based on Ohad's review comment, so you may have to revise here as well. Please see [1] for details.
Okay, I can add that too.
quoted
+ if (ret) + pm_runtime_disable(&pdev->dev); + + return ret; +} +
[..]
[1] https://patchwork.kernel.org/patch/4096881/
Regards, Bjorn