Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8949672ybi; Tue, 23 Jul 2019 18:43:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYJkL44I/LqBthmM85Uy2gWG1tguFKJjHm84RV6zqvHBVBSSb7NVl0EGpbmsyjba9++3/H X-Received: by 2002:a17:90a:8c92:: with SMTP id b18mr83510076pjo.97.1563932605777; Tue, 23 Jul 2019 18:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563932605; cv=none; d=google.com; s=arc-20160816; b=SKuffN9vex6FdR+Sj0cuwdLnxsWCl8h9GitE1JoX3V1WAyeb1Tz9tkLXcrsP1VkzAy 46K379+5hwOaDpIIA1G512BG2hlpfmGZKYPZPNZz6EFFXKbaT6AcaPrreBWNB2OBgOHY CuHbBkfbXoiXK942tfx0SjSXhnW9fzKSoVLYKYlMHh89CHfg5bGRQeNSXPEN0qy4Svk2 M8VsrRFrUCJ8ukPZRivXX4r8gNgmH0qRsQMkPW8+QkoEOOlTFBLCXIi9OQIIYcADrltB 84TeFqwtgZtFNBP7sfUJ1XHxz5L4uw3Q5URqHKIyvvFOfoEeRIAP2phS8nJNqFVs+Uh8 1zpQ== 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:dkim-signature; bh=EUphuEwrZLhheaivYxOs3+IP5xczivEPWWhKQbWqQ58=; b=sRimbPWHZn3puVBvgXORqdfgyKho8yymbuto3/4Q3BgHDor7aVjds/JJNQQvcjLHtI ha6mRamXqqLfg75ODhA61HapvgjboPhgdIJ6rP+gj/5lXeV2/hkzl8lA7ROocG/lZnRM DImFQLpdc4vaTWrtkWlWd+Oczeaf9zo9vVAt5676ldIYDKo9jR5Gke1FYGc1MPrDdCRQ O2DH5DDcvtckurjkThm2JkoVFDwm2O5vmDW7uDqHt1sbHtVHB7c0lOMmTJDZA/k2wcN8 UkKGryvuD4/EZoC7UGLAovc2lpDzQHAxRpQV/GqwrJZ84QBBWvnLHVhZrm12NtQVC40R Sytg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RUIRiGCv; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p10si11320057plk.9.2019.07.23.18.43.10; Tue, 23 Jul 2019 18:43:25 -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=@chromium.org header.s=google header.b=RUIRiGCv; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388471AbfGWRZ7 (ORCPT + 99 others); Tue, 23 Jul 2019 13:25:59 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:43232 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732675AbfGWRZ7 (ORCPT ); Tue, 23 Jul 2019 13:25:59 -0400 Received: by mail-qk1-f193.google.com with SMTP id m14so6036025qka.10 for ; Tue, 23 Jul 2019 10:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EUphuEwrZLhheaivYxOs3+IP5xczivEPWWhKQbWqQ58=; b=RUIRiGCv3r2B0G7EM/oszmuYFak/HPhbNhHVHSOw6GfhPSmI27qdHWWzbjPLNujhku vKvw7tsmMJcEem2MDYaqZvuSLJ+iVj0LkkO4QOSg7LaEoNGsY+6N8l8XrAF++jqBK+Jp yy0Bt21MGZqulZ68hVt935Qosr6mEE0Br7sgk= 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=EUphuEwrZLhheaivYxOs3+IP5xczivEPWWhKQbWqQ58=; b=eqkSD3ehcscQxQEQI6pPN90p5dKT9V9lhCgGz5CC7aALx7q+/tE8F0iyyAjc7fQtMT /4s/Ud8NUqaDxaOLDAKhUtGDR8vnTYIOX3xRdk605YBYXV4mZjmvXOiPJ/KnGo/j01Gi JaCVX893cL/8xtCn8HExkZtTuLqhpybGpLjbOSRrH184jDUr9ArEtjOl+++lHCMk4U32 esx/brqmkCnC8u3F9p5xAtOo5MCCgXpDCfR6AbnV0YfFOx1bCFpec2tAD79Bx+HpDj7a fp7AOeU2bync6BW5diX9zc7Hj4ZtemMomvgYpaFlpNsoR3xlpnPkTnJG0wuL4BA3C/y3 GnYg== X-Gm-Message-State: APjAAAVnjs1M1IXNa3XSbtVpOxN3rPrrqye+ScOVl5wNcv+SRYK4a5S9 dyXCUoxWjoqPRQYi6lZ7oXbpG1sLK/Y2UBgsOQDc5A== X-Received: by 2002:a05:620a:1425:: with SMTP id k5mr51778003qkj.146.1563902758554; Tue, 23 Jul 2019 10:25:58 -0700 (PDT) MIME-Version: 1.0 References: <20190722182451.GB24412@kroah.com> <20190722223337.36199-1-ravisadineni@chromium.org> In-Reply-To: From: Ravi Chandra Sadineni Date: Tue, 23 Jul 2019 10:25:47 -0700 Message-ID: Subject: Re: [PATCH 0/2] power: Refactor device level sysfs. To: "Rafael J. Wysocki" Cc: 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 Thanks Rafael. I will abandon this patch set and try to create a symlink as you suggested. Thanks, Ravi On Tue, Jul 23, 2019 at 10:02 AM Rafael J. Wysocki wrote: > > 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!