Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2493075ybb; Fri, 27 Mar 2020 06:39:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs6RUZgzB2A0vRzPnjalGiWD6/l9+TMno/e68S/HU0tX7YwY0JfEdQJWGoOPLO88aKXRYY5 X-Received: by 2002:a9d:5a15:: with SMTP id v21mr1020126oth.138.1585316391615; Fri, 27 Mar 2020 06:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585316391; cv=none; d=google.com; s=arc-20160816; b=mmbcAyfyU0WZrE9pHGwTRasSbbZJGZXHd9Qux/DkSuGFWZ0x/4i1peX44sD3/6eLEP iTuCpqiC0MDqi4K9IWf0+oM2rUt2nCaRrPtL/bLhKLvxZ7u46AP8vnTEv/m1a6GuWFlz vkOsF1l2wGba374ct4XxZukW/0T9vUd8P4lPokQZEKRBDykILpS+BPdrCnKG9NCkC5bQ jxeeFzmGm5Uo27iKR2T1s+c6B6yDu00nX2fDs+r6z2QpHVkOuc2zZOX+NosQhXWXfdM4 zLnUPxf51QDUyL0PRrvqWCb5uwcAJaUcZI722DfJD6l2JdMrwyvCp5OQPa/sF+L2Xpzq Axxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=34VhHnVfQfCxnUAIZ8aanvohxvRx0Xe7SWZvIT0s5dU=; b=HgW6O7ychuZT/H6unHIvRcrmxR6oT+BTsz1/zQ8HHdfTPsaBWLlVFe+eB1vyloztCM eGXnsIl3YpIyKFrCrMw643tokHzyluXqnCxORNGD9mWHszhQBFyK1xNYwuNXXkJiI61s jfgZPjNL5HtFt3shhqNjr7rRz5r6OmZ0kjDxEqBgADanDppQjdWfzQq0LKBYSY69mAvu dSY1+YfLJmAORPVs1gLzrXeqe84ImQd3iDIm8etEm2YSmVMV1OtGQhO5Eu9HKD7oFAND /isjdK0wzlgNIGumsSAypIByLjvTC9aEZoPFCZxDmu1gU7d5I1W5V/5dlQuTb7Q5nvxc xCKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kiGSVCIX; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f46si2394917otf.146.2020.03.27.06.39.37; Fri, 27 Mar 2020 06:39:51 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=kiGSVCIX; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727322AbgC0NiE (ORCPT + 99 others); Fri, 27 Mar 2020 09:38:04 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39277 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbgC0NiD (ORCPT ); Fri, 27 Mar 2020 09:38:03 -0400 Received: by mail-lf1-f67.google.com with SMTP id h6so2104363lfp.6; Fri, 27 Mar 2020 06:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=34VhHnVfQfCxnUAIZ8aanvohxvRx0Xe7SWZvIT0s5dU=; b=kiGSVCIXBmiFG+Jwwm9T3FaTwCD64GutramKXcjpM2OEauD/AtMI8qnPyFBqt3OdTE Sm1zEdRlh0tqe6VorFmw7aO4OpsnGxTNOmK8n9r8gBYgWK6+gknRCgDRnjdW/XYNnJso qSQA1ZygeK+KHpyOeiiWLhj/gwIjwfkWuZ36c6JHCCLEnILkUMcz9RI2ubTqL5nVyNkP xuSySsqUjXDKFk/waIk+5TJkdVfCM5opGRqTm2DTqPcbBDIPQ6TX8AU2ijRdhv+AyegI /XGWSVZujj0oXL+CIETJ48GeqY2tV++cn2kDzSafb5u7MTufaGCCk0DUJMNXLc/x8Ndu yU0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=34VhHnVfQfCxnUAIZ8aanvohxvRx0Xe7SWZvIT0s5dU=; b=k6JR3HHjwT0CQhzwFGr1PeWEjQv9wbpBPVhy+lU5Y8PgMsV5wRfITGP2gZia+bJ1hc VxLBDMrPysADoMrxmEejXIglfndVW7yDJzMGlQqMfAL7UOtDQlwi/imLa48mOmDXXVjB JYYnqavvQWgC17FxHLp59moLx3Z70kVujC1XZFxGIsSWh6hv7+/LhopwIjlHAMJSs9At jul1nN8sfYDBuTk3ghrUzCjlZvdGpiTawlOw0++a5l/l9Dr8KwmB0pdzKKSTMDI+w642 hY8pYc0L1t89oQ0GGKbdCCuCj3llDTp7znIIVhvX8NEVwIblz4Z061b15RQYoZ1f308A ovMw== X-Gm-Message-State: ANhLgQ12e/L0PCiejXLDEpQS6O5YC7QYuYnJj6VCyUDtFiUR6aWvPlS7 Xghp15mOk6B/w6ckBJAEp7c= X-Received: by 2002:a19:22cf:: with SMTP id i198mr9492426lfi.199.1585316281818; Fri, 27 Mar 2020 06:38:01 -0700 (PDT) Received: from [192.168.2.145] (ppp91-78-208-152.pppoe.mtu-net.ru. [91.78.208.152]) by smtp.googlemail.com with ESMTPSA id i7sm3031011ljg.99.2020.03.27.06.38.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Mar 2020 06:38:00 -0700 (PDT) Subject: Re: [PATCH v9 52/55] input: touchscreen: atmel_mxt_ts: Added sysfs entry for touchscreen status To: "Wang, Jiada" , nick@shmanahar.org, dmitry.torokhov@gmail.com, jikos@kernel.org, benjamin.tissoires@redhat.com, bsz@semihalf.com, rydberg@bitmath.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, erosca@de.adit-jv.com, Andrew_Gabbasov@mentor.com References: <20200325133334.19346-1-jiada_wang@mentor.com> <20200325133334.19346-53-jiada_wang@mentor.com> <4aeda6f1-25d8-9437-5cd0-560e43dbe081@gmail.com> From: Dmitry Osipenko Message-ID: <5b03bf10-d4f1-fb3d-4561-1097630c195a@gmail.com> Date: Fri, 27 Mar 2020 16:37:59 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 27.03.2020 15:49, Wang, Jiada пишет: >>> +static void mxt_watchdog_work(struct work_struct *work) >>> +{ >>> +    struct mxt_data *data = >>> +        container_of(work, struct mxt_data, watchdog_work); >>> +    u16 info_buf; >>> +    int ret = 0; >>> +    u8 size = 2; >> >>> +    if (data->suspended || data->in_bootloader) >>> +        return; >>> + >>> +    ret = __mxt_read_reg(data->client, 0, size, &info_buf); >> >> Looks like this need to be protected with a lock to not race with the >> suspending / bootloader states. >> > right, I will add lock in next version Alternatively, maybe the watchdog_work could be just stopped in suspended / bootloader states.