Re: [PATCH v6] mfd: syscon: Add hardware spinlock support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 19 December 2017 at 17:21, Mark Brown <broonie@xxxxxxxxxx> wrote:
> On Tue, Dec 19, 2017 at 02:55:47PM +0800, Baolin Wang wrote:
>
>> Um, why regmap doesn't accept a zero lock-id, that because regmap will
>> reguest hwlock depending on the 'regmap_config->hwlock_id' is not
>> zero, if regmap regard a zero lock-id as valid which will affect other
>> 'struct regmap_config' definition. So users should not assign the zero
>> lock-id to regmap.
>
>> Now of_hwspin_lock_get_id() can return 0 as valid, which depend on
>> what is the base id registered by hwspinlock driver. So you think we
>> should not regard 0 as valid from of_hwspin_lock_get_id(), I can try
>> to send another patch to fix.
>
> If 0 is a valid hwspinlock ID you need to add a flag to the regmap
> config to say if a hwspinlock should be used.  That way we're not
> rejecting valid values.

Fine, that seems reasonable if you prefer another new flag to indicate
if a hwspinlock should be used. Thanks Arnd and Mark's comments.

-- 
Baolin.wang
Best Regards
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux