From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42B10C61D85 for ; Thu, 23 Nov 2023 10:41:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344762AbjKWKlM (ORCPT ); Thu, 23 Nov 2023 05:41:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344757AbjKWKlH (ORCPT ); Thu, 23 Nov 2023 05:41:07 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 821FBD5E for ; Thu, 23 Nov 2023 02:41:13 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C56E4C433C7; Thu, 23 Nov 2023 10:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700736073; bh=nFEAOqE6x/NDZvJnfnKH663qewXBVjbzzX523Xev7lY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TorcYzd/bGGxpk5uRxKa3pngvRjZgOTAS+5vgboRT9b06u3XQxH1fxKEQ1f6yrzjj kXxvZBZ/QfqwTxHafO4Aav3r13p86t9y6R3hYUAi0D64JLlKcU8wplC5TTRfn+I1M3 NoJrkO3l3outGzPeD+oc1Fz4XaqXMBY3F0GB0SCvx5T7Hu3rETw+j6AvH7S2seO2Uf MjfmW0emprMbwKtAOgVcIjoulnowiQjruA6spYXhI/+q/EaP+peHPlFgBLgtv6syZ1 XVxe+pgX373pWc93gOG9CnSC3C1KHusWXKQidH6xnBWnJcfJ1wGXFHWanvhWob7jPf mOTJAEMhZnDwA== Date: Thu, 23 Nov 2023 10:41:08 +0000 From: Lee Jones To: Peter Ujfalusi Cc: tony@atomide.com, robh@kernel.org, wens@csie.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mfd: twl6030-irq: Revert to use of_match_device() Message-ID: <20231123104108.GF1184245@google.com> References: <20231029114843.15553-1-peter.ujfalusi@gmail.com> <20231123103756.GD1184245@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231123103756.GD1184245@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Nov 2023, Lee Jones wrote: > On Sun, 29 Oct 2023, Peter Ujfalusi wrote: > > > The core twl chip is probed via i2c and the dev->driver->of_match_table is > > NULL, causing the driver to fail to probe. > > > > This partially reverts commit 1e0c866887f4. > > > > Fixes: 1e0c866887f4 ("mfd: Use device_get_match_data() in a bunch of drivers") > > Signed-off-by: Peter Ujfalusi > > --- > > drivers/mfd/twl6030-irq.c | 10 +++++----- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c > > index f9fce8408c2c..3c03681c124c 100644 > > --- a/drivers/mfd/twl6030-irq.c > > +++ b/drivers/mfd/twl6030-irq.c > > @@ -24,10 +24,10 @@ > > #include > > #include > > #include > > -#include > > #include > > #include > > #include > > +#include > > > > #include "twl-core.h" > > > > @@ -368,10 +368,10 @@ int twl6030_init_irq(struct device *dev, int irq_num) > > int nr_irqs; > > int status; > > u8 mask[3]; > > - const int *irq_tbl; > > + const struct of_device_id *of_id; > > > > - irq_tbl = device_get_match_data(dev); > > - if (!irq_tbl) { > > + of_id = of_match_device(twl6030_of_match, dev); > > I think you just dropped support for ACPI. Ah, scrap that. I was looking at the wrong part of 1e0c866887f4. So what about the other drivers changed in the aforementioned commit? Ideally we'd have a call that covers all of the various probing APIs. > Rob, care to follow-up? I'd still like Rob to comment. -- Lee Jones [李琼斯]