Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2389459imw; Wed, 6 Jul 2022 05:15:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vfR/XAcgz8H/k4lLDUD9WR2j4C6jJR7NrQu0zjSe0LlzRw3SZnRBmClcFWk2NcTbVuj2AD X-Received: by 2002:a05:6402:3689:b0:43a:7c1c:8960 with SMTP id ej9-20020a056402368900b0043a7c1c8960mr9714227edb.79.1657109723380; Wed, 06 Jul 2022 05:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657109723; cv=none; d=google.com; s=arc-20160816; b=zcfyCmHiNKyQYkimBNBACFbU3LSGRSx8D23yqQu521TCD0eGxcEDzuMY8iAKLFgpzA dV37rxVhlIzaFRBemOm0Az7SDwr5Uu33z4YF2r9m6TwQunya5VBCDnaPdFt6NNQGHqeg VQmDZFwUJuWyzm51QHIvfo7XaN4sl4OzdWCh96NrXSXy8tq+gyksaJvEPJP0zOiIcwT9 jFKSy8s3h4KG/i28uPWE7NSLIttD5Z5xJ7nEFBaoeFBeitJtWIi1Mm/wSqS10TK60WPI 4qitllcQoLiUfLXzoNC1gt3Z1XVA6m35kYt0v9e1N01sFH6YH/RIYn7jqXcioaSYX3yH sBaQ== 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=N8SiADVZ0KBDLxFo+fo8QUS4MOh1gf7B6JuJMFLC4bk=; b=A+3/pmvP//kheraFrqT3Ou/pvhuuaWmYMEFKWclrh+BgK+APgWr31Le568IVNr5uIz vS6vDJsRwfxxYtyHlhkOILLTzKj2U3lIyHMbDNOPI1JV4R5wt72oS4sWWoy233KApsgN l3da9Y21BA+UPqxcrdabdFFA+RVpUrq/coJLMQpJuWExXIonWo/8uCUP2tOz1xvK4mRa irjlg3GqHopv0DANFQJnUTsYjdjzrKIGrF9pz6q5HKAM4k3xj3FpV1WXrGd3aun27xmA V4PkDRVbvJM9HxBAf98FDHYZvW313d+K/epha8fLm5PQsROw9YBgjDPXOQg2Ytbbe5gh AvcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=HgxVzYvD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg12-20020a170907970c00b006fefef9abd2si31248232ejc.366.2022.07.06.05.14.57; Wed, 06 Jul 2022 05:15:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=HgxVzYvD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233243AbiGFMMs (ORCPT + 99 others); Wed, 6 Jul 2022 08:12:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233581AbiGFMMV (ORCPT ); Wed, 6 Jul 2022 08:12:21 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E14D52A72B for ; Wed, 6 Jul 2022 05:11:54 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id eq6so18997660edb.6 for ; Wed, 06 Jul 2022 05:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N8SiADVZ0KBDLxFo+fo8QUS4MOh1gf7B6JuJMFLC4bk=; b=HgxVzYvDle/d1CEh6AG1GZUcPYT+1KA3sTSEjmLiflVXdHAaXsIUJQdpd/Cft0ENun 8QtJSxn0ieSoNkiZId7FUOQ056DX62vamfJMe52Qw4gJf8jRLqYQ3w7bdramuFqlSF2U SehjyB8iiTiR5st1Ohxe1wKDAJFmMVYuu4Xqe070npzAQ4BUwENQuyHhuXd3Ira0yEhm ao5HiRtOJcVYKfQo2MYmOTxpSpPFGMkEOzRtHuTq/wnF6pL6dTwJtpMr+nzdZL2WX+2P ufPUiA8LaRWPF1W1S7LgnawXvspOtjS2XezEDVrZFmFOVX9qRKgC1W0nLgoSBWK0YF2P 267g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N8SiADVZ0KBDLxFo+fo8QUS4MOh1gf7B6JuJMFLC4bk=; b=3N+wl49B//MzwrXkjhPFsfZW/gVSsTW48qIJRIXb+mntx8lXBojIScuywKhL/71EFX 3+yUICdEkC3aPUjal5yU/yQW81NyQIPegO+O8Pj7XITdtrN1F66qOD+uAKONt9WwJHMY NWgkHTiyC3bogvygUCE1wRQe7j7D3T7DAmuPMjpen9zE2fwstCJmY3TLfbwlV+now7nU NfKIEl6A9mytHW5SnYSJ3sqz58XoBghl4IgGZROyXRT29U4V4qgplQ1RFw+vscUusNGS dVbVG5FkQcYxPzJqamNiYp1olqHOB9oqrCjAKlROj0cqeA2XmzZhGmsmfDqL7lr6kKz2 XyDg== X-Gm-Message-State: AJIora/GfYVimZaL5RqPBjE7zfoIkMZbPZF/6YxKF/e/5xgQQcBpxYKO mFfdRUX/ktigfTiVs+bd3BDLZY5n8XUjw3pqHhzxLg== X-Received: by 2002:a05:6402:42c3:b0:43a:46f6:ebd2 with SMTP id i3-20020a05640242c300b0043a46f6ebd2mr23832628edc.213.1657109513100; Wed, 06 Jul 2022 05:11:53 -0700 (PDT) MIME-Version: 1.0 References: <20220705171835.4923-1-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Wed, 6 Jul 2022 14:11:42 +0200 Message-ID: Subject: Re: [PATCH] gpio: pxa: schedule a devm action for the clock struct To: Andy Shevchenko , Stephen Boyd Cc: Robert Jarzmik , Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Hulk Robot , Yuan Can Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 6, 2022 at 1:49 PM Andy Shevchenko wrote: s> > On Tue, Jul 5, 2022 at 7:29 PM Bartosz Golaszewski wrote: > > > > The clock is never released after probe(). Schedule devm actions for > > putting and disabling the clock. > > ... > > > Reported-by: Signed-off-by: Yuan Can > > Me puzzled. > Yuan Can sent the following patch: https://patchwork.ozlabs.org/project/linux-gpio/patch/20220704130323.104294-1-yuancan@huawei.com/ I responded that it was not complete and sent this instead. > > ... > > > + ret = devm_add_action_or_reset(&pdev->dev, pxa_gpio_clk_put, clk); > > + if (ret) > > + return ret; > > + > > ret = clk_prepare_enable(clk); > > + if (ret) > > + return ret; > > + > > + ret = devm_add_action_or_reset(&pdev->dev, > > + pxa_gpio_clk_disable_unprepare, clk); > > + if (ret) > > return ret; > > Can we use recently introduced clk APIs for that? Maybe Stephen has an > immutable branch you may reuse? Sure, sounds good! Stephen, would you mind providing me with a branch for that? Bart > > -- > With Best Regards, > Andy Shevchenko