Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp215505pxf; Thu, 25 Mar 2021 02:17:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDUmuezXliBEItEnHU0goe0zZEyQXgPaRK0xK2jLwCtWBDBqsyJg3o0LQxFg0SDrsJY6g2 X-Received: by 2002:a05:6402:2070:: with SMTP id bd16mr7881277edb.133.1616663848203; Thu, 25 Mar 2021 02:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616663848; cv=none; d=google.com; s=arc-20160816; b=M8r7xwBDhvGxJtCG5o9GpxYtrdm7Mhoy4rael2JzfJKKdV3JIe2av+Sq6U6zyqOrrA I3+LMtwuJOMhICOSGrC/8Nh+pXLIeZxoEqn2sDWs+IOx2pVPsgAfWNW9nNTB4aJsl9SG z4dyPboh3D8FArJbOrFFZk7PMAxJ0coZsbjrOnSDMMFzS5J1N0jvqHNK7tQI2CpJbfiv Ves2uLSkSNFzqfUy0LR/Ld3nmFN20MLqbhq3cfRRlEH+/aZqLsBLFwHB+4rAyOSMPLu3 eSkgbWA62TN78Lb0/OgyXf7Zf88zFxtgmU/B2FOnivwD7LG8DtB1801V4Nj31F7l6DBZ HLSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jQSUS0sWefxNSCHEC1KdchHT6ruHmXruWSe0jguDBe4=; b=rYqZUHg8CTrwa00hc8I2wvZDPT/DgQ6fZmQ67z6ixnT3/j/cs1d4NgG2FgxCtkD42d 8s5de5dJsjpo5jQVtzQudJSioLWXfdIHpr+ZBRncjs1lHA3W7dqY31O43SM0MC4cKlyr P4IesEotN5CLDPjbCpS4KUBvijiKy1KLbqMKoJMGJVJiL0XVoF5tymL7aYE4e3RMHmHz aHkaYX0D7NeDZM+2+/CPkHOh8SnNesaaVML0Wa3AqbhzZdZg5et/OhAoO8TiRUj7iWdz JavNaZXLAPpOcoaRrffVKr5LOt5CIbr8ZRBlN58d+kCCinjoweUZ/Tz626yUt60Bab/I zC/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o57KpS/S"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id v25si3838517ejw.423.2021.03.25.02.17.05; Thu, 25 Mar 2021 02:17:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o57KpS/S"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230006AbhCYJPz (ORCPT + 99 others); Thu, 25 Mar 2021 05:15:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbhCYJPb (ORCPT ); Thu, 25 Mar 2021 05:15:31 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E734C06174A for ; Thu, 25 Mar 2021 02:15:31 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id w37so1409393lfu.13 for ; Thu, 25 Mar 2021 02:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jQSUS0sWefxNSCHEC1KdchHT6ruHmXruWSe0jguDBe4=; b=o57KpS/SVqgB4aa8+prMDX4/0f/sQZGpgBQ8t5UkMLPn5Qn3CNlhP1s7Y7cH4Uk0Yt 5+aTgDlMtpj8VahIttojhrrqsMz/i3HQcvat2q+Z9IlJEJlzy4HXE35AMDJMbCm+Fwag qFIWd7dGn1Dkpw/9bBN+AjxUmjgcMmvYPGwu96VWRx3Jk3pOWVzsmR2MflpGxpsR/+zI 214Nl9OF95l2M2We75WAIh54bzfBMQE0D8P4KtGSM+lKlRhSnbRTreADGhK5Iq5E6anG Hinv7XgoNn7ofg5sU3fNhh/jDogg7F6goe/WLIVqPG5zG3KvOj4ZK71BAHaib2103KXC sl4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jQSUS0sWefxNSCHEC1KdchHT6ruHmXruWSe0jguDBe4=; b=BEuE+vnOJMecu+ub0ZAMd/m2j2QaNap77WqpFt7B9eeIhTHJG9qOEYBOrH3bhFfuIH QCAzGjRybmQ3kakngn/olyLcB02WHbSk0tmvoIcsgbe/s6/Ehdma4cv/Nu9axb+C+j36 zFTAt7kgGotO40160bG5l2AdLNtN47wm25cNNUZXmV2rvfubJX3442W546l6YNszSrcg Xw5MAeV17ZprF4taITXsf5E0/pgfJR+Pl9RXPXNFqnpwmPf00nR6KnUl2dO3eVM7q1E+ 5nODxgC9i4EngZ3SWipBFEWaiz4W395oS1j6ALjU5+OVe1UhodiuKEK13J6mXGvuaO8+ RAIg== X-Gm-Message-State: AOAM533yqyOekJehe/vQl+TabdqXPDLHyPxIt+wbyaATmbzxKodnxBsj wxqZkh7WEBRv2MhRSb7+ILdu+5dw/magF3FE3Xflxw== X-Received: by 2002:a19:548:: with SMTP id 69mr4426509lff.465.1616663729558; Thu, 25 Mar 2021 02:15:29 -0700 (PDT) MIME-Version: 1.0 References: <20210321033150.15380-1-zhiyong.tao@mediatek.com> <20210321033150.15380-2-zhiyong.tao@mediatek.com> In-Reply-To: <20210321033150.15380-2-zhiyong.tao@mediatek.com> From: Linus Walleij Date: Thu, 25 Mar 2021 10:15:18 +0100 Message-ID: Subject: Re: [PATCH] pinctrl: add lock in mtk_rmw function. To: Zhiyong Tao Cc: Rob Herring , Mark Rutland , Matthias Brugger , Sean Wang , srv_heupstream@mediatek.com, hui.liu@mediatek.com, huang eddie , jg_poxu@mediatek.com, Biao Huang , Hongzhou Yang , Erin Lo , Sean Wang , seiya.wang@mediatek.com, sj.huang@mediatek.com, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , Linux ARM , "moderated list:ARM/Mediatek SoC support" , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 21, 2021 at 4:32 AM Zhiyong Tao wrote: > When multiple threads operate on the same register resource > which include multiple pin, It will make the register resource > wrong to control. So we add lock to avoid the case. > > Signed-off-by: Zhiyong Tao Patch applied! Yours, Linus Walleij