Received: by 2002:ac8:156:0:b0:3e0:cd10:60c8 with SMTP id f22csp2492439qtg; Thu, 23 Mar 2023 04:43:11 -0700 (PDT) X-Google-Smtp-Source: AK7set/cCNFI/G0TSb7aiM9D91nm4zSyuEC9pfpZpjTG8/hqGzj4iuQQoyJk2+36fiNbwn2qtvE2 X-Received: by 2002:a17:907:c08b:b0:8a6:5720:9101 with SMTP id st11-20020a170907c08b00b008a657209101mr11526792ejc.4.1679571790693; Thu, 23 Mar 2023 04:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679571790; cv=none; d=google.com; s=arc-20160816; b=nerldNdreY0Dw3023mYPvhhIJHgFvDyJPysSlTGd2eB7r+u7IXX5ndUGQ3876uHedp +v+iBeP361Azko4j8CPzO0yJ6SRttPOy5GdzHi55VgJbQnfTXdM74q30dUrfnjSE9xnS F1JlVHyLJeQdAEj50aOKRblA+v0bP3PqIiB4eaDA7Ncb0yl9R267y6hnJjJo4ufACQ3k 8M/HJzybcK7gjS+clWkBc7QMdYTnvBo+5TSApT7WG6lqmkIn8Lf4Xm5EEl/6IDTOMMK3 rpOywt+Dc84IGV5Gpj1Ry9mJMR0yJ/zJHu3x0AcexHPaRitZPw605iDgedO3QlMG5/ah v2GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rm/7e2+3Z5QBLn+64NbtbcOw6P8QlROA5L9Ml9wyY7A=; b=Q5Pp5m6NuXj+93BvlDZMMsNdsiWbVVgWBEWoVudITnfh+pgzt7pBd/rqCx7PIMaqS4 5Sw3nSn3caxiAe6BHBunfT3Cw2+dgcq60ZBK+AXNjcGP/XUReYLXBVm/5P62uKVctmiv ea3kcE3pVrc7cqZz9dGoS6/nOLywuQMmawXMr2l4HlR/LswnVA+iDzFv9Ncae1OlhMgo 2A0hDkEpTWH9LBYVSrMMBU2WonrZkQnaYiVDgwmuYnsdpcdMjG6nTexo5laC+/MRoZEs RmggT04SQGgMi+Isd4NLFW3vvQcX+hghen38C2tvsK9k+v0l9Q07jb/kIRzOE6bwUGm6 40Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="rZ1vsGM/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020a1709064a5300b0093331f16cffsi16093678ejv.159.2023.03.23.04.42.46; Thu, 23 Mar 2023 04:43:10 -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=@kernel.org header.s=k20201202 header.b="rZ1vsGM/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231243AbjCWLiw (ORCPT + 99 others); Thu, 23 Mar 2023 07:38:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbjCWLiv (ORCPT ); Thu, 23 Mar 2023 07:38:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B4412B9D8; Thu, 23 Mar 2023 04:38:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C71C362606; Thu, 23 Mar 2023 11:38:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAE66C4339C; Thu, 23 Mar 2023 11:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679571518; bh=F+fuZgEG2+3pg4JMJViOzTfJymZjqTVxKp+YQTYEjPg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rZ1vsGM/uhS/KS4c5iFJXuu1zo2wqLgBBLScOmRAdh58WEw5+c+xsOPLB4m2gmXal BirrIeFQN2LOtz8XqB/AqkXHe2EmpkmWK3hGEIODV+Amfjie+fqe40nr3NXf3uhbbQ 8ui9cDolyQVhhDalr8MrWlstaEOewESjQG52fV97ZOmtg7LrFOIC6WOpCTsFH+OpOd edXh3daVpt0ck5AWKrzec5Vv8N44HmuaKpY2Ax+f1cSJpQCF6SuH1ER6Snj1mfxjzL mjupBIID94DnqGvwSAdi9CRo4dmwyRdfjzcQtf3WrzstNhyIkIVqcCnGGTYRGpfY0r +ln0zEWMzYXbQ== Date: Thu, 23 Mar 2023 11:38:29 +0000 From: Mark Brown To: jerome Neanne Cc: Esteban Blanc , linus.walleij@linaro.org, lgirdwood@gmail.com, a.zummo@towertech.it, alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org, jpanis@baylibre.com Subject: Re: [PATCH INTERNAL v1 3/3] regulator: tps6594-regulator: Add driver for TI TPS6594 regulators Message-ID: References: <20230224133129.887203-1-eblanc@baylibre.com> <20230224133129.887203-4-eblanc@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sqyr3pdl018Qcdzn" Content-Disposition: inline In-Reply-To: X-Cookie: A lie in time saves nine. X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 --sqyr3pdl018Qcdzn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 23, 2023 at 10:12:21AM +0100, jerome Neanne wrote: > > This would be simpler and you wouldn't need this lookup function if the > > regulator descriptions included their IRQ names, then you could just > > request the interrupts while registering the regulators. > I changed the code to follow your recommendations then now in case of a > multiphase buck, only one set of interrupt is requested. > buck2, buck3, buck4 are not associated to a regulator device because buck1 > registers control all the multiphase bucks (only one logic regulator). > Consequently the mapping for the associated interrupts does not occur. > I'm not sure it's the right option. > Do you suggest to keep it like that for multiphase? > Is it better to request all the interrupts anyway and map it to the same > rdev? Do the other interrupts do anything useful for this configuration? With a lot of hardware the whole control interface gets merged into one which includes the interrupts. > > > + error = devm_request_threaded_irq(tps->dev, irq, NULL, > > > + tps6594_regulator_irq_handler, > > > + IRQF_ONESHOT, > > > + irq_type->irq_name, > > > + &irq_data[i]); > > > + if (error) { > > > + dev_err(tps->dev, "failed to request %s IRQ %d: %d\n", > > > + irq_type->irq_name, irq, error); > > > + return error; > > > + } > > This leaks all previously requested interrupts. > I'm not sure to understand this sentence correctly. You mean all the > interrupts already requested are still allocated after the error occurs? Yes, I'd either not registered the devm or thought there was some other interrupt wasn't devm. --sqyr3pdl018Qcdzn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmQcOjQACgkQJNaLcl1U h9Auuwf+PN5kS1OlVilZrrkY1SzeCUq5W+chBmTUcyD85lp5xFNkACPMHE1lYwjE uVj1L15Dqzt9wbKb5i5/c1p2aiumc4Uz6EYkgn5JIQ5ozBBUI9JYzhyWdPOWKw4/ Vr3NvPPkXLy/na7nRyuGJKmexIo/189mXkIRya3jDLIV7iI0arIc4wdXRJDe3YyO DbFIaBVG3nudg6GGf1zKJ9rrkB/HMd4WFfbDURoQm4yicpTx2sP7SQQ4zk1KC4QT hcRVB60RoXOYaESfSvPavmEwMXcrNgQrGCiePgvOUHI1VTMtqDN/3DfM+HD5YgNF pN2QCR1QG69NJC6jSt3EpqYcayQsJw== =T/Ls -----END PGP SIGNATURE----- --sqyr3pdl018Qcdzn--