Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp832265ybg; Mon, 27 Jul 2020 00:12:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1jt/J+2OXq/zj+9eQQ+A1TJ9vK3Xy5kzGp8P7c7OjDAFPhd8n89iO0eetYCs2wZbFqsfl X-Received: by 2002:a17:906:8748:: with SMTP id hj8mr6637362ejb.477.1595833923998; Mon, 27 Jul 2020 00:12:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595833923; cv=none; d=google.com; s=arc-20160816; b=dduBiGra9NwanE+jvu7bbSz6Lyt7ounBALRqYFi1LYDVMJrEDgIC+YfO0BmYJUHHCn 53Uy/eTCR3ja0nlXDtIxjk2PBh8MVTmyPWBketdG+KUQYRkfR0urGRc4CKjV/5HcyPOP OIb3AL+ciTQHvTGJ70dcTbnt/dOEMbmaJuToUQBLnIWVGhbaHs/lSaUmVo63Nhqdhe4V lWLTROeT5YmzPBG+gsmzdFSyG4sYGljAziAm31GY37V8ayNLCCG45tVyVA9i9ogsqdiF XUganYi8Dt30V4wrcFDmvrdMtSam9XRf4XbZJjxIUKImOPYwkjibB9NTvozn5GczwX5u Kc7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=r3ohMdUUisXXnJtg4Sj8gOXxHs0SULkmzOyNPW3p948=; b=YtnJ5INBmPzUDKxsHivLBF2+CTQ1R2JkGO2BkT6n/EM2yjktdJSGSlfRRLhRcsJ3nQ VRf2ZNbjln7oVHhvntLW9rlxBQad19g8FxBVDqlzkSaOvX3QIwRxovwFdeUHcaL48hk2 +NQVmWLMGqG+UXpEEQrGa+nn0L8oFD293w3FxP/dkt5j9TG7eSazS1WazXXthovalY2v Xzz+TD0h6vIDeZ5bdISIpYE0pHYIlpp3HUBwRmeN2ae/F3VN2338hyLuXT8yvzly7Lqx P+cldQ71zu7ZH0omRQSpSu30KiClzN0fBgt3toViU1SODRalh+TBiShDKlfuy0tsmUrL bOgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J7drz06i; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si4842484eju.554.2020.07.27.00.11.41; Mon, 27 Jul 2020 00:12:03 -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=@gmail.com header.s=20161025 header.b=J7drz06i; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbgG0HIR (ORCPT + 99 others); Mon, 27 Jul 2020 03:08:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726116AbgG0HIR (ORCPT ); Mon, 27 Jul 2020 03:08:17 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A929C0619D2; Mon, 27 Jul 2020 00:08:17 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id q17so7506565pls.9; Mon, 27 Jul 2020 00:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=r3ohMdUUisXXnJtg4Sj8gOXxHs0SULkmzOyNPW3p948=; b=J7drz06irjdSn4IEzXgudUrCCZnvkKA7cxf4NRdogNw/S2loC8qb0x8wuxjbKR2HtB PonGxSpWHuChJh9AYDUz65IOJtL7ALkmFRY6FQA/89hAZ2laXJu/9GNjCF8k3P/vC/67 LNpcl46FH8W63QyGQRdYKwDzNNpiAiqUNSDEYJoKWpTOciWVQA4+cZFE71/7GlKZntpn 2a4JTr5TWo3OP3y68Tdev/F0mICuQ1KuM2pRiyoXHocX0eGLj5/+DsTZKYsNihtrb2Tw L8fabAssBOKF5M1nR2ITvjqijq0pPazWFZB2hG5+paAOZhilTt5mHzCCHil3ef/Kbprz zPTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=r3ohMdUUisXXnJtg4Sj8gOXxHs0SULkmzOyNPW3p948=; b=SVDUM8Bl3YoOLrx7kv0CIjNwZ8G31QbEeQM5QmR8Xrd0qJeLq9YBCNYecQyKQ5Ob0Z ULc+gIpPRO2dE1XhNF66WRZR+85YyJBAVLL8qPb+ZDsrD5XZktyAnlLONNd3GwZZsIj4 b0/xv1B7CmkGJYyraTJJZETQSLVACZ0kNHmdfgtN9bHWCr1Axhm4avgabYcytPoeU/dS GwukbbZbyyRbDNuT0MxUZNM51ZsHlDtZDyh05m3NviYgpU8iiuzRcn3TT1ZvybdKwyWI eebKnOR8A7hI8GsBXP0N2CeSGz5TEapD2DMijvN0ILMZ8eK+PyKSbGifPSupU2FeGPN0 aVWg== X-Gm-Message-State: AOAM531K3YUiPCxE9kIax5nGVe7IeRgbiuqG3CG7EfiaAKdBr8FguByP PA8wIbe3rPY8kHuDKlB34fo= X-Received: by 2002:a17:90a:6948:: with SMTP id j8mr16013497pjm.45.1595833696391; Mon, 27 Jul 2020 00:08:16 -0700 (PDT) Received: from gmail.com ([103.105.152.86]) by smtp.gmail.com with ESMTPSA id o128sm13916110pfg.127.2020.07.27.00.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 00:08:15 -0700 (PDT) Date: Mon, 27 Jul 2020 12:36:52 +0530 From: Vaibhav Gupta To: Andy Shevchenko Cc: Bjorn Helgaas , Bjorn Helgaas , Bjorn Helgaas , Vaibhav Gupta , Mark Brown , linux-spi , Linux Kernel Mailing List , linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan , "Rafael J. Wysocki" Subject: Re: [PATCH v1] spi: spi-topcliff-pch: use generic power management Message-ID: <20200727070652.GA5400@gmail.com> References: <20200724223746.GA1538991@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 25, 2020 at 01:44:44PM +0300, Andy Shevchenko wrote: > On Sat, Jul 25, 2020 at 1:42 PM Andy Shevchenko > wrote: > > On Sat, Jul 25, 2020 at 1:37 AM Bjorn Helgaas wrote: > > > On Fri, Jul 24, 2020 at 11:16:55PM +0300, Andy Shevchenko wrote: > > ... > > > > If it's a bug that spi-topcliff-pch.c disables but never enables > > > wakeup, I think this should turn into two patches: > > > > > > 1) Fix the bug by enabling wakeup in suspend (or whatever the right > > > fix is), and > > > > > > 2) Convert to generic PM, which may involve removing the > > > wakeup-related code completely. > > > > Works for me. > > The only problem here, is that the 2nd is already in the Mark's tree > and he doesn't do rebases. > So, it will be the other way around. > Concluding from yours and Bjorn's suggestion, I will drop the device_wakeup_disable() call form .resume() and send the fix. I will also track the drivers who got similar upgrades and went un-noticed. As Bjorn mentioned, the problem is that I don't have hardware to test, so I just replicated the legacy behaviour in generic by replacing pci_enable_wake(....,false) with device_wakeup_disable(). So, from now, while upgrading drivers with generic PM, should I completely drop the pci_enable_wake(....,false) calls if both .suspend() and .resume() try to wakeup-disable the device? Thanks Vaibhav Gupta > > -- > With Best Regards, > Andy Shevchenko