Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2944982pxb; Tue, 12 Jan 2021 02:29:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5kHKMBlGB22l7e/cC5+rfLaC4Dd6Nv5BwT/7ii/n6SAxnT42XmyEISkYHlbPnEEe39kTu X-Received: by 2002:a17:906:52da:: with SMTP id w26mr2785501ejn.347.1610447363453; Tue, 12 Jan 2021 02:29:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610447363; cv=none; d=google.com; s=arc-20160816; b=ejpOgNmbpTfj9drmOdixTm4xgjbxpZ8wYvPp8qYnJxBDaRREPXHbI4f0bpt+PM7L00 gvxcMJ8JvoYWkJuxVluZgJTlu9dzTr364NgXAsoWsqYjDAC/MZt+EXZKcyQ8QKxhxQSl LL43R5OayzRYsReeTko6oN2PTdK/35njwXGvshoU8CpJuPehB8xyOo8t5EytirFdeVDt 8sEuiIxfmZFB0ZYYqoIJlny0UVNuUYxzoimpMOTFTIyoCTWu0ltTm1H6EBwvqRQCiEPv NFqZLFGpRdKtKm8u0dnedqpMPzwL17hNtI4D4MI86/8HOF7OzMch0XozHrp8XVqsA7Sw 50vw== 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=Fc5a4hAhJ0U9BAhymt1K2IV9OCgvqNN915qhRxj3a0A=; b=xaCwzKxLiJ7f9xHDr6zAEnD8T2iq49xAR1uy1iymGXpXu6s2sb9mBTUXpaV5s/A0ol cM8KAlN4/PMpI0G48BacSZW0HcVedjL3BpspRsUtr+zrm6CO3LWpp8OOfkCEpcMUh5aS 3+4JSWL0zHJx2HypkQ1z74emREbMSFeR4SmqnlNdQTYn1ZVg9rdLxbBvg6EgPczaWW3Z BTPaqEflXZzfl7FR+bHga6SmID5r8PsJczXf05Zbmb0J2IGFIIlxRhFJz5QvdmvqfdXL 0eQYZO62vOnh+rWJBgZq4UpFdAujjAjpKBQeYxpDVOkvNKL7GtWgjmuRVJI5U4/LTRx6 kaFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FzgCAPKu; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b20si946594ejk.726.2021.01.12.02.28.59; Tue, 12 Jan 2021 02:29:23 -0800 (PST) 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=@google.com header.s=20161025 header.b=FzgCAPKu; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405233AbhALAZS (ORCPT + 99 others); Mon, 11 Jan 2021 19:25:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404253AbhALAP4 (ORCPT ); Mon, 11 Jan 2021 19:15:56 -0500 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2438C061575 for ; Mon, 11 Jan 2021 16:15:16 -0800 (PST) Received: by mail-yb1-xb2d.google.com with SMTP id f13so498304ybk.11 for ; Mon, 11 Jan 2021 16:15:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fc5a4hAhJ0U9BAhymt1K2IV9OCgvqNN915qhRxj3a0A=; b=FzgCAPKursjzIMbGBkZ3eH2LGTIcSWMdRXFZNb0iI3dW4FJfXN+URBiA/7Xr+TVtlN ZsuEticrEnOZQYGu0X3IURnQHoVxez1gbevX2V+Rjbl2KQIcP+gd3S9jBPvKE/vFM9fA gC+3kvYqIKAPySd/E91vcBp6hfdVkgHZ3ZzveccYyg/KfXQYsqrciKw/K+9x5p2/vwe4 72SM8FYv8L3RaHi6niX74hsTtEOKwN8NTWRejFUphdQCu5D/FBNb9AAYCKfWaixWTFJy VDsV/HgHRNk0K3kkGfTwX2vRF5evlUidVnWhYu07t79EZxSitSNx8GFUOeWtA+dDxQrA C3hA== 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=Fc5a4hAhJ0U9BAhymt1K2IV9OCgvqNN915qhRxj3a0A=; b=biyvUh7GY2vI/jfgK5bVAFtQl7x8a7cja9Pesz/L63QbcQjhiwR3mQr6lQ0Uhx4smw dioa2iJwswR+lziE/AbkK9lyoh/IQZ2s8NGKBXKNyyHplcMQZgnTt3P9J1Dwc/hlWiKl EghhESABf81QOcHwNTB/k5Vf0HykhSxRqVE+FFy6sFBd6JgsOFYiXTMo2Pz9Jdu3AGUR 2lVYuTTWH8XkIgjhRXJAkdIE1Od1XQP6ZSz+UgH1ukD7Bjr54zaebyQDBKLcy5qBAS5F cucJXlUkNYlrO0jss9CxG0GWJFXOhplm8bhXPLXNGXmUy9h87uwhvc6lWr0rwrRYdbQ5 wKVg== X-Gm-Message-State: AOAM531GRHbkIx2aFAS+u67sSYYhQ8HxluW/dYsOEimF4VUpyACHIJOB 6KXrbXf8B+bY1pYZtc6aR5JmxufXjUB9qrkEM8iIHA== X-Received: by 2002:a25:b703:: with SMTP id t3mr3722472ybj.96.1610410515726; Mon, 11 Jan 2021 16:15:15 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Saravana Kannan Date: Mon, 11 Jan 2021 16:14:39 -0800 Message-ID: Subject: Re: 5.11-rc device reordering breaks ThinkPad rmi4 suspend To: Hugh Dickins Cc: "Rafael J. Wysocki" , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Vincent Huang , "Jason A. Donenfeld" , Andrew Duggan , Lucas Stach , Linux Kernel Mailing List , Linux PM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 3:42 PM Hugh Dickins wrote: > > On Mon, 11 Jan 2021, Saravana Kannan wrote: > > > > I happen to have an X1 Carbon (different gen though) lying around and > > I poked at its /sys folders. None of the devices in the rmi4_smbus are > > considered the grandchildren of the i2c device. I think the real > > problem is rmi_register_transport_device() [1] not setting up the > > parent for any of the new devices it's adding. > > > > Hugh, can you try this patch? > > Just tried, but no, this patch does not help; but I bet > you're along the right lines, and something as simple will do it. Did you see this patch change the organization of devices under /sys/devices/? The rmi* devices need to be under one of the i2c devices after this patch. Is that not the case? Or is that the case, but you are still seeing suspend/resume issues? -Saravana > > > > > diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c > > index 24f31a5c0e04..50a0134b6901 100644 > > --- a/drivers/input/rmi4/rmi_bus.c > > +++ b/drivers/input/rmi4/rmi_bus.c > > @@ -90,6 +90,7 @@ int rmi_register_transport_device(struct > > rmi_transport_dev *xport) > > > > rmi_dev->dev.bus = &rmi_bus_type; > > rmi_dev->dev.type = &rmi_device_type; > > + rmi_dev->dev.parent = xport->dev; > > > > xport->rmi_dev = rmi_dev; > > > > -Saravana > > > > [1] - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/input/rmi4/rmi_bus.c#n74