Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8981664ybi; Tue, 23 Jul 2019 19:24:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrxOh5WBMsAyggCqkMvO66fBoDrCZqBi+9vMthjzyt6YWDyR8vNzzX4ZJIxhJgShzGnlcE X-Received: by 2002:a17:902:fe14:: with SMTP id g20mr79018051plj.54.1563935093023; Tue, 23 Jul 2019 19:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563935093; cv=none; d=google.com; s=arc-20160816; b=hVyfO3IeAkIDY9EGNATbBwYdO5514TObU7EsqjbXy+2H7LSltRe02t4kr3XFWTMTSG RxpPZdmr9BUPmarOAT6nfVn3W3K53kiYYpb8Sz+dQAgYm43RqyF3HJjO3sLJ9O9VRjJJ eQLhKRras736rDu/62XYxKorqYy1NBl9Z4CV05mWyUywsz1NYK5j+7TXduMxMp/LN+Vs ahUIjAsx3FxAsJvXJM2X9XquB9MQjJ7DiKsQsfnzQ/nQhAv9sVc4He6XTViQvQc+gq2n cy3Cg2w1Ah3U1ci1AJa3i0xdXQIC9m+gbiUPUfVb5zdqiHuOM537DG21yYiLiJoDWiSk mKRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=KgfRmlcrUJGTDhuXTiU2E03uzZT7aOuQamw3pXJdIpM=; b=ndgNWQLa5KUohk/EfffUuzoX9JGC/833lYnNOGjCYchNx07KgZCwDpMCN/4qds5Hbr xLVfGtoH1F8kOKrGSzM3i5Yznzk7qza9PFPdbucrAwB0ef0qUtqQzXWocDRkCTaA97MZ 52fL4SxtXJgGEZNq46w22CNqx7b6U2tYdBzwWPjLDaZKRkt2OdafLusYjCXzSmLJmJ8R VY360r3yvNlNXhMQD1oglX6SzuyVZATXa7GKrp/b4V6V7oFwgwoaETxSAN9l8UpB1XZw b3lc4+MThcPdd54ihZSpw/FPen+NpdQtCgFKnXwoz5ShWgHZHnnUAD7BPDbBdd6kVzlZ DShg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15si15092792pgn.178.2019.07.23.19.24.37; Tue, 23 Jul 2019 19:24:53 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390959AbfGWRCi (ORCPT + 99 others); Tue, 23 Jul 2019 13:02:38 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:40091 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731062AbfGWRCh (ORCPT ); Tue, 23 Jul 2019 13:02:37 -0400 Received: by mail-oi1-f193.google.com with SMTP id w196so11509311oie.7; Tue, 23 Jul 2019 10:02:37 -0700 (PDT) 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=KgfRmlcrUJGTDhuXTiU2E03uzZT7aOuQamw3pXJdIpM=; b=EPJdgu4M1PKSlLXxh4YXgDwsf0g5g65L3GlDbqLwyTrU+zGqJyL3ps20VJL0AiPfZL rl6BQ8aS97aZDDFfE1AIGGbvX6MJDiwzz/JXmSxHLjRUWBjgXmREkbs7AjsSjwvdr7rH XMuWrUsBu3D5QMlGuaQFIOrVUmsvamwPfMoYU1EANR1hwxk6vYdl7gv3e7ca3p82j2AB buBljq2Z0cqEHXJ/ULvkENJMhqVbBk/kZNHwTqwsRWuLNsTu6in2kk4snkHaEPdsN/FP 9u6lxYdwEadrUKW7nRuhXJq4HXk4NOLZAk6G0bxg6LZG/h3wt/oKT+pXeNGFAGy4eVMS le/Q== X-Gm-Message-State: APjAAAUGiCDyjE6DL4HhYiGK4KCp8DSzRqucDJ910wr8J2f3FUOiqUky tE3sCIyEUnRKnmcDAJq2VO8ktnM7nFr1M2wfCEc= X-Received: by 2002:a54:4109:: with SMTP id l9mr38891416oic.93.1563901356701; Tue, 23 Jul 2019 10:02:36 -0700 (PDT) MIME-Version: 1.0 References: <20190722182451.GB24412@kroah.com> <20190722223337.36199-1-ravisadineni@chromium.org> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 23 Jul 2019 19:02:25 +0200 Message-ID: Subject: Re: [PATCH 0/2] power: Refactor device level sysfs. To: Ravi Chandra Sadineni Cc: "Rafael J. Wysocki" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "the arch/x86 maintainers" , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Greg Kroah-Hartman , Baoquan He , Dave Young , Linux Kernel Mailing List , Linux PM , Todd Broch Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 23, 2019 at 6:57 PM Ravi Chandra Sadineni wrote: > > Hi Greg, > > https://patchwork.kernel.org/patch/11045069/ seems to create a virtual > device under wakeup class with the same name as the actual device. I > don't see a way to reliably map these virtual devices to the actual > device sysfs node. For example if we have to know if a particular > input device has triggered a wake event, we have to look for a virtual > device under /sys/class/wakeup with the same name. I am afraid that > depending just on the name might be too risky as there can be multiple > devices under different buses with the same name. Am I missing > something? There can be a symlink (say "wakeup_source") from under the actual device to the virtual wakeup one associated with it. Then we can advise everybody to use the symlink for the stats and deprecate the stats attributes under the actual device going forward. :-) I have a plan to cut a patch to add such a symlink, but you can try to beat me to that if you want. > On Tue, Jul 23, 2019 at 12:44 AM Rafael J. Wysocki wrote: > > > > On Tue, Jul 23, 2019 at 12:33 AM Ravi Chandra Sadineni > > wrote: > > > > > > wakeup_abort_count and wakeup_count attributes print the > > > same (wakeup_count) variable. Thus this patchset removes the > > > duplicate wakeup_abort_count sysfs attribute. This patchset also > > > exposes event_count as a sysfs attribute. > > > > > > Ravi Chandra Sadineni (2): > > > power: sysfs: Remove wakeup_abort_count attribute. > > > power:sysfs: Expose device wakeup_event_count. > > > > I don't think you need this at all, because > > https://patchwork.kernel.org/patch/11045069/ is exposing what you need > > already. > > > > Thanks!