Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp142728imu; Wed, 7 Nov 2018 22:44:32 -0800 (PST) X-Google-Smtp-Source: AJdET5dmDTfYlSLrkPlGELgDGLB3KSqzmGs08qc5ZPYqumdvzyiNsFE0T+p4mNO7iFh4+z8QM6dd X-Received: by 2002:a63:4665:: with SMTP id v37mr2874438pgk.425.1541659472146; Wed, 07 Nov 2018 22:44:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541659472; cv=none; d=google.com; s=arc-20160816; b=fRY0lc0Q0H+op6qZSg32GVTFyydSiKTzaDGmwvTdpVzC9VNCHebOk0kZoTucIkfKSk FpwHreV7PIrn9E2i/qE7kCMf6xN7xq1Syq/JAV1QrE31FQ2wMwyO3yx3ti1mgprTW5f0 5ZOTzcFSNPa6ZEXGTU4EyWOdhLTVoRPyzUFBFhZMhlCQ53PBTwkbn4T954lZAgqmdnpF fP04niZs0FymVeD4FhDtor0POtLwElGqPKYrNuaPD1yrD6HX3Sfj6Gjq24dp274L2vGy 3BDg2Igx4xYF3vKV3O+LT3/usnOlLLnghI59qlo+Iuejra6GkAEWscJ4UdfZblsaL3Qw vdwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ImWfqAgLxY3HQ/tm7TK4IQzGtz5NhygKjUEhDAWLQz0=; b=nb4rMxkeEi8DiTqmJSCpEsvCfFmurl90oJoqPVHkU1b/jlbA1Lo0wBHR6Klgxj9HRx 0WxwHpDqdaeH2hs95QcyFP/twArPtsA0FgrDyM6W78CkNjUGLkxBe7gYPu8kms0O83ry gO0mIM2KEejTDcURGmW7jrr3M7OnMu+RsCmPW3a3ZcOzcyULMBEmKCbcOmbO09wqR4iB HLub7T2LHIxoAztUtBopHuS8ixibElf4NHsihrZs3FPc3Y4ncftt2hkPETWQo9hhSQTS NGXzZWaqsEY61BWf7onnNEo3rHv56WhGDpm598U22/jQOI9622ZKkkmjQChzLuac9cwW JO9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PKOq2TG9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l63-v6si3190499plb.385.2018.11.07.22.44.17; Wed, 07 Nov 2018 22:44:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PKOq2TG9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726806AbeKHQRv (ORCPT + 99 others); Thu, 8 Nov 2018 11:17:51 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46115 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbeKHQRv (ORCPT ); Thu, 8 Nov 2018 11:17:51 -0500 Received: by mail-pl1-f196.google.com with SMTP id c13-v6so9060406plz.13 for ; Wed, 07 Nov 2018 22:43:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ImWfqAgLxY3HQ/tm7TK4IQzGtz5NhygKjUEhDAWLQz0=; b=PKOq2TG99CkefDfL7G1e3sJ0lcAlGPzcoNMFgHTG35fzhR49IRonBFSrj+bhBzQrQc 5FEnhBgNIbgDAUSYSx/LFfZKxRrwTs36KuI4Hs1dfKXU3Y1rFl10qNtEQD/53U2WVueZ 93gSJQ4t8LLFOkPD6hjvIhRljUYcBqRe22mjU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ImWfqAgLxY3HQ/tm7TK4IQzGtz5NhygKjUEhDAWLQz0=; b=RhIb8zHnrSAksVAPbHak4JpPpgomj6/zY3tMuU3ScAiv8C04HsOx9OsjQDhMydGs53 Q6TuLnz7LmYJAQk6T1eKLMJnDT1q7BNDzt2CPjVHdjrqWAUvXxSpNu740COKxUZYvU69 w7Z1FU2f1v+/d6Fze+4garCR/x7Yhd1B6Xx3+6FIuBy+FRsABw2pGUh6yY6kGUXE5Kol f25TMz/JfgiL+QjvWkN9CujS0fmDSUfPUKAYGVr8GB1pHvyKQskmEkqWGrNHTZguqBP6 3vm4AjzBPi0x5Vu9/Kd/nc6vmZsH8B734lYSH1we92YVlnzHIIB7LrggYbEXHdTyHAz7 /KFg== X-Gm-Message-State: AGRZ1gJXfbS4yg/DvcqtrE6NYndG1Wq0EHDwWt8b3QkXd+X3DoVC5bKp 7IE+oh3DZqlKShxB47g+Vu83/Q== X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr3420993plg.108.1541659431146; Wed, 07 Nov 2018 22:43:51 -0800 (PST) Received: from builder (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id x14-v6sm2909421pfe.178.2018.11.07.22.43.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Nov 2018 22:43:50 -0800 (PST) Date: Wed, 7 Nov 2018 22:47:35 -0800 From: Bjorn Andersson To: Benjamin Gaignard Cc: ohad@wizery.com, robh+dt@kernel.org, mark.rutland@arm.com, alexandre.torgue@st.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Benjamin Gaignard Subject: Re: [PATCH 2/5] hwspinlock: add STM32 hwspinlock device Message-ID: <20181108064735.GB12063@builder> References: <20181031093032.20386-1-benjamin.gaignard@st.com> <20181031093032.20386-3-benjamin.gaignard@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181031093032.20386-3-benjamin.gaignard@st.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 31 Oct 02:30 PDT 2018, Benjamin Gaignard wrote: > diff --git a/drivers/hwspinlock/Kconfig b/drivers/hwspinlock/Kconfig > index e895d29500ee..e1a20b460590 100644 > --- a/drivers/hwspinlock/Kconfig > +++ b/drivers/hwspinlock/Kconfig > @@ -59,3 +59,12 @@ config HSEM_U8500 > SoC. > > If unsure, say N. > + > +config HWSPINLOCK_STM32 Please keep these alphabetically sorted. > + tristate "STM32 Hardware Spinlock device" > + depends on MACH_STM32MP157 > + depends on HWSPINLOCK > + help > + Say y here to support the STM32 Hardware Spinlock device. > + > + If unsure, say N. > diff --git a/drivers/hwspinlock/Makefile b/drivers/hwspinlock/Makefile > index b87c01a506a4..c0a9505b4dcf 100644 > --- a/drivers/hwspinlock/Makefile > +++ b/drivers/hwspinlock/Makefile > @@ -9,3 +9,4 @@ obj-$(CONFIG_HWSPINLOCK_QCOM) += qcom_hwspinlock.o > obj-$(CONFIG_HWSPINLOCK_SIRF) += sirf_hwspinlock.o > obj-$(CONFIG_HWSPINLOCK_SPRD) += sprd_hwspinlock.o > obj-$(CONFIG_HSEM_U8500) += u8500_hsem.o > +obj-$(CONFIG_HWSPINLOCK_STM32) += stm32_hwspinlock.o Ditto. > diff --git a/drivers/hwspinlock/stm32_hwspinlock.c b/drivers/hwspinlock/stm32_hwspinlock.c > new file mode 100644 > index 000000000000..6a0fafac7389 > --- /dev/null > +++ b/drivers/hwspinlock/stm32_hwspinlock.c > @@ -0,0 +1,147 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (C) STMicroelectronics SA 2018 > + * Author: Benjamin Gaignard for STMicroelectronics. > + * License terms: GNU General Public License (GPL), version 2 Didn't you already state your license terms with the SPDX header above? > + */ [..] > +static int stm32_hwspinlock_remove(struct platform_device *pdev) > +{ > + struct stm32_hwspinlock *hw = platform_get_drvdata(pdev); > + int ret; > + > + ret = hwspin_lock_unregister(&hw->bank); > + if (ret) { > + dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret); > + return ret; The return value of platform_device is ignored, so printing an error message is fine, but don't "abort". > + } > + > + pm_runtime_disable(&pdev->dev); > + > + return 0; > +} Regards, Bjorn