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 82FCDE92705 for ; Thu, 5 Oct 2023 14:48:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239598AbjJEOrj (ORCPT ); Thu, 5 Oct 2023 10:47:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231547AbjJEOoJ (ORCPT ); Thu, 5 Oct 2023 10:44:09 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5CE313B70; Thu, 5 Oct 2023 07:21:41 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10853"; a="363727183" X-IronPort-AV: E=Sophos;i="6.03,202,1694761200"; d="scan'208";a="363727183" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2023 01:42:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10853"; a="701588130" X-IronPort-AV: E=Sophos;i="6.03,202,1694761200"; d="scan'208";a="701588130" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2023 01:42:37 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC1) (envelope-from ) id 1qoJwI-00000002yg3-2o0k; Thu, 05 Oct 2023 11:42:34 +0300 Date: Thu, 5 Oct 2023 11:42:34 +0300 From: Andy Shevchenko To: Krzysztof Kozlowski Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Mika Westerberg , Linus Walleij , Takashi Iwai Subject: Re: [PATCH v1 1/1] pinctrl: denverton: Enable platform device in the absence of ACPI enumeration Message-ID: References: <20230926190818.931951-1-andriy.shevchenko@linux.intel.com> <76d1e643-9b81-4c23-8f46-73fe59913600@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 05, 2023 at 11:38:38AM +0300, Andy Shevchenko wrote: > On Thu, Oct 05, 2023 at 09:53:51AM +0200, Krzysztof Kozlowski wrote: > > On 04/10/2023 21:42, Andy Shevchenko wrote: > > > On Wed, Oct 4, 2023 at 4:20 PM Krzysztof Kozlowski wrote: > > >> On 04/10/2023 15:09, Andy Shevchenko wrote: > > >>> On Wed, Oct 4, 2023 at 11:18 AM Krzysztof Kozlowski wrote: > > >>>> On 26/09/2023 21:08, Andy Shevchenko wrote: ... > > >>>>> +MODULE_ALIAS("platform:denverton-pinctrl"); > > >>>> > > >>>> Why do you need the alias? It's the same as ID table. You most likely > > >>>> miss MODULE_DEVICE_TABLE() or your table is just wrong. > > >>> > > >>> This is cargo cult from pinctrl-broxton.c. If we want to fix, we need > > >>> to fix both. > > >>> Care to send patches? > > >> > > >> I don't understand how some other file affects this. Why do you exactly > > >> need module alias here? Which use-case does not work without it (after > > >> adding proper MODULE_DEVICE_TABLE())? > > > > > > We try to keep these drivers uniform. So, if something should be done > > > differently, it should be done for all affected drivers. > > > Since patch is applied, now we have two drivers to improve. > > > > Awesome reason. So if you add accidentally bug to one driver, it should > > be copied to other file as well. > > I'm not sure where it's a bug, it works. The problem is implementation > and I believe Mika and certainly me agree with your points that > MODULE_DEVICE_TABLE() is a right way to go. The initial implementation was done by 0c3013bbe1d8 ("pinctrl/broxton: enable platform device in the absence of ACPI enumeration"). It was ACKed by the driver maintainer as this one. But again, we agree that your way is better. -- With Best Regards, Andy Shevchenko