Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030312AbdLSLFS (ORCPT ); Tue, 19 Dec 2017 06:05:18 -0500 Received: from mail-oi0-f44.google.com ([209.85.218.44]:46107 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761850AbdLSLFH (ORCPT ); Tue, 19 Dec 2017 06:05:07 -0500 X-Google-Smtp-Source: ACJfBovAM7r8eFz7OHPszBcskWoO+sGlcHe2C5s8jFlol6jZhA43YMXvxvIua3TZOtfzlx1HcDansWDAhsgFWkJV2qQ= MIME-Version: 1.0 In-Reply-To: <20171219092149.GB8563@sirena.org.uk> References: <87ec50c846bbc7afc09ba0855aba1cdea6473308.1512048582.git.baolin.wang@linaro.org> <20171215104204.p7i27sen77ohbmzi@dell> <20171219092149.GB8563@sirena.org.uk> From: Baolin Wang Date: Tue, 19 Dec 2017 19:05:06 +0800 Message-ID: Subject: Re: [PATCH v6] mfd: syscon: Add hardware spinlock support To: Mark Brown Cc: Arnd Bergmann , Lee Jones , Rob Herring , Mark Rutland , Linux Kernel Mailing List , DTML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1028 Lines: 24 On 19 December 2017 at 17:21, Mark Brown 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